I have been using ffmpeg in order to download content from a streaming source into an mp4 file while converting the format to a smaller size (480P).
Then when the download finishes I can view the content by playing the downloaded file.
I have scripted it on a Linux server (no GUI there) so the downloads can be done unattended on off hours and viewed later (time zone differences).
Now I wonder if there is a way to convert the download to something that can be viewed in real time as it is being recorded?
If I set the target to a ts file instead of mp4, can it then be viewed while the download goes on?
My current command in the script file looks like this:
where:Code:CMD="ffmpeg -hide_banner -loglevel warning -referer \"${VIDEOURL}\" -i \"${M3U8URL}\" -r 30 -vf scale=w=-4:h=480 -c:v libx264 -preset fast -crf 26 -x264-params keyint=30:scenecut=0:open-gop=0 -c:a aac -t ${CAPTURETIME} ${TARGETFILE}"
VIDEOURL is the source webpage which contains an embedded video player
M3U8URL is the stream URL for the video on that player
CAPTURETIME is the final video length in seconds
TARGETFILE is the name of the output mp4 fiile
How should I modify this command in order to make it produce a file that can be viewed at the same time the download runs?
I think that the mp4 format is not suited since such files need to have a "moov" part that can only be written at the end of a download when the file is closed for writing by ffmpeg.
So possibly converting into a ts file or similar would be a way?
Or is there a better way to do it where the output can be viewed as it is being created?
I use a web browser to connect to my Linux server to view the downloaded files, so something tah can be opened in a web browser would be the output I am after.
Any suggestion welcome.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 2 of 2
Thread
-
-
change to .ts
Code:CMD="ffmpeg -hide_banner -loglevel warning -referer \"${VIDEOURL}\" -i \"${M3U8URL}\" -r 30 -vf scale=w=-4:h=480 -c:v libx264 -preset fast -crf 26 -x264-params keyint=30:scenecut=0:open-gop=0 -c:a aac -f mpegts ${TARGETFILE}.ts"
Code:python3 -m http.server 8000
Similar Threads
-
View / Download Private YouTube Video
By takistexas in forum Video Streaming DownloadingReplies: 5Last Post: 6th Feb 2024, 06:29 -
Streaming video loop FFmpeg
By Daniquito in forum Video Streaming DownloadingReplies: 0Last Post: 20th Sep 2022, 14:10 -
can you download/view a video from a deleted tweet using Wayback Machine?
By mayimakeasuggestion in forum Video Streaming DownloadingReplies: 1Last Post: 4th Jul 2022, 06:14 -
youtube-dl FFmpeg script drag drop paste url download convert
By vaype_naysh in forum Newbie / General discussionsReplies: 0Last Post: 20th Sep 2021, 14:12 -
Is it possible to download dash mpd and convert into mp4 using ffmpeg?
By MonikaChen in forum Video Streaming DownloadingReplies: 4Last Post: 16th Feb 2021, 09:09