[FFmpeg-trac] #3716(undetermined:new): ffmpeg can't seek to start of a mpeg video

FFmpeg trac at avcodec.org
Thu Jun 12 01:45:59 CEST 2014


#3716: ffmpeg can't seek to start of a mpeg video
-------------------------------------+-------------------------------------
             Reporter:  hxuanyu      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  mpegps seek  |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by hxuanyu):

 below is the command and output


 == $ ffmpeg.exe -i "numbers fps 25.mp4" 25.mpg ==

 ffmpeg version N-63861-g958168d Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jun  9 2014 22:02:00 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
 --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-librtmp --enable-libschroedinger --enable-
 libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
 libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
 libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-
 libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-
 decklink --enable-zlib
   libavutil      52. 89.100 / 52. 89.100
   libavcodec     55. 66.100 / 55. 66.100
   libavformat    55. 42.101 / 55. 42.101
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  7.100 /  4.  7.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'numbers fps 25.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.21.102
   Duration: 00:00:20.00, start: 0.000000, bitrate: 205 kb/s
     Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 /
 0x31637661), yuv444p, 768x576, 203 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
 (default)
     Metadata:
       handler_name    : VideoHandler
 [mpeg @ 03bf0060] VBV buffer size not set, using default size of 130KB
 If you want the mpeg file to be compliant to some specification
 Like DVD, VCD or others, make sure you set the correct buffer size
 Output #0, mpeg, to '25.mpg':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.42.101
     Stream #0:0(und): Video: mpeg1video, yuv420p, 768x576, q=2-31, 200
 kb/s, 25 fps, 90k tbn, 25 tbc (default)
     Metadata:
       handler_name    : VideoHandler
       encoder         : Lavc55.66.100 mpeg1video
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> mpeg1video (mpeg1video))
 Press [q] to stop, [?] for help
 [mpeg1video @ 03b59020] warning, clipping 1 dct coefficients to -255..255
     Last message repeated 68 times
 frame=  500 fps=455 q=31.0 Lsize=    1306kB time=00:00:19.96 bitrate=
 536.0kbits/s
 video:1292kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 1.097117%

 Alex at vid003 ~/Downloads/image

 == $ ffmpeg.exe -ss 0 -i 25.mpg 25.mp4 ==

 ffmpeg version N-63861-g958168d Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jun  9 2014 22:02:00 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
 --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-librtmp --enable-libschroedinger --enable-
 libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
 libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
 libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-
 libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-
 decklink --enable-zlib
   libavutil      52. 89.100 / 52. 89.100
   libavcodec     55. 66.100 / 55. 66.100
   libavformat    55. 42.101 / 55. 42.101
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  7.100 /  4.  7.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mpeg, from '25.mpg':
   Duration: 00:00:19.96, start: 0.540000, bitrate: 536 kb/s
     Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p(tv), 768x576 [SAR 1:1
 DAR 4:3], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
 [libx264 @ 03c1ff40] using SAR=1/1
 [libx264 @ 03c1ff40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
 AVX
 [libx264 @ 03c1ff40] profile High, level 3.1
 [libx264 @ 03c1ff40] 264 - core 142 r2431 ac76440 - H.264/MPEG-4 AVC codec
 - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options:
 cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, mp4, to '25.mp4':
   Metadata:
     encoder         : Lavf55.42.101
     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p,
 768x576 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc
     Metadata:
       encoder         : Lavc55.66.100 libx264
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg1video (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 frame=  488 fps=241 q=-1.0 Lsize=     930kB time=00:00:19.92 bitrate=
 382.6kbits/s
 video:924kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.659663%
 [libx264 @ 03c1ff40] frame I:2     Avg QP:10.80  size:  7639
 [libx264 @ 03c1ff40] frame P:205   Avg QP:21.40  size:  2429
 [libx264 @ 03c1ff40] frame B:281   Avg QP:27.19  size:  1539
 [libx264 @ 03c1ff40] consecutive B-frames: 21.9%  0.8%  9.2% 68.0%
 [libx264 @ 03c1ff40] mb I  I16..4: 62.9% 34.0%  3.2%
 [libx264 @ 03c1ff40] mb P  I16..4:  2.5%  5.9%  0.9%  P16..4:  3.9%  2.0%
 0.9%  0.0%  0.0%    skip:83.9%
 [libx264 @ 03c1ff40] mb B  I16..4:  0.9%  2.5%  0.4%  B16..8:  8.9%  2.6%
 0.4%  direct: 0.3%  skip:84.0%  L0:57.5% L1:40.4% BI: 2.1%
 [libx264 @ 03c1ff40] 8x8 transform intra:62.0% inter:67.5%
 [libx264 @ 03c1ff40] coded y,uvDC,uvAC intra: 16.0% 0.0% 0.0% inter: 2.0%
 0.0% 0.0%
 [libx264 @ 03c1ff40] i16 v,h,dc,p: 68% 27%  5%  0%
 [libx264 @ 03c1ff40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 15% 61%  3%  1%
 1%  1%  1%  1%
 [libx264 @ 03c1ff40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 31% 29%  2%  2%
 2%  2%  2%  2%
 [libx264 @ 03c1ff40] i8c dc,h,v,p: 100%  0%  0%  0%
 [libx264 @ 03c1ff40] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 03c1ff40] ref P L0: 59.6%  4.7% 17.0% 18.7%
 [libx264 @ 03c1ff40] ref B L0: 64.9% 26.4%  8.7%
 [libx264 @ 03c1ff40] ref B L1: 84.1% 15.9%
 [libx264 @ 03c1ff40] kb/s:387.65

 Alex at vid003 ~/Downloads/image

 == $ ffmpeg.exe -i 25.mp4 -f image2 image-%3d.jpeg ==

 ffmpeg version N-63861-g958168d Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jun  9 2014 22:02:00 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
 --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-librtmp --enable-libschroedinger --enable-
 libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
 libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
 libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-
 libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-
 decklink --enable-zlib
   libavutil      52. 89.100 / 52. 89.100
   libavcodec     55. 66.100 / 55. 66.100
   libavformat    55. 42.101 / 55. 42.101
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  7.100 /  4.  7.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '25.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.42.101
   Duration: 00:00:19.52, start: 0.480000, bitrate: 390 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 768x576 [SAR 1:1 DAR 4:3], 387 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
 (default)
     Metadata:
       handler_name    : VideoHandler
 [swscaler @ 02a3f360] deprecated pixel format used, make sure you did set
 range correctly
 Output #0, image2, to 'image-%3d.jpeg':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.42.101
     Stream #0:0(und): Video: mjpeg, yuvj420p, 768x576 [SAR 1:1 DAR 4:3],
 q=2-31, 200 kb/s, 25 fps, 90k tbn, 25 tbc (default)
     Metadata:
       handler_name    : VideoHandler
       encoder         : Lavc55.66.100 mjpeg
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (mjpeg))
 Press [q] to stop, [?] for help
 frame=  488 fps=217 q=24.8 Lsize=N/A time=00:00:19.52 bitrate=N/A
 video:5772kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown


 == Then we can see the img-001.jpeg is not the first frame we want ==

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3716#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list