Search code examples
videoavconv

How to merge videos by avconv?


I have several chunks in folder.

0001.mp4
0002.mp4
0003.mp4
...
0112.mp4

I would like to merge them into full.mp4

I tried to use:

avconv -f concat -i <(printf "file '%s'\n" /root/chunk/*.mp4) -y \
-c copy /root/test/full.mp4

Unknown input format: 'concat'

avconv -f concat -i <(printf "%s|" /root/chunk/*.mp4) -y \
-c copy /root/test/full.mp4

Unknown input format: 'concat'

avconv -i concat:`ls -ltr /root/chunk/*.mp4 | awk 'BEGIN {ORS="|"} { print $9 }'` \
 -c:v copy -c:a copy /root/test/full.mp4

In last edition only one input file was catched to output.

How to merge all chunks from folder into full video?

I don't want to use ffmpeg or other. Avconv only.


Solution

  • avconv -i concat:file1.mp4\|file2.mp4 -c copy output.mp4
    

    I don't know if works with any container's type ( worked for me with AVI ).