[FFmpeg-trac] #933(undetermined:new): A/V desynch when transcoding A/V files with timestamps non starting from 0 with -copyts

FFmpeg trac at avcodec.org
Mon Jan 23 20:11:09 CET 2012


#933: A/V desynch when transcoding A/V files with timestamps non starting from 0
with -copyts
-------------------------------------+-------------------------------------
             Reporter:  saste        |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  timestamp    |               Resolution:
  desynch mpegts                     |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by mjs973):

 From what I can see in the code, -copyts does the right thing only when
 you also use '-acodec copy'. This command line works for me:

 ./ffmpeg -vsync 0 -copyts -i columbia-intro.ts -vcodec mpeg2video -b:v
 3000000 -acodec copy out.ts

 ...and the proper time offset between the first audio and video packets is
 maintained.

 So, the short answer is that ffmpeg (the app) doesn't yet support what you
 want to do.

 The more detailed answer is that, if you try to actually encode the audio
 stream, ffmpeg.c looks like it always calls avcodec_encode_audio*() with
 the avpkt.pts timestamp set to AV_NOPTS_VALUE. Later on, this will cause
 av_interleaved_write_frame() to make up timestamps, starting at 0.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/933#comment:5>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list