[FFmpeg-user] http mjpeg stream capture

faisal k.m.a faisalkma at gmail.com
Mon Mar 11 18:30:02 CET 2013


Thanks for the explanation. I am new to ffmpeg and still learning how to
use it properly. By sharing information you are providing me a great help.

Yes you are right Carl. The source I am using may change the frame rate
depends on the network load.The console output is attached with this
e-mail.

I will rephrase my requirement. My expectation is to have the ability in my
program to predict which captured image file represent the frame capture at
a
specific time. For example assume I have captured 600 frames at rate of 1
fps. If I want locate the frame captured at 3 minutes 47 second, then it
will be
file number 3*60+47 = 227.  If the capturing rate was 2 frames per then the
file number will be 2 * (3*60+47) = 454

In my ideal case in every second 2 frames will be captured and the
Operating System will display the same "file created time" for both of the
image files.
The variable frame rate will affect this ideal case. Now I understand this.

My requirement is to have 2 frames captured per second. Its ok to change
this rate variable if some constraints are met. The conditions are given
below
Assume N to be the number of frames captured per sec(its less than 30 as 30
is the maximum frame rate)
1. N frames are captured and any 2 of them are accurate captures
2. N-2 captured images can be empty or duplicates
3. For all the N frames the Operating System will display the same "file
created time"  or "last modified time" with the accuracy in seconds
The above things will repeat for the next second and the captured N frames
during that time period. The "file created time"  or "last modified time"
for these captured images will be 1 second more than the previous captures

If you think a better approach is there to achieve this please let me know.

Thanks and Regards
Faisal


On Mon, Mar 11, 2013 at 4:11 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> faisal k.m.a <faisalkma <at> gmail.com> writes:
>
> > I am trying to capture frames from an http URL which
> > streams a mjpeg video. My expectation is to get exactly
> > 2 frames per second. I used the following command to
> > extract frames
> >
> > ffmpeg -f mjpeg -i <http URL> -r 2 images\image%03d.jpg -t 600
>
> (Note that the command line does not work the way you intend
> it to work, output options have to be placed in front of the
> output files.)
>
> Complete, uncut console output missing.
>
> I suspect your input cannot deliver frames with a constant
> frame rate (you can check with -debug_ts), the image2 muxer
> does not support variable frame rate and has to duplicate
> > / drop frames to produce cfr output.
> (This is of course guessing, console output will tell.)
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.zip
Type: application/zip
Size: 10128 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20130311/d6c90484/attachment.zip>


More information about the ffmpeg-user mailing list