[FFmpeg-user] How can I get byte-accurate segments?

Paul B Mahol onemda at gmail.com
Fri Feb 12 18:01:57 CET 2016


On 2/12/16, Grant Curtis <codercurtis at gmail.com> wrote:
> Thanks. Some more details:
>
> I begin with an rtmp stream and segment it like this:
>
> ffmpeg -i "[rtmp url]" -ar 16000 -f segment -segment_time 10 out%04d.wav
>
> I think part of my problem is that I'm adding in .wav headers by specifying
> this file type. To start out on the right foot, I should use .raw, right?
>
> I attempted to use .raw by doing this:
>
> ffmpeg -i "[rtmp url]" -map 0:1 -ar 16000 -segment_time 5 -acodec pcm_s16le
> out%04d.raw
>

ffmpeg -i "[rtmp url]" -map 0:1 -af aresample=16000,asetnsamples=16000
-f segment -segment_time 5 -segment_format wav out%04d.wav

> But then that command creates ~200 files for 5 seconds of recording no
> matter what I set -segment_time to. What did I do wrong here?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list