K
K
karenishe2012-07-20 19:25:35
Video
karenishe, 2012-07-20 19:25:35

How to cut a video into pieces, transcode with ffmpeg and assemble into a final file?

Let's imagine that a user uploads a 4Gb video to a website. You can wait for the end of its upload and start encoding into the desired format.

And you can cut off pieces of video as the upload progresses, encode them separately, possibly using several servers, and then assemble them into the final result.

Question about the second option: does anyone know how?

PS: it's important to be able to transcode any video that ffmpeg can transcode without splitting it into chunks.
PPS: .mp4 (h264) file is needed as a result.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Borisovich, 2012-07-20
@Alexufo

If you are uploaded an mp4 file that has information about the container only at the end of the file, then what the hell are you going to do with binary information, there is no information about anything. Even if you manage to encode the file, the essence of the h264 codec is in bi-frames, where frames are encoded through. A package of pictures of 24 pieces is taken, then the pixel movement vectors are calculated - the static ones remain in place and a whole lot more ... You are on the gluing if you don’t get glitches in the sound, then the squares in the picture are for sure. This is basically a violation of the h264 algorithm logic, which is what you want. If you want to code quickly, use cool hardware and sharpened algorithms for it. The same cuda technology will give a huge increase.

A
Alexander Borisovich, 2012-07-20
@Alexufo

how does youtube you go to say? as it uploads, it starts encoding ... well, how about it ... study ffmpeg completely and it will be clear whether it is real or not

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question