I am trying to use yt-dlp to download live streaming video from a few sites, but when yt-dlp tries to find the m3u8 informatioin it exits after getting response "HTTP Error 403: Forbidden".
I am able to download using ffmpeg standalone but it is a mess dealing with all the ffmpeg arguments, so I would like to use yt-dlp instead.
If I do it with ffmpeg I have to add the arguments:
Can the same referer flag be applied to yt-dlp without setting the additional argumentCode:-referer <url> -i <actual m3u8 url> -t <timout in seconds>
Code:--downloader ffmpeg
+ Reply to Thread
Results 1 to 6 of 6
-
Last edited by BosseB; 12th Nov 2021 at 08:50.
-
Yes because I am using scripts to download 1 hour segments of a 24/7 stream using at jobs.
I can use timeout to force yt-dlp to quit after a set time (3600 s) but it leaves a .part video file, which then has to be converted to mp4.
But when I set yt-dlp to use ffmpeg as downloader I can also add the -t 3600 ffmpeg argument.
OTOH changing yt-dlp downloader will probably cause an issue with the arguments to use for the download, which yt-dlp is handling internally...
I am looking to simplify the rather complex scripting I have now where I code ffmpeg directly into something easier to use and understand, while at the same time producing the same end result.
As of now I have another script that runs immediately before the ffmpeg script starts and which digs out the m3u8 URL from the webpage and stuffs that into a file, which the main script reads to set the -referer and -i parameters respectively for ffmpeg.
Then follows conversion arguments to get the correct video size and quality etc. Pretty complex stuff.
PS: I got some help here as well as on the mail list as to how to do the ffmpeg coding. -
Originally Posted by LZAA
Code:yt-dlp --referer <url> <url> -o test.mp4
So I added an additional parameter to reduce the video size:
Code:yt-dlp -S 'res:500' --referer <url> <url> -o test.mp4
And the created videos are only 24 seconds in length!
So the ffmpeg -t argument has to be added to yt-dlp in order to fix this such that a longer (1 hour) download can be done from the live stream.
Otherwise yt-dlp is not usable.
Currently I have to use the --downloader ffmpeg argument to be able to set the length of the video but I lose control of the formatting and get huge video file sizes..
Instead I must continue using ffmpeg rather than yt-dlp, which means I have to dig out the m3u8 url separately using another script call first and read it from disk to be used in the main script using the ffmpeg call.
Similar Threads
-
Need help for download with yt-dlp
By sibhus in forum Video Streaming DownloadingReplies: 26Last Post: 19th Feb 2024, 15:02 -
YT-DLP History Channel
By intheory628 in forum Video Streaming DownloadingReplies: 2Last Post: 12th Oct 2021, 02:07 -
DLP Chip
By biferi in forum Newbie / General discussionsReplies: 1Last Post: 8th Apr 2021, 15:53 -
Can I add a 16:9 display flag into videos (.avi, .mpeg, etc)
By denghz in forum EditingReplies: 27Last Post: 12th Sep 2020, 07:29 -
How to run a stream that works with Referer in VLC?
By liplenny in forum Video Streaming DownloadingReplies: 1Last Post: 30th Jan 2018, 09:08