[FFmpeg-user] force frame rate when reformating raw h264 stream
Jan Pohanka
xhpohanka at gmail.com
Mon Oct 1 11:53:43 CEST 2012
Again with current fresh compiled version
Dne Mon, 01 Oct 2012 11:30:29 +0200 Carl Eugen Hoyos <cehoyos at ag.or.at>
napsal(a):
> Please provide the output for current git head...
Current ffplay informs about 2.50 fps, but the playing speed is correct (5
fps and video length 15s)
# ffplay a.h264
ffplay version N-44937-gadc5539 Copyright (c) 2003-2012 the FFmpeg
developers
built on Oct 1 2012 11:42:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-libx264 --enable-gpl --prefix=/opt/ffmpeg
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 61.100 / 54. 61.100
libavformat 54. 29.105 / 54. 29.105
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 18.100 / 3. 18.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
[h264 @ 0x7f87d40008c0] max_analyze_duration 5000000 reached at 5200000
[h264 @ 0x7f87d40008c0] Estimating duration from bitrate, this may be
inaccurate
Input #0, h264, from 'a.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p, 800x608, 2.50 fps, 2.50
tbr, 1200k tbn, 5 tbc
Frame changed from size:0x0 to size:800x608B vq= 25KB sq= 0B f=0/0
15.51 A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0 0/0
Muxing to mkv also informs about 2.50 fps ...
# ffmpeg -r 5 -i a.h264 -vcodec copy -f matroska -r 5 -y btest.mkv
ffmpeg version N-44937-gadc5539 Copyright (c) 2000-2012 the FFmpeg
developers
built on Oct 1 2012 11:42:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-libx264 --enable-gpl --prefix=/opt/ffmpeg
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 61.100 / 54. 61.100
libavformat 54. 29.105 / 54. 29.105
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 18.100 / 3. 18.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
[h264 @ 0x3001320] max_analyze_duration 5000000 reached at 5200000
[h264 @ 0x3001320] Estimating duration from bitrate, this may be inaccurate
Input #0, h264, from 'a.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p, 800x608, 2.50 fps, 2.50
tbr, 1200k tbn, 5 tbc
Output #0, matroska, to 'btest.mkv':
Metadata:
encoder : Lavf54.29.105
Stream #0:0: Video: h264, yuvj420p, 800x608, q=2-31, 2.50 fps, 1k tbn,
5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 76 fps=0.0 q=-1.0 Lsize= 789kB time=00:00:29.84 bitrate=
216.5kbits/s
video:787kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.169792%
And the resulting file is played also on 2.50 fps, but this is not what I
need. Now ffplay behaves correctly, because 2.50 fps is set in the
matroska container, but previous ffmpeg command should set it to 5.
ffplay btest.mkv
ffplay version N-44937-gadc5539 Copyright (c) 2003-2012 the FFmpeg
developers
built on Oct 1 2012 11:42:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-libx264 --enable-gpl --prefix=/opt/ffmpeg
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 61.100 / 54. 61.100
libavformat 54. 29.105 / 54. 29.105
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 18.100 / 3. 18.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, matroska,webm, from 'btest.mkv':
Metadata:
ENCODER : Lavf54.29.105
Duration: 00:00:30.04, start: 0.000000, bitrate: 215 kb/s
Stream #0:0: Video: h264 (High), yuvj420p, 800x608, SAR 1:1 DAR 25:19,
2.50 fps, 2.50 tbr, 1k tbn, 5 tbc (default)
Frame changed from size:0x0 to size:800x608B vq= 25KB sq= 0B f=0/0
30.88 A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0 0/0
> Can you share the sample?
I'm not sure about attachments in the list so the file can be downloaded
on this link:
http://neuron.feld.cvut.cz/honza/a.h264
Jan
More information about the ffmpeg-user
mailing list