Opened 6 years ago

Closed 6 years ago

#6973 closed defect (invalid)

Wiki example missing option

Reported by: eus Owned by:
Priority: normal Component: wiki
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

This wiki entry https://trac.ffmpeg.org/wiki/Concatenate#protocol has the following example:

mkfifo temp1 temp2
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp1 2> /dev/null & \
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp2 2> /dev/null & \
ffmpeg -f mpegts -i "concat:temp1|temp2" -c copy -bsf:a aac_adtstoasc output.mp4

I am using Ubuntu 16.04 with its stock ffmpeg and the given example does not work because temp1 and temp2 are existing files, and so, ffmpeg refuses to run on input1.mp4 and on input2.mp4 due to ffmpeg having to overwrite existing files.

The solution is to add -y switch to the first two ffmpeg commands as follows:
mkfifo temp1 temp2
ffmpeg -y -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp1 2> /dev/null & \
ffmpeg -y -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp2 2> /dev/null & \
ffmpeg -f mpegts -i "concat:temp1|temp2" -c copy -bsf:a aac_adtstoasc output.mp4

Could the example in the wiki be revised, please? Thank you.

Change History (1)

comment:1 by Carl Eugen Hoyos, 6 years ago

Resolution: invalid
Status: newclosed

I don't think this is good change but the wiki is a wiki, please make whatever changes you think improve the documentation.

Note: See TracTickets for help on using tickets.