Opened 7 years ago

Closed 6 years ago

#2350 closed enhancement (invalid)

PTS adjustment in FFmpeg

Reported by: ubitux Owned by:
Priority: wish Component: ffmpeg
Version: git-master Keywords: dts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


It is possible to adjust pts with the [a]setpts filters. Unfortunately, it requires re-encoding.

It would be handy if the timestamps could be adjusted at formats level only, so it would only require remuxing to, for instance, shift timestamps.

Such option would be similar to the -y option in mkvmerge. Using our eval system would provide advanced usage.

Change History (6)

comment:1 Changed 7 years ago by cehoyos

  • Keywords dts added
  • Priority changed from normal to wish
  • Version changed from unspecified to git-master

comment:2 Changed 7 years ago by ubitux

I wonder I could have missed the -itsoffset option, which allows the shift feature...

comment:3 Changed 7 years ago by ubitux

  • Resolution set to invalid
  • Status changed from new to closed

comment:4 Changed 6 years ago by pickles

  • Keywords bitstream added
  • Resolution invalid deleted
  • Status changed from closed to reopened

This would still be a very useful addition. In my case, for example, I need to change the PTS to a fixed rate of 25 frames per second and also change the audio timestamps by counting samples. I achieve this with -vf 'setpts=N/(25*TB)' -af 'asetpts=N/SR/TB' which works great, but, of course, it needs re-encoding, which is unnecessary and time consuming, especially as this is used via a server-side script.

A bitstream filter version of setpts/asetpts would be ideal. Is it even technically possible?

comment:5 Changed 6 years ago by pickles

  • Keywords setpts added; dts removed

comment:6 Changed 6 years ago by cehoyos

  • Keywords dts added; bitstream setpts removed
  • Resolution set to invalid
  • Status changed from reopened to closed

Please do not reopen ancient tickets.
There is a user mailing list, the input option -r and you can open a new ticket if you want to report a deficiency of this option.
Don't forget to test current FFmpeg git head and to provide a command line together with the complete, uncut console output.

Note: See TracTickets for help on using tickets.