Open koraa opened 6 years ago
I am posting this for a friend who doesn't have a github account:
"This would be wonderful! I download youtube vidoes as youtube-dl -f worstvideo+worstaudio http://somelink.com/vid-id
and being able to 'preview' them while downloading would make things better in two ways:
Regarding the OP feature request, I think is a wonderful idea. The merging stage may be difficult to coordinate due is performed by a separate program (ffmpeg), but +1 for the concurrent download of video and audio streams.
@dstftw do you think it's possible to implement? (concurrent download for separate streams)
Anyone still working on this? Even merging could be in parallel using pipes like this
mkfifo temp1 temp2
ffmpeg -y -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp1 2> /dev/null & \
ffmpeg -y -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp2 2> /dev/null & \
ffmpeg -f mpegts -i "concat:temp1|temp2" -c copy -bsf:a aac_adtstoasc output.mp4
Just instead of the upper two ffmpeg commands, you would stream the download of the files into the pipes. This also avoids creating any intermediate files.
Source: https://trac.ffmpeg.org/wiki/Concatenate#Usingnamedpipestoavoidintermediatefiles
See Parallel youtube-dl.
The lack of interest in this feature qualifies as a paranormal event.
For some sites, audio and video is downloaded separately. First the video, then the audio. During post processing both files are merged.
It would be nice, if all three of those processes could run in parallel, since this would allow users to start playing back the video before the download has completed.