[FFmpeg-user] Use concat demuxer with input format

Nicolas George george at nsup.org
Sun Jul 16 10:22:30 EEST 2017


Le septidi 27 messidor, an CCXXV, Hans Carlson a écrit :
>   $ ffmpeg -f s16le -ac 2 -f concat -i concat-raw.txt ...
> or
>   $ ffmpeg -f concat -f s16le -ac 2 -i concat-raw.txt ...
> 
> I've tried both and it doesn't work, so I assume it's either not supported
> or I'm doing something wrong.

That cannot work, the second -f option is just overriding the first one.

You would need to specify the format and options in the concat script
itself, as they could be different for each file. But it is not
implemented yet.

> To back up a little, I'm trying to concat parts of several PCM files.

Then you have it easy.

Since PCM is just a sequence of uncompressed samples, you can use the
concat PROTOCOL to join them, and the subfile protocol to extract part
of them. You just need a little arithmetic to convert from timestamp to
octet offset.

Since PCM is lossless, you can use the concat FILTER to join them, and
the trim filter (possibly implicitly with -ss and -t) to extract a part.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170716/55b7c37d/attachment.sig>


More information about the ffmpeg-user mailing list