Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
178 views
in Technique[技术] by (71.8m points)

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'
" /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.

question from:https://stackoverflow.com/questions/18552901/how-to-merge-videos-by-avconv

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
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 ).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...