Page 1 of 1

serveur-Streaming

Posted: 15 Jun 2012 18:04
by ableur
Bonjour,

j'ai un projet sur lequel je boss depuis 2 semaines afin de trouver le script ideal et optimise pour le realiser
je dois avec des scripts vlc capturer le flux video d'une camera ip axis m1011 et ensuite avec le meme script streamer ce flux vers une machine x dans un autre reseau et stocker le meme flux dans un repertoire en local pour des verifes plus tard en cas d'un souci (vol).

Mes recherches m'ont conduit à ce site: http://www.videolan.org/doc/streaming-h ... index.html
qui m'a beaucoup aide en exploitant le 3. et le 4.

Alors pour le stockage du flux, j'ai ce script:
vlc -vvv -I dummy inputstream --sout '#std{access=file,mux=ts,dst=/home/stream/streaming.mpg}'

Alors pour la diffusion du flux, j'ai ce scripte:
vlc -vvv -I dummy inputstream --sout '#rtp{mux=ts,dst=192.168.3.184,port=1234}'

Je vous assure que mes deux scriptes marchent hyper bien indépendamment l'un de l'autre mais mon probleme lorsque je veux en faire un seul scripte avec la technique de chainage de module vlc ca ne marche plus

mon exemple: vlc -vvv -I dummy inputstream --sout "#rtp{mux=ts,dst=192.168.3.184,port=1234}:std{access=file,mux=ts,dst=/home/stream/streaming.mpg}"

Et donc si vous aviez deja realiser ce projet ou avez des conseilles a me prodiguer n'hesitez pas svp

Re: serveur-Streaming

Posted: 23 Jun 2012 16:56
by Jean-Baptiste Kempf
Use duplicate:
--sout "#duplicate{dst=rtp{mux=ts,dst=192.168.3.184,port=1234},dst=std{access=file,mux=ts,dst=/home/stream/streaming.mpg}}"

Or something similar.

Re: serveur-Streaming

Posted: 28 Jun 2012 17:43
by ableur
thank u Jean Baptiste, i have tried it and it run perfectly.
But ihave an other problem:
i try now to get the video of this flow from the network 192.168.3.184 to my web page; for this i use this javascript but i don't see nothing on it

<SCRIPT LANGUAGE="JavaScript">
// Set the BaseURL to the URL of your camera
document.write(location.hostname);
var BaseURL = "http://192.168.3.184/";// DisplayWidth&Height specifies the displayed of the image.
var DisplayWidth = "320";
var DisplayHeight = "240";
// This is the path to the image generating file inside the camera itself
var File = "rtsp://root:admin@192.168.7.10:554/axis-media/media.amp?";
// No changes required below this point
var output = "";
if ((navigator.appName == "Microsoft Internet Explorer" ) &&
(navigator.platform != "MacPPC" ) && (navigator.platform != "Mac68k" ))
{
// If Internet Explorer under Windows then use ActiveX
output = '<OBJECT ID="Player" width='
output += DisplayWidth;
output += ' height=';
output += DisplayHeight;
output += ' CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" ';
output += 'CODEBASE="';
output += BaseURL;
output += 'activex/AMC.cab#version=3,20,18,0">';
output += '<PARAM NAME="MediaURL" VALUE="';
output += BaseURL;
output += File + '">';
output += '<param name="MediaType" value="mjpeg-unicast">';
output += '<param name="ShowStatusBar" value="0">';
output += '<param name="ShowToolbar" value="0">';
output += '<param name="AutoStart" value="1">';
output += '<param name="StretchToFit" value="1">';
output += '<BR><B>Axis Media Control</B><BR>';
output += 'The AXIS Media Control, which enables you ';
output += 'to view live image streams in Microsoft Internet';
output += ' Explorer, could not be registered on your computer.';
output += '<BR></OBJECT>';
} else {
// If not IE for Windows use the browser itself to display
theDate = new Date();
output = '<IMG SRC="';
output += BaseURL;
output += File;
output += '&dummy=' + theDate.getTime().toString(10);
output += '" HEIGHT="';
output += DisplayHeight;
output += '" WIDTH="';
output += DisplayWidth;
output += '" ALT="Camera Image">';
}
document.write(output);
document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen"
</SCRIPT>

Re: serveur-Streaming

Posted: 28 Jun 2012 18:02
by Jean-Baptiste Kempf
I cannot guess without logs.

Re: serveur-Streaming

Posted: 29 Jun 2012 11:20
by ableur
ok it's also right but i'm in stage so it's difficult to me to give you some information to permit you to log
so i can esplain you the main idea: i should keep the flow of the camera that are in the network 192.168.7.x and send it on an other network 192.168.3.x because the web server is in this network. So to visualise directly the video on the web page i must integrate a code in this page web.
But after resherch i see on this page:
http://www.axis.com/techsup/cam_servers ... medium.htm
this javascript that can permit me to do it, and i note that this script keep the flow directly on the camera. this is not my way
So if you have a suggestion or an other possibility and with vlc sript let me know

thank you for yor help