Search code examples
joinyoutube-apimultipart

Uploading multi-part videos as a single file?


I've got videos ( FLV ) set to split once they reach a certain filesize/length due to storage constraints, but I can't find a simple way to concatenate these files on the fly to upload them.

Currently it's looking like I'll have to concatenate the files using something like ffmpeg into an intermediary file and then uploading that, however that is rather intensive on resources and it would be much simpler if I could just tweak data in the stream I'm sending to youtube so the first file never "ends" and the next file can just be read in ( modified as it's read so it doesn't break ), and then youtube would "solidify" it when it processes the video.

So the question remains, is there any way to do this, or is the FLV file format ( wowza / flash video ) a bane to my plans?


Solution

  • No, there's no way to do that. You need to concatenate them first, and you need to specify the length of the entire video at the start of the upload (i.e. you can't just stream video bytes without knowing in advance the total upload size).