1

if this is the wrong place to post this let me know.

I want to download a very large video (9.1GiB) from youtube on my device and I have ~10GB free storage space for it.
Because it's youtube, I have to download video and audio separately and combine them afterwards. I'd normally do that using ffmpeg. I'd have to let it create the combined video in a new ~9.1GiB file because it can't overwrite it's input. The video only file of similar size must exist during the whole process.
Problem is: I can't store 2 9.1GiB files, only one.

The possible solutions would be to edit the video only file to have an audio stream or have a super intelligent buffer system that'd delete the parts of the video only file that have already been copied into the new file.

Is there any program that is capable of doing that or do you know a different solution to this problem?
-Atemu

(Sorry for my bad german)

  • There's no way to combine two files without making a third file, at least temporarily. But I don't understand why you think you need to do this -- surely you can just download one combined A/V file? – Jim Mack Sep 28 '16 at 21:08
  • Everything above 720p 30fps h264 .mp4 and vp8 .webm is stored as DASH video and audio only files on youtube. Run youtube-dl -F someyoutubevideolink if you want to ccheck for yourself. – Atemu Sep 29 '16 at 16:59
  • Using a tool like JDownloader 2 I seem to be able to d/l any video as a combined A/V file. Maybe I haven't encountered the files you're referring to: can you provide a specific link? – Jim Mack Sep 29 '16 at 17:17
  • any youtube video that is in full HD or higher youtube.com/watch?v=iNJdPyoqt8U. I'm guessing JDownloader combines them automatically – Atemu Sep 30 '16 at 16:29
  • Nope, works fine as is. There's a direct link to the 2160p .MP4 file. It's 667 MB in size. Try JDownloader 2, it's free. – Jim Mack Sep 30 '16 at 18:05
1

I found a solution to my problem:

Ffmpeg can use a http stream as input:

ffmpeg -i YoutubeVideoOnlyURLHere -i YoutubeAudioOnlyURLHere -c copy -map 0:0 -map 1:0 Path/to/outputFile.mp4

You can get the needed URLs from
youtube-dl -f bestvideo,bestaudio --get-url https:www.youtube.com/watch?v=XXXXXXXXXXX

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.