[FFmpeg-user] How to change PTS in MPG files?

linxs linxsy at gmail.com
Sat Feb 27 03:54:44 CET 2016


Dear Sir,

I have a trouble about setting PTS of video and audio of MPEG-2 mpg file.
I use setpts and asetpts as following commands:

ffmpeg -i INPUTVIDEO -vf "setpts="setpts=PTS-STARTPTS-1/TB" -af
"asetpts=PTS+0.010/TB" -c:v mpeg2video -b:v 10M -c:a mp2 -b:a 384k
-y OUT1.mpg
ffmpeg -i INPUTVIDEO -vf "setpts="setpts=PTS-STARTPTS-0.27/TB" -af
"asetpts=PTS+0.010/TB" -c:v mpeg2video -b:v 10M -c:a mp2 -b:a 384k
-y OUT2.mpg

Then I check the PTSs in OUT1.mpg and OUT2.mpg, I found they are the same.

Can anybody help me to change the PTS in MPG file?

Thanks!

Best regards!


More information about the ffmpeg-user mailing list