Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

Which video format allows concatenation simply by joining files?

cat out1.mp4 ou2.mp4 >out.mp4

These videos are created from images using ffmpeg:

ffmpeg -loop 1 -f image2 -i image.png -s 640x480 -vcodec libx264 -t 30 -y out.mp4

If you can give me a running example it'd be great.

share|improve this question
    
what does this have to do with signal processing? –  user13107 Aug 7 '13 at 1:27
    
It uses ffmpeg, and to be able to save processing/computational time I'm asking about suitable codecs to be used in ffmpeg. (x264, mjpeg,..) –  Dzung Nguyen Aug 7 '13 at 1:39
add comment

migrated from dsp.stackexchange.com Aug 7 '13 at 3:33

This question came from our site for practitioners of the art and science of signal, image and video processing.

1 Answer

up vote 0 down vote accepted

From FFmpeg FAQ:

A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to concatenate video by merely concatenating the files containing them.

Hence you may concatenate your multimedia files by first transcoding them to these privileged formats, then using cat command (or copy under Windows), and finally transcoding back to your format of choice.

ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg
ffmpeg -i input2.avi -qscale:v 1 intermediate2.mpg
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi
share|improve this answer
    
If I want to keep image quality, I have to use mpeg with high bitrate which both create big intermediate files and time consuming. Which settings should I choose to save processing time? –  Dzung Nguyen Aug 7 '13 at 18:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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