Reputation: 49
I tried to record a live stream video by this code. I add that code inside render.cmd
ffmpeg -i $(youtube-dl -f 95 -g https://www.youtube.com/watch?v=v2_knJ1RwlQ) -c copy render.ts
but i got this error $(youtube-dl: No such file or directory
anyone help me please
Upvotes: 4
Views: 14033
Reputation: 56
My answer is similar to @Daniel Taub Found an article to use youtube-dl with FFmpeg https://gist.github.com/mattiasghodsian/085586dd0e26f74c5cd66853259e16e9
I will just gist out things in it:
.\youtube-dl.exe --ffmpeg-location "ffmpeg/bin" -f 95 "https://www.youtube.com/watch?v=v2_knJ1RwlQ"
Upvotes: 0
Reputation: 153
Looks, like no path to youtube-dl try check this:
youtube-dl --external-downloader
Currently aria2c,avconv,axel,curl,ffmpeg,httpie and wget are supported.
For example,
youtube-dl -f 93 --external-downloader ffmpeg --external-downloader-args\
"-hide_banner -reconnect 1 -reconnect_at_eof 1 \
-reconnect_streamed 1 -reconnect_delay_max 2 \
-fflags +genpts -user-agent proxy5 \
-c copy -sn -dn -hls_time 8 -hls_list_size 3000 \
-hls_wrap 80000 -hls_allow_cache 30 -hls_flags delete_segments i.m3u8" \
https://www.youtube.com/watch?v=8t3YhjKEYhw
or
ffmpeg -re -i $(youtube-dl -f 93 -g 8t3YhjKEYhw ) \
-hide_banner -reconnect 1 -reconnect_at_eof 1 \
-reconnect_streamed 1 -reconnect_delay_max 2 \
-fflags +genpts -user-agent proxy5 -c copy -sn -dn \
-hls_time 8 -hls_list_size 3000 -hls_wrap 80000 \
-hls_allow_cache 30 -hls_flags delete_segments i.m3u8
Upvotes: 0
Reputation: 5389
You need to use youtube-dl
tfor call fmpeg
youtube-dl -f 95 -g https://www.youtube.com/watch?v=v2_knJ1RwlQ --ffmpeg-location /path/to/ffmpeg
Upvotes: 1