I am recording a live stream to .ts file. But when I run this file through ffmpeg using

ffmpeg -i myRecordedFile.ts

it gives me wrong start time which is way out of the range. For example, my file's duration is 45 minutes but ffmpeg returns start 18910.272911

enter image description here

Is there a way to change the start value of a video file?

1 Answer 1


FFmpeg is simply telling you the starting timestamp as parsed from the input. MPEG-TS is a transport stream format, used to convey television broadcasts..etc, having no global header, and can be sliced at ~arbitrary points. There are timestamp packets (PCR) at regular intervals, and ffmpeg is showing you the timestamp of the earliest packet.

If you want your TS to have a start time of 0, you'll have to remux it.

ffmpeg -i myRecordedFile.ts -map 0 -c copy -muxpreload 0 -muxdelay 0 newFile.ts

..but this is unnecessary.

  • 1
    I think ffmpeg will make the starting timestamp 0 even without -map and the mux* options, at least for single audio streams, unless you use -copyts.
    – jarno
    Oct 8, 2020 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.