Saturday, 31 August 2013

How to merge videos by avconv?

How to merge videos by avconv?

I have several chunks in folder.
0001.mp4
0002.mp4
0003.mp4
...
0112.mp4
I would like to join them into full video.mp4
I tried to use
avconv -i "concat:`ls -l /root/chunk/ | awk 'BEGIN {ORS="|"} { print $9
}'`" \
-c:v copy -c:a copy /root/test/2.mp4
but I have error
concat:|0000.mp4|0001.mp4|0002.mp4|0003.mp4|0004.mp4|0005.mp4|0006.mp4|\
0007.mp4|0008.mp4|0009.mp4|0010.mp4|0011.mp4|0012.mp4|0013.mp4|0015.mp4|\
0016.mp4|0017.mp4|0018.mp4|0019.mp4|: No such file or directory
After I tried
avconv -i
"concat:/root/chunk/0000.mp4|/root/chunk/0001.mp4|/root/chunk/0002.mp4"
\
-c:v copy -c:a copy /root/test/2.mp4
but 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.

No comments:

Post a Comment