[FFmpeg-user] Real Time Streaming to File Frame rate setting

Eric Levy elevy at weathermetrics.com
Tue Mar 3 00:22:34 CET 2009


Baptiste,

Thank you for the response.

I am still having trouble with the frame rate.  The video that ffmpeg is
outputting is only between 18-25 fps, even though I am specifying 30 fps.  

Is this because FFMPeg isn't able to keep up with the video stream.  What's
interesting is when I record the MJPEG stream to a file and then tell FFMPeg
the file is 15 fps, it is able to create a 30 fps H264 AVI.  In fact it
appears to do the conversion at faster than real time (45 fps).

Any help would be much appreciated!
Eric

  

Below is the command line I am using and the results:

C:\#Programs\ffmpeg>curl -u admin:pass -m 30
"http://192.168.0.3/control/fast
stream.jpg?stream=Full&quality=50&needlength&noaudio"| ffmpeg -y -s 640x4
80 -re -f mjpeg -i - -an -s 720x486 -r 30 TestOutput.avi

FFmpeg version SVN-r16596-Sherpya, Copyright (c) 2000-2009 Fabrice Bellard,
et a
l.
  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
  libavfilter    0. 2. 0 /  0. 2. 0
  libswscale     0. 6. 1 /  0. 6. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Jan 14 2009 07:24:48, gcc: 4.2.5 20080919 (prerelease) [Sherpya]
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
Current
                                 Dload  Upload   Total   Spent    Left
Speed
100 2556k    0 2556k    0     0   490k      0 --:--:--  0:00:05 --:--:--
552kIn
put #0, mjpeg, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: mjpeg, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], 25.00
tb(r)
Output #0, avi, to '73-02-Full-re-720x486-no264.avi':
    Stream #0.0: Video: mpeg4, yuv420p, 720x486 [PAR 9:10 DAR 4:3], q=2-31,
200
kb/s, 30.00 tb(c)
Stream mapping:
  Stream #0.0 -> #0.0
100 2824k    0 2824k    0     0   323k      0 --:--:--  0:00:08 --:--:--
326kfr
100 3214k    0 3214k    0     0   351k      0 --:--:--  0:00:09 --:--:--
331kfr
100 3759k    0 3759k    0     0   370k      0 --:--:--  0:00:10 --:--:--
330kfr
100 4305k    0 4305k    0     0   385k      0 --:--:--  0:00:11 --:--:--
330kfr
100 4851k    0 4851k    0     0   398k      0 --:--:--  0:00:12 --:--:--
329kfr
100 5396k    0 5396k    0     0   409k      0 --:--:--  0:00:13 --:--:--
581kfr
100 5942k    0 5942k    0     0   419k      0 --:--:--  0:00:14 --:--:--
544kfr
100 6488k    0 6488k    0     0   427k      0 --:--:--  0:00:15 --:--:--
544kfr
100 7033k    0 7033k    0     0   434k      0 --:--:--  0:00:16 --:--:--
544kfr
100 7579k    0 7579k    0     0   441k      0 --:--:--  0:00:17 --:--:--
546kfr
100 8124k    0 8124k    0     0   446k      0 --:--:--  0:00:18 --:--:--
544kfr
100 8669k    0 8669k    0     0   452k      0 --:--:--  0:00:19 --:--:--
544kfr
100 9216k    0 9216kframe=  302 fps= 2    0     0   456k1 q=31.0 size=
100 9759k    0 9759k    0     0   460k      0 --:--:--  0:00:21 --:--:--
543kfr
100 10.0M    0 10.0M    0     0   464k      0 --:--:--  0:00:22 --:--:--
543kfr
100 10.5M    0 10.5M    0     0   467k      0 --:--:--  0:00:23 --:--:--
543kfr
100 11.1M    0 11.1M    0     0   471k      0 --:--:--  0:00:24 --:--:--
543kfr
100 11.6M    0 11.6M    0     0   473k      0 --:--:--  0:00:25 --:--:--
543kfr
100 12.1M    0 12.1M    0     0   476k      0 --:--:--  0:00:26 --:--:--
543kfr
100 12.7M    0 12.7M    0     0   478k      0 --:--:--  0:00:27 --:--:--
543kfr
100 13.2M    0 13.2M    0     0   481k      0 --:--:--  0:00:28 --:--:--
542kfr
100 13.7M    0 13.7M    0     0   483k      0 --:--:--  0:00:29 --:--:--
542kfr
100 14.2M    0 14.2M    0     0   485k      0 --:--:--  0:00:30 --:--:--
543k
curl: (28) Operation timed out with 14906389 out of -1 bytes received
frame=  479 fps= 20 q=31.0 Lsize=     694kB time=15.97 bitrate= 356.3kbits/s

video:677kB audio:0kB global headers:0kB muxing overhead 2.521207%



-----Original Message-----
From: ffmpeg-user-bounces at mplayerhq.hu
[mailto:ffmpeg-user-bounces at mplayerhq.hu] On Behalf Of Baptiste Coudurier
Sent: Monday, March 02, 2009 1:41 PM
To: FFmpeg user questions and RTFMs
Subject: Re: [FFmpeg-user] Real Time Streaming to File Frame rate setting

On 3/2/2009 10:47 AM, Eric Levy wrote:
> I have a software application that is outputting a RGB raw video 
> stream to FFMPeg.  The video stream is between 10-15 fps.
> 
>  
> 
> I am curious if there is a command line parameter for "Real Time Frame 
> Rate". IE a way to have FFMPeg decode the stream and write to a H264 
> file at 30 fps, even though the raw video stream is coming in real 
> time at a different rate.
> 

Yes, "-re"

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user




More information about the ffmpeg-user mailing list