Why does FFmpeg segment_times create webm files with incorrect duration and start times?

2

I have a MOV file that I want to split into several smaller files (at certain timestamps in a comma-separated list). I'm simultaneously compressing the video into WEBM files.

The command I'm using is:

ffmpeg -i original.mov -map_metadata -1 -map 0 -c:v libvpx -crf 10 -qmax 40 -b:v 2.5M -cpu-used 16 -n -force_key_frames "00:00:02.481,00:04:25.907,00:06:26.712" -f segment -segment_times "00:00:02.481,00:04:25.907,00:06:26.712" "output_%03d.webm" 2> logfile.log

This works, and the resulting WEBM files play fine in Windows Media Player, but their metadata have incorrect 'duration' and 'start' values, so embedding them in HTML5 gets messed up. (The HTML5 video player thinks that the videos are longer than they really are and that they have a delayed start.)

What am I doing wrong?

Ryan

Posted 2014-03-13T18:28:46.057

Reputation: 959

Answers

2

-reset_timestamps [1|0]

Reset timestamps at the begin of each segment, so that each segment will start with near-zero timestamps. It is meant to ease the playback of the generated segments. May not work with some combinations of muxers/codecs. It is set to 0 by default.

Source

antono

Posted 2014-03-13T18:28:46.057

Reputation: 21