[FFmpeg-user] h263/Raw frame rate detection

Shaily Athghara shaily.athghara at gmail.com
Tue Apr 17 08:42:50 CEST 2012


Hi

I am using ffmpeg to format a raw h263 and wav file to stream it to flv.

We were using the FFmpeg version SVN-r16573 which streaming the content and
provide the flv file with audio/video in sync

The command

./ffmpeg  -r 5.2 -i live_1.raw -i live_1.wav -y -f flv -ar 11025
output.flv
FFmpeg version SVN-r16573, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration:
  libavutil     49.12. 0 / 49.12. 0
  libavcodec    52.10. 0 / 52.10. 0
  libavformat   52.23. 1 / 52.23. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  built on Feb 16 2010 02:27:45, gcc: 4.1.2 20080704 (Red Hat 4.1.2-44)

Seems stream 0 codec frame rate differs from container frame rate: 29.97
(30000/1001) -> 5.20 (26/5)
Input #0, h263, from 'live_1.raw':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h263, yuv420p, 352x288 [PAR 12:11 DAR 4:3],  5.20
tb(r)
Input #1, wav, from 'live_1.wav':
  Duration: 00:00:09.32, bitrate: 64 kb/s
    Stream #1.0: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Output #0, flv, to 'output.flv':
    Stream #0.0: Video: flv, yuv420p, 352x288 [PAR 12:11 DAR 4:3], q=2-31,
200 kb/s,  5.20 tb(c)
    Stream #0.1: Audio: adpcm_swf, 11025 Hz, mono, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #1.0 -> #0.1
Press [q] to stop encoding
frame=   46 fps=  0 q=3.7 Lsize=     382kB time=8.85 bitrate= 353.5kbits/s
video:327kB audio:51kB global headers:0kB muxing overhead 1.088168%

*But recently have downloaded the latest GIT head ,but  there is no sync
between audio/video,audio is playing with the usual rate where as video
played so fast,ie 9 seconds video finishes within 1 sec.I tried with
different values of frame rate ie -r but it doesn't have any impact.*

./ffmpeg -f h263 -r 5 -i live_1.raw -vcodec rawvideo -i live_1.wav -y -f
flv -ar 11025 test1.flv
ffmpeg version 0.10.2.git Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr 11 2012 07:33:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
  configuration:
  libavutil      51. 46.100 / 51. 46.100
  libavcodec     54. 14.101 / 54. 14.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 67.101 /  2. 67.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
[h263 @ 0x83794e0] Estimating duration from bitrate, this may be inaccurate
Input #0, h263, from 'live_1.raw':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h263, yuv420p, 352x288 [SAR 12:11 DAR 4:3], 29.97
fps, 29.97 tbr, 1200k tbn, 29.97 tbc
[wav @ 0x83884e0] max_analyze_duration 5000000 reached at 5120000
Input #1, wav, from 'live_1.wav':
  Duration: 00:00:09.32, bitrate: 64 kb/s
    Stream #1:0: Audio: pcm_alaw ([6][0][0][0] / 0x0006), 8000 Hz, 1
channels, s16, 64 kb/s
[buffer @ 0x838bee0] w:352 h:288 pixfmt:yuv420p tb:1/1000000 sar:12/11
sws_param:flags=2
Output #0, flv, to 'test1.flv':
  Metadata:
    encoder         : Lavf54.3.100
    Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 352x288 [SAR
12:11 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 29.97 tbc
    Stream #0:1: Audio: adpcm_swf ([1][0][0][0] / 0x0001), 11025 Hz, 1
channels, s16, 44 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h263 -> flv)
  Stream #1:0 -> #0:1 (pcm_alaw -> adpcm_swf)
Press [q] to stop, [?] for help
frame=   46 fps=0.0 q=10.1 Lsize=     161kB time=00:00:01.70 bitrate=
776.8kbits/s
video:106kB audio:51kB global headers:0kB muxing overhead 2.655280%

Please suggest

Thanks
Shaily


More information about the ffmpeg-user mailing list