[FFmpeg-user] Reset Timestamps for mp4 Video Segments

Jeremy Whitaker jeremywhitaker91 at gmail.com
Tue Jan 22 23:40:42 CET 2013

This worked for me as well. For the -vcodec option, I used mpeg4 instead of
libx264, and there were no pauses between the resulting mp4 video segments:

ffmpeg -f video4linux2 -t 20 -i "/dev/video0" -vcodec mpeg4 -b:v 500k
-r 29.97 -qscale 2 -f segment -map 0 -segment_time 5
-reset_timestamps 1 output%01d.mp4

This command captures 4 mp4 video segments called "output[1-4].mp4," that
can play consecutively in VLC without any pauses. Thank you so much for
your help.

Jeremy Whitaker

On Thu, Jan 17, 2013 at 1:26 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Jeremy Whitaker <jeremywhitaker91 <at> gmail.com> writes:
> > it seems like the option "-reset_timestamps" was added
> > in to address this exact issue.
> > Unfortunately, when I try this option I get an error
> > saying that the PTS is less than ( < ) the DTS.
> I tested this here with a random input sample and
> -vcodec mpeg4 and it works fine (including vlc playback),
> please test without external libraries (x264) and report
> back.
> Carl Eugen
> $ ffmpeg -i input -vcodec mpeg4 -qscale 2 -an -f segment
> -map 0 -reset_timestamps 1 out%2d.mov
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

More information about the ffmpeg-user mailing list