[FFmpeg-user] FFMPeg Real Time Video Transcoding

Eric Levy elevy at weathermetrics.com
Wed Mar 4 17:53:07 CET 2009


Hello,

 

I am trying to take a MJPEG stream from an IP camera and convert it to an
H264 file.  I am having trouble using the -re flag.  Below is the command I
am using:

 

curl -u user:pass -m 30
"http://192.168.0.3/control/faststream.jpg?stream=full&quality=50&needlength
&noaudio" | ffmpeg -threads 2 -re -s 640x480 -f mjpeg -i - -f avi -vcodec
libx264 -qmin 25 -qmax 25 -b 1M -an -y -r 30 -s 720x486
"C:\#Programs\Batch\ffmpeg\Test_Clip.avi"

 

Version: SVN-r16596-Sherpya

 

The MJPEG stream is only around 15 fps.  It can change depending on lighting
conditions, etc.  I would like to feed ffmpeg a variable frame rate stream
and have it output the stream at 30 fps.  I was hoping ffmpeg could base the
input frame rate on when it receives the frame.  I thought this is what -re
is supposed to do, but it doesn't seem like it is working.

 

I am not seeing a noticeable difference between having the -re and not using
it.  Either way (ie no -re or -r) on the input, the file duration is only 15
seconds at 30 fps since it only received approx 450 frames from the camera
even though my recording duration is 30 seconds.

 

If I do -r 15 it works, but when the frame rate from the camera changes I
run into problems.  I could record the MJPEG stream to a clip and then
calculate the frame rate of the MJPEG clip and have FFMPeg encode it at the
given frame rate, but I would really like to transcode on the fly to send
the video to the end user as soon as possible.

 

Thank you in advance for your help!

 

Eric

 

 

Eric Levy

Broadcast Products Manager

Weather Metrics, Inc.

Direct Dial (Office & Cell): 913-378-1209 

NABLogo_Small

 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4659 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-user/attachments/20090304/da3f8b07/attachment.jpeg>


More information about the ffmpeg-user mailing list