Comments (29)
I see that your cache dir does not exist. I just noticed that might be error and fixed in c26cba0.
If you want to keep your cache along with the files, you can remove cache-dir: ./bin/cache
this line. Or specify directory, that exists (mount it in docker compose).
from go-transcode.
Just noticed! I have mistake in readme:
ffmpeg-binary: ffmpeg
ffprobe-binary: ffmpeg
ffprobe-binary
should be ffprobe
, but it is ffmpeg
. That is why show_format
is unrecognized. Gonna fix that, thanks!
from go-transcode.
I hope your team write powerfull document for this module.
really needed
from go-transcode.
Thank you for your patient response :)
Hopefully being best.
from go-transcode.
for example i have a mp4 file in /media directory
4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4
and i want the index file -> with this url
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8
and it returns :
500 unable to preload metadata
docker-compose logs:
go-transcode | 12:08PM WRN unable to preload metadata error="unable probe media for metadata: exit status 1" module=hlsvod
go-transcode | 12:08PM DBG request complete (500) module=http req={"agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","id":"b7e509d9545f/KM6lrEb4VP-000020","method":"GET","proto":"HTTP/1.1","remote":"172.18.0.1:35092","scheme":"http","uri":"http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8"} res={"bytes":31,"elapsed":22.711615,"status":500,"time":"Sun, 05 Dec 2021 12:08:20 UTC"}
config.yaml file :
# allow debug outputs
debug: true
# mount debug pprof endpoint at /debug/pprof/
pprof: true
# bind server to IP:PORT (use :8888 for all connections)
bind: localhost:8080
# serve static files from this directory (optional)
static: /var/www/html
# TODO: issue #4
proxy: true
# For live streaming
streams:
cam: rtmp://localhost/live/cam
ch1_hd: http://localhost:9981/stream/channelid/85
ch2_hd: http://localhost:9981/stream/channelid/43
# For static files
vod:
# Source, where are static files, that will be transcoded
media-dir: ./media
# Temporary transcode output directory, if empty, default tmp folder will be used
transcode-dir: ./transcode
# Available video profiles
video-profiles:
360p:
width: 640 # px
height: 360 # px
bitrate: 800 # kbps
540p:
width: 960
height: 540
bitrate: 1800
720p:
width: 1280
height: 720
bitrate: 2800
1080p:
width: 1920
height: 1080
bitrate: 5000
# Use video keyframes as existing reference for chunks split
# Using this might cause long probing times in order to get
# all keyframes - therefore they should be cached
video-keyframes: false
# Single audio profile used
audio-profile:
bitrate: 192 # kbps
# If cache is enabled
cache: true
# If dir is empty, cache will be stored in the same directory as media source
# If not empty, cache files will be saved to specified directory
cache-dir: ./cache
# Use custom ffmpeg & ffprobe binary paths
ffmpeg-binary: ffmpeg
ffprobe-binary: ffmpeg
# For proxying HLS streams
hls-proxy:
my_server: http://localhost:9981
what should i do for index.m3u8 file for a mp4?
from go-transcode.
Any document for this module?
from go-transcode.
Yes, adding usage examples for all modules would be needed.
Quick question, do you have ffmpeg installed? If it cannot preload metdata, it might be because of missing ffmpeg. Or do you use docker image?
And you say your files are in /media
but in config it is ./media
. Is that expected?
from go-transcode.
Thanks
ffmpeg installed before
i used your docker-compose for build
I think its about my media-dir: /media
i use /media
directory for videos. what should i put in config.yaml
-> media-dir: -----
from go-transcode.
If you use /media
, then media-dir: /media
should be the correct entry.
from go-transcode.
still problem exist
from go-transcode.
Your config file is mounted as volume to docker, right? And after changing it you restarted the container and it does not work, correct?
from go-transcode.
absolutely yes
and this is my /media
directory.
from go-transcode.
Can you try to execute ffprobe
on that file inside container, to rule out all permissions issues?
Something like this:
docker-compose exec go-transcode ffprobe /media/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4
from go-transcode.
could not find the file from inside docker
from outside container it works
from go-transcode.
Is it mounted correctly? With - ./media:/media
.
version: "3"
services:
go-transcode:
build: . # path to go-transcode repository
container_name: go-transcode
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./config.yaml:/app/config.yaml
- ./media:/media
command: serve -d
UPDATE: or - /media:/media
.
from go-transcode.
ffprobe
fixed
when i correct my docker-compose
but the URL -> http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8
still dosn't return anything
docker-compose logs -f
go-transcode | 1:17PM WRN unable to preload metadata error="unable probe media for metadata: exit status 1" module=hlsvod
go-transcode | 1:17PM DBG request complete (500) module=http req={"agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","id":"d03e06e9d058/03MFNWvPjp-000002","method":"GET","proto":"HTTP/1.1","remote":"172.18.0.1:56356","scheme":"http","uri":"http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8"} res={"bytes":31,"elapsed":22.090266,"status":500,"time":"Sun, 05 Dec 2021 13:17:36 UTC"}
go-transcode | 1:17PM INF fetching metadata module=hlsvod submodule=manager
from go-transcode.
from go-transcode.
No problem dear.
i change it
but still same problem
from go-transcode.
It looks like, error persists and ffmpeg is still called (because of the show_format
error). Could you try to recreate your container, to be sure, changes were applied?
from go-transcode.
and ffprobe
error not show
there is another error :)
from go-transcode.
Added usage examples.
from go-transcode.
Thanks bro.
I pulled last changes and problem fixed.
but this url -> http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8
not retun completly manifest file
and of course using `ffplay` . return err
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/index.m3u8: Invalid data found when processing input
from go-transcode.
Thanks for adding usage examples :)
please add usage example for profile or multi probile/bitrate manifest.
and how can add new profile or change current profile
from go-transcode.
If the master playlist is empty, that can mean, your video resolution is lower than the lowest profile. You can try to get the profile directly. E.g. http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/360p.m3u8
and it should work.
I consider adding the lowest profile all the time, because it should never return empty playlist.
from go-transcode.
Thanks
It play when i using to get all of this urls
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/360p.m3u8
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/720p.m3u8
http://localhost:8080/vod/4f9c8335-90b1-4551-a59d-7534bc553057_360.mp4/1080p.m3u8
but i need the master file.
how could i get the master file?
from go-transcode.
What is the resolution of the video? There is also no point in upscaling, if it is not 1080p. I can though leave at least the lowest one in all cases.
from go-transcode.
i use a 1080 video -> http://localhost:8080/vod/17bb20ab-4028-4e2f-acb4-619e4d79c8da_1080.mp4/index.m3u8
the output is like :
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=945000,RESOLUTION=640x360,NAME=360p
360p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1995000,RESOLUTION=960x540,NAME=540p
540p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3045000,RESOLUTION=1280x720,NAME=720p
720p.m3u8
why 1080 profile not in index file?
how could i config these.
from go-transcode.
and how about subtitles?
how could i add subtitle track?
from go-transcode.
why 1080 profile not in index file?
It looks like a bug, I'll look into this. It should be visible.
I hope your team write powerful document for this module.
My team consist of only me right now. Contributors are welcomed. This module is experimental now and thanks to the people who use it and give me feedback, like you, I can catch lots of bugs and make it better for everyone.
and how about subtitles?
That is on roadmap. Hopefully soon will be supported.
from go-transcode.
Related Issues (20)
- 2nd+ streams lead to errors that can cause some players to not work. HOT 12
- Some freezes with static files HOT 28
- Error on probe HOT 1
- Closing ffmpeg when isn't used HOT 4
- ffprobe cache HOT 9
- Custom m3u8 for map audio HOT 5
- Problem in the first segment in ffmpeg HOT 4
- add HLS decryptor
- static file access HOT 8
- Unrecognized option 'hls_wrap' from ffmpeg HOT 3
- Ffmpeg does not force key frames as expected HOT 6
- Add hardware acceleration support for static files HOT 2
- Questions on simultaneous ffmpeg processes (NVENC job concurrency) and segment buffering behavior HOT 8
- hlsvod: add cleanup strategy
- hlsvod: add NVIDIA GPU support
- Adaptiv Bitrates HOT 6
- Dreambox (Enigma2) as live Input HOT 2
- problem when accessing video from chrome or other browser: HOT 6
- Question: mp4 proxy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-transcode.