Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3667 closed enhancement (invalid)

Enhancement: concat can not directly work with mks or mp4

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

Description

For the sake of standardisation, would welcome to allow

ffmpeg -i "concat:part1.mkv|part2.mkv" -c copy output.mkv

This synthax already applies to other containers such as ogv,vob, mpg.
Ref:
https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files

Change History (4)

comment:1 Changed 5 years ago by cehoyos

  • Keywords mp4 mkv concat removed
  • Resolution set to invalid
  • Status changed from new to closed

This is not possible, the specification of some containers do not allow concatenation on file level.

comment:2 follow-up: Changed 5 years ago by artofit

https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20(join,%20merge)%20media%20files
"While the demuxer works at the stream level, the concat protocol works at the file level. Certain files (mpg and mpeg transport streams, possibly others) can be concatenated. This is analogous to using cat on UNIX-like systems or copy on Windows. In general, the demuxer is the better option."

So why this method is not deprecated??

Indeed, if I compare the 2 concat methods on a opus files, that I split, the orginal and the version of concate have differend MD5 signatures, eventhough opus like other support lossless concat.

comment:3 Changed 5 years ago by cehoyos

Assuming you have two input files input1 and input2, the following two commands are completely equivalent:

$ cat input1 input2 >input
$ ffmpeg -i input
$ ffmpeg -i "concat:input1|input2"

The advantage of using the concat protocol is that it saves you one line and the space for input on your harddrive. If the first command does not work because the container does not support concatenation, the second will also fail.

Please understand that this is a bug tracker, not a support forum, see https://ffmpeg.org/contact.html and https://ffmpeg.org/ffmpeg-formats.html#concat-1 and https://ffmpeg.org/ffmpeg-filters.html#concat

comment:4 in reply to: ↑ 2 Changed 5 years ago by cehoyos

Replying to artofit:

So why this method is not deprecated??

As you found out, there are file formats for which the concat protocol works fine.

Note: See TracTickets for help on using tickets.