[FFmpeg-trac] #3697(undetermined:new): H264/MPEGTS avg_frame_rate inconsistencies
FFmpeg
trac at avcodec.org
Tue Jun 3 20:25:00 CEST 2014
#3697: H264/MPEGTS avg_frame_rate inconsistencies
-------------------------------------+-------------------------------------
Reporter: bog | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When transcoding h264 in mp4 with non-whole frame rates to mpegts and
back, the avg_frame_rate and packet duration is altered. This can be
problematic when concatenating multiple mp4s with the concat protocol with
the same settings because the avg_frame_rate is not normalized.
How to reproduce:
I'm working with this ffmpeg:
{{{
ffmpeg version N-63724-g5766543 Copyright (c) 2000-2014 the FFmpeg
developers
built on Jun 3 2014 07:41:35 with Apple LLVM version 5.1
(clang-503.0.40) (based on LLVM 3.4svn)
configuration: --enable-gpl --enable-postproc --disable-debug --enable-
libmp3lame --enable-libfdk_aac --enable-pthreads --enable-libx264
--enable-libvpx --enable-nonfree --enable-libass --enable-libfreetype
--enable-static --extra-libs=-ldl
}}}
The file below is 23.976fps content. avg_frame_rate reported by ffprobe is
2997/125. The pkt_duration_time is 0.041708.
{{{
ffmpeg -i http://ted.conferences.s3.amazonaws.com/test/outro.mp4 -c copy
-bsf:v h264_mp4toannexb -f mpegts test.ts
ffprobe -show_streams -select_streams v:0 test.ts 2>/dev/null | grep
avg_frame_rate
}}}
ffprobe outputs: avg_frame_rate=24000/1001. I think this change is ok, but
I wanted to include it. The video pkt_duration_time is now 0.041700.
Next, we transcode the video back to mp4:
{{{
ffmpeg -i test.ts -c copy -bsf:a aac_adtstoasc test.mp4
ffprobe -show_streams -select_streams v:0 test.mp4 2>/dev/null | grep
avg_frame_rate
}}}
ffprobe outputs: avg_frame_rate=10980000/457957. The video
pkt_duration_time is still 0.041700.
The avg_frame_rate is different for each file I bring through this
process.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3697>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list