[FFmpeg-user] Problem retrieving correct fps while streaming cameras

Corentin Hamel corentin.hamel69 at gmail.com
Wed Apr 20 03:09:28 CEST 2016


Here are the outputs, it looks like i made a mistake saying a could only
retrieve correct fps with jpeg. Both jpeg and h264 give the expect fps.
However still unable to get it using the ffmpeg API


   - *jpeg and 12fps*

ffmpeg -i "rtsp://
root:pass at 192.168.100.21:554/axis-media/media.amp?resolution=704x576&fps=12&camera=1&videocodec=jpeg"
test.avi
ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.1 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=
--enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid
--enable-vda
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mjpeg @ 0x7f8753000600] Changing bps to 8
Input #0, rtsp, from 'rtsp://
root:pass at 192.168.100.21:554/axis-media/media.amp?resolution=704x576&fps=12&camera=1&videocodec=jpeg
':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
704x576 [SAR 1:1 DAR 11:9], 25 tbr, 90k tbn, 90k tbc
[swscaler @ 0x7f8752833200] deprecated pixel format used, make sure you did
set range correctly
Output #0, avi, to 'test.avi':
  Metadata:
    INAM            : Media Presentation
    ISFT            : Lavf57.25.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 704x576 [SAR
1:1 DAR 11:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.24.102 mpeg4
    Side data:
      unknown side data type 10 (24 bytes)
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=  389 fps= 13 q=10.8 size=     905kB time=00:00:32.48 bitrate=
228.2kbits/s speed=1.06x


   - *h264 and 12pfs*

fmpeg -i "rtsp://
root:pass at 192.168.100.21:554/axis-media/media.amp?resolution=704x576&fps=12&camera=1&videocodec=h264"
test2.avi
ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.1 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=
--enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid
--enable-vda
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, rtsp, from 'rtsp://
root:pass at 192.168.100.21:554/axis-media/media.amp?resolution=704x576&fps=12&camera=1&videocodec=h264
':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.079067, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709), 704x576 [SAR 1:1
DAR 11:9], 25 tbr, 90k tbn, 180k tbc
Output #0, avi, to 'test2.avi':
  Metadata:
    INAM            : Media Presentation
    ISFT            : Lavf57.25.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 704x576 [SAR
1:1 DAR 11:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.24.102 mpeg4
    Side data:
      unknown side data type 10 (24 bytes)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
frame=  303 fps= 13 q=9.5 size=     837kB time=00:00:25.12 bitrate=
273.1kbits/s speed=1.05x

thanks





On Tue, Apr 19, 2016 at 6:04 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Corentin Hamel <corentin.hamel69 <at> gmail.com> writes:
>
> > ffmpeg streaming the rtsp retrieves only
> > the correct frame rate for jpeg
>
> > not for h264.
>
> Please show your command line together with the complete,
> uncut console output.
>
> Please do not top-post here, Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
Corentin Hamel


More information about the ffmpeg-user mailing list