简体   繁体   中英

FFmpeg AVI recording for H264 @ 1fps not working

I am recording H.264 (640x480 @1fps 10seconds) in avi container using FFMPEG. When I play the recorded file in VLC, it plays only first frame and rest of the frames are not played. I am getting

main warning: late picture skipped (555293 > -305)

Output of ffprobe is:

FFprobe version 0.6.2-4:0.6.2-1ubuntu1.1~ppa1~lucid1, Copyright (c) 2007-2010 the Libav developers
  built on Jan  3 2012 18:16:35 with gcc 4.4.3
  configuration: --extra-version='4:0.6.2-1ubuntu1.1~ppa1~lucid1' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[h264 @ 0x9feb230]insane cropping not completely supported, this could look slightly wrong ...
[avi @ 0x9fea010]max_analyze_duration reached
Input #0, avi, from 'h2641fps.avi':
  Metadata:
    ISFT            : Lavf52.7.0
  Duration: 00:00:11.00, start: 0.000000, bitrate: 95 kb/s
    Stream #0.0: Video: h264, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 1 fps, 1 tbr, 1 tbn, 60 tbc
[h264 @ 0x9feb230]insane cropping not completely supported, this could look slightly wrong ...
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
codec_type=video
codec_time_base=1/60
codec_tag_string=H264
codec_tag=0x34363248
width=640
height=480
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=4:3
pix_fmt=yuv420p
r_frame_rate=1/1
avg_frame_rate=1/1
time_base=1/1
start_time=0:00:00.000000
duration=0:00:11.000000
nb_frames=11
[/STREAM]

Is there something I am doing wrong? Same code works perfectly for frame rate above 3

I am answering my question, It may help someone having similar issues:

VLC plays streams when I increase cache size from 300ms to 900ms. I am not sure if its a correct method or not. As avi header is having information of framerate, VLC should wait for atleast 900 or 1000ms for next frame. "late picture skipped" should come after 1000ms.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM