LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-26-2009, 04:29 AM   #1
Rufe0
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
Low level program to save a mjpeg stream


Hi all
Well first I’ll just say I am a complete Linux beginner, but I have done vbs, js, php, html web type stuff so I’m not a complete beginner to programming.

However I've been trying to learn C and python but it’s not making a huge amount of sense.

I am wanting to make a simple low level program that copies an image from a mjpeg stream on 192.168.0.1/videostream.cgi for example to a variable then save that variable to a file on my system.

I am aware that there are programs out there that would do this but I still want to make my own.

Any help?
Thanks Rufe0
 
Old 06-26-2009, 07:25 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Depending on the size of the movie you are looking at streaming, I wouldn't try to save all of it to a variable. While I do not do any programming with regards to video, I would highly suggest that when you stream it, you buffer it, simply so that you do not have a single variable that is holding a ridiculous amount of data (which will, undoubtedly, chew up your RAM). Buffer it into chunks, and when you buffer is full, dump the buffer to an opened file stream.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
program to stream the stream (or maybe streaming proxy?) jimmykarily Linux - Software 1 05-13-2009 04:35 AM
Executing C program within PHP to Acces low level I/O rcohen Linux - Software 3 02-28-2005 11:26 AM
save radio stream SchwipSchwap Linux - Newbie 7 06-17-2004 12:24 AM
low level languages devit Programming 2 05-07-2004 11:16 AM
Save a stream spotslayer Linux - Software 3 04-17-2004 05:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration