[FFmpeg-trac] #6482(avcodec:new): h264_videotoolbox encoder hardcodes SPS with 25fps

FFmpeg trac at avcodec.org
Fri Jun 23 01:46:48 EEST 2017


#6482: h264_videotoolbox encoder hardcodes SPS with 25fps
---------------------------------+--------------------------------------
             Reporter:  tmm1     |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  avcodec  |                  Version:  git-master
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+--------------------------------------
 Using a sample source that's 60fps:

 {{{
 $ ffmpeg -i sample.mpg
 Input #0, mpegts, from '/tmp/sample.mpg':
   Duration: 00:00:12.18, start: 62785.895789, bitrate: 10736 kb/s
   Program 1
     Stream #0:0[0xfed]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p(tv, bottom first), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions,
 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
 }}}

 Converting via libx264 or other encoder will emit an SPS with the correct
 timing information:

 {{{
 $ ffmpeg -i sample.mpg -c:v h264 -profile:v high -level 4.2 -map v -frames
 10 -y out-expected.h264

 $ h264_analyze out-expected.h264 | grep -A3 timing_info | head -4
  timing_info_present_flag : 1
    num_units_in_tick : 1001
    time_scale : 120000
    fixed_frame_rate_flag : 0

 $ ffmpeg -i out-expected.h264
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1
 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 1200k tbn, 119.88 tbc
 }}}

 But using videotoolbox hardcodes to 25fps:

 {{{
 $ ffmpeg -i sample.mpg -c:v h264_videotoolbox -profile:v high -level 4.2
 -map v -frames 10 -y out-vt.h264

 $ h264_analyze out-vt.h264 | grep -A3 timing_info | head -4
  timing_info_present_flag : 1
    num_units_in_tick : 10000
    time_scale : 500000
    fixed_frame_rate_flag : 1

 $ ffmpeg -i out-vt.h264
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1
 DAR 16:9], Closed Captions, 25 fps, 25 tbr, 1200k tbn, 50 tbc
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6482>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list