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

FFmpeg trac at avcodec.org
Thu Jun 12 09:20:12 CEST 2014


#3716: ffmpeg can't seek to start of a mpeg video
-------------------------------------+-------------------------------------
             Reporter:  hxuanyu      |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  mpegps seek  |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  1
-------------------------------------+-------------------------------------
Changes (by cehoyos):

 * status:  new => open
 * version:  unspecified => git-master
 * reproduced:  0 => 1


Comment:

 The following shows the first frame (of the first gop):
 {{{
 $ ffmpeg -i out.mpg -vframes 1 out.jpg
 }}}
 The following commands output the first frame of the second gop:
 {{{
 $ ffmpeg -ss 0 -i out.mpg -vframes 1 out1.jpg
 ffmpeg version N-63912-g385a342 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jun 12 2014 08:57:31 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl
   libavutil      52. 89.100 / 52. 89.100
   libavcodec     55. 66.100 / 55. 66.100
   libavformat    55. 43.100 / 55. 43.100
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  8.100 /  4.  8.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 'out.mpg':
   Duration: 00:00:19.96, start: 0.540000, bitrate: 524 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
 [swscaler @ 0x3624380] deprecated pixel format used, make sure you did set
 range correctly
 Output #0, image2, to 'out1.jpg':
   Metadata:
     encoder         : Lavf55.43.100
     Stream #0:0: Video: mjpeg, yuvj420p, 768x576 [SAR 1:1 DAR 4:3],
 q=2-31, 200 kb/s, 25 fps, 90k tbn, 25 tbc
     Metadata:
       encoder         : Lavc55.66.100 mjpeg
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg1video (native) -> mjpeg (mjpeg))
 Press [q] to stop, [?] for help
 frame=    1 fps=0.0 q=7.3 Lsize=N/A time=00:00:00.52 bitrate=N/A
 video:15kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}
 {{{
 $ ffmpeg -ss 0.01 -i out.mpg -vframes 1 out2.jpg
 ffmpeg version N-63912-g385a342 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jun 12 2014 08:57:31 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl
   libavutil      52. 89.100 / 52. 89.100
   libavcodec     55. 66.100 / 55. 66.100
   libavformat    55. 43.100 / 55. 43.100
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  8.100 /  4.  8.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 'out.mpg':
   Duration: 00:00:19.96, start: 0.540000, bitrate: 524 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
 [swscaler @ 0x33fc380] deprecated pixel format used, make sure you did set
 range correctly
 Output #0, image2, to 'out2.jpg':
   Metadata:
     encoder         : Lavf55.43.100
     Stream #0:0: Video: mjpeg, yuvj420p, 768x576 [SAR 1:1 DAR 4:3],
 q=2-31, 200 kb/s, 25 fps, 90k tbn, 25 tbc
     Metadata:
       encoder         : Lavc55.66.100 mjpeg
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg1video (native) -> mjpeg (mjpeg))
 Press [q] to stop, [?] for help
 frame=    1 fps=0.0 q=7.3 Lsize=N/A time=00:00:00.52 bitrate=N/A
 video:15kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}

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


More information about the FFmpeg-trac mailing list