0

Problem:

I have a source media and used ffprobe to inspect the audio track for pts_time and the start time, and it looks fine as below

ffprobe -v 0 -show_packets -select_streams audio [source_media].mp4 | grep 'pts_time' | head

pts_time=0.023220
pts_time=0.046440
pts_time=0.069660
pts_time=0.092880
pts_time=0.116100
pts_time=0.139320
pts_time=0.162540
pts_time=0.185760
pts_time=0.208980

However, after I transcoded it using the following ffmpeg command, the start time of the audio track became negative and it causes playback issue on Tizen3

ffmepg -c:v libx264 -vf scale=320x180,setdar=16/9 -crf 22 -maxrate 172k -bufsize 236k -pix_fmt yuv420p -profile:v main -level 3.0 -refs 3 -r 25 -force_key_frames expr:gte\(t,n_forced*2\) -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 -movflags +faststart -threads 0 -y.

If using ffprobe to inspect it, it has 2 packets at the beginning that have negative pst_time which ended up the negative start time

ffprobe -v 0 -show_packets -select_streams audio [transcoded_video].mp4 | grep pts_time | head

pts_time=-0.046440
pts_time=-0.023220
pts_time=0.000000
pts_time=0.023220
pts_time=0.046440
pts_time=0.069660
pts_time=0.092880
pts_time=0.116100
pts_time=0.139320
pts_time=0.162540

Questions:

  1. why ffmpeg changes the start time of the audio track?
  2. Is it valid that a track can start with negative timestamp? what does it even mean?
  3. Adding -avoid_negative_ts make_zero or -avoid_negative_ts make_non_negative to the ffmpeg command seems to be able to fix up the playback issue on Tizen3, however, what does it mean and what the implication of them respectively

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.