site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
2955
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM
AuthorAll Replies

dlsauers

join:2005-10-25
Wellston, OH

capture mjpeg-streamer stream to file NOT jpgs

Any one have any idea on capturing the output of the mjpeg-streamer to a video file, NOT jpg's stored to the drive.

The output_file.so plugin of mjpeg-streamer just stores jpgs at an interval to the directory... I want a video file, in some format the VLC etc. can deal with.

I really would like to run the http_output.so AND capture at the same time. So I can watch remotely and have a file to playback later.

ffmpeg? ? Everthing I find wants doesn't really deal with mjpeg-streamer but other direct interaction with the camera.

Any ideas ? ? ? I am coming up dry in searches ...

Thanks.

TuxRaiderPen

join:2009-09-19

said by dlsauers:
Any ideas ? ? ? I am coming up dry in searches ...Thanks.
A quickie way:

wget

example:

wget -O outpufilenamep.mjpg --user xxx --password pass http://127.0.0.1:8090/?action=stream
 

Where outpufilename you would change to your desired name

user and password are only needed if you setup the mjpeg-streamer with such and you would need to adjust from 8090 to what ever port your using.

To convert it to something like mp4 you can use ffmpeg

ffmpeg -i outfilenamep.mjpg testing.mp4
 

You will/may need to tweak the settings on ffmpeg to get desired framerate, quality etc...

Note: VLC will play the mjpeg stream natively, as will mplayer but it requires the .mjpg to work.

There may be something else that can capture the mjpeg stream better than wget, curl?, something else? ? ... but off the top of my head.... thats what I've got....

equivocal

join:2008-01-23
USA

reply to dlsauers
Ah, webcams...

I've been noodling around with a perl script for better than a year. It tries to capture, timestamp, and store images from the camera as fast as it can. But I guess this qualifies as "direct interaction" you don't desire. It's also the poster child for what crap Linux (the kernel) has become.

My efforts also lack simultaneous saving and live viewing. But that might be as simple:

wget -O - [other stuff] | tee saved.mjpeg | viewer [whatever tells it to read from stdin and display mjpeg]
 

dlsauers

join:2005-10-25
Wellston, OH

said by TuxRaiderPen:

wget -O outpufilenamep.mjpg --user xxx --password pass http://127.0.0.1:8090/?action=stream
 


wget is one solution, but with wget connected it tends to generate some huge files.. I guess a cron job to run for 30-60 minutes and the process to an mp4 with ffmpeg is an option.

said by equivocal:
I've been noodling around with a perl script for better than a year. It tries to capture, timestamp, and store images from the camera as fast as it can. But I guess this qualifies as "direct interaction" you don't desire. It's also the poster child for what crap Linux (the kernel) has become.
I prefer to let mjpeg_streamer run as I can view the cam remotely then, and also get a mini web server out of it. Additionally I am after a video file not images say every 30 seconds or so... I like the timestamp idea and possibly a name...

Hmmm maybe something with motion... but that looks to record/snapshot only when motion is detected. I want the stream continuously recorded.

Interesting idea with perl... but I think I am on a different path/goal.

If there was something that could directly connect to mjpeg_streamer and add a name for the camera and time stamp that would be great. With an mp4 output v. mjpeg.

Sunday, 19-May 18:15:36 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics