[Live-devel] (no subject)

2008-05-07 Thread julien . savarese
hello, 

I am a student engineer in France, in the DCNS society, and I wish  stream 
a video acquisition card : 
I am using the test program testMPEG1or2VideoStreamer, and have modifie 
the adresse like indicated in the forum. 

like this : 

 

This library is free software; you can redistribute it and/or modify it 
under 
the terms of the GNU Lesser General Public License as published by the 
Free Software Foundation; either version 2.1 of the License, or (at your 
option) any later version. (See .) 

This library is distributed in the hope that it will be useful, but 
WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS 
FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for 
more details. 

You should have received a copy of the GNU Lesser General Public License 
along with this library; if not, write to the Free Software Foundation, 
Inc., 
59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
**/ 
// Copyright (c) 1996-2007, Live Networks, Inc.  All rights reserved 
// A test program that reads a MPEG-1 or 2 Video Elementary Stream file, 
// and streams it using RTP 
// main program 

#include "liveMedia.hh" 
#include "BasicUsageEnvironment.hh" 
#include "GroupsockHelper.hh" 

// Uncomment the following if the input file is a MPEG Program Stream 
// rather than a MPEG Video Elementary Stream 
//#define SOURCE_IS_PROGRAM_STREAM 1 

// To stream using "source-specific multicast" (SSM), uncomment the 
following: 
//#define USE_SSM 1 
#ifdef USE_SSM 
Boolean const isSSM = True; 
#else 
Boolean const isSSM = False; 
#endif 

// To set up an internal RTSP server, uncomment the following: 
//#define IMPLEMENT_RTSP_SERVER 1 
// (Note that this RTSP server works for multicast only) 

// To stream *only* MPEG "I" frames (e.g., to reduce network bandwidth), 
// change the following "False" to "True": 
Boolean iFramesOnly = True; 

UsageEnvironment* env; 
char const* inputFileName = "/dev/video0"; 
#ifdef SOURCE_IS_PROGRAM_STREAM 
MPEG1or2Demux* mpegDemux; 
#endif 
MediaSource* videoSource; 
RTPSink* videoSink; 

void play(); // forward 

int main(int argc, char** argv) { 
  // Begin by setting up our usage environment: 
  TaskScheduler* scheduler = BasicTaskScheduler::createNew(); 
  env = BasicUsageEnvironment::createNew(*scheduler); 

  // Create 'groupsocks' for RTP and RTCP: 
  char* destinationAddressStr 
#ifdef USE_SSM 
= "192.168.0.2"; 
#else 
= "192.168.0.2"; 
  // Note: This is a multicast address.  If you wish to stream using 
  // unicast instead, then replace this string with the unicast address 
  // of the (single) destination.  (You may also need to make a similar 
  // change to the receiver program.) 
#endif 
  const unsigned short rtpPortNum = 1234; 
 // const unsigned short rtpPortNum = ; 
  const unsigned short rtcpPortNum = rtpPortNum+1; 
  const unsigned char ttl = 1; // low, in case routers don't admin scope 

  struct in_addr destinationAddress; 
  destinationAddress.s_addr = our_inet_addr(destinationAddressStr); 
  printf("inet ==%d\n",destinationAddress.s_addr); 
 
  const Port rtpPort(rtpPortNum); 

  const Port rtcpPort(rtcpPortNum); 

printf("debut\n"); 
  Groupsock rtpGroupsock(*env, destinationAddress, rtpPort, ttl); 
 // Groupsock rtcpGroupsock(*env, destinationAddress, rtcpPort, ttl); 

#ifdef USE_SSM 
  rtpGroupsock.multicastSendOnly(); 
  rtcpGroupsock.multicastSendOnly(); 
#endif 

  // Create a 'MPEG Video RTP' sink from the RTP 'groupsock': 
  videoSink = MPEG1or2VideoRTPSink::createNew(*env, &rtpGroupsock); 


  // Finally, start the streaming: 
  *env << "Beginning streaming...\n"; 
  play(); 

  env->taskScheduler().doEventLoop(); // does not return 

  return 0; // only to prevent compiler warning 
} 

void afterPlaying(void* /*clientData*/) { 
  *env << "...done reading from file\n"; 

  Medium::close(videoSource); 
#ifdef SOURCE_IS_PROGRAM_STREAM 
  Medium::close(mpegDemux); 
#endif 
  // Note that this also closes the input file that this source read from. 


  play(); 
} 

void play() { 
  // Open the input file as a 'byte-stream file source': 
  ByteStreamFileSource* fileSource 
= ByteStreamFileSource::createNew(*env, inputFileName); 
  if (fileSource == NULL) { 
*env << "Unable to open file \"" << inputFileName 
 << "\" as a byte-stream file source\n"; 
exit(1); 
  } 
 
  FramedSource* videoES; 
#ifdef SOURCE_IS_PROGRAM_STREAM 
  // We must demultiplex a Video Elementary Stream from the input source: 
  mpegDemux = MPEG1or2Demux::createNew(*env, fileSource); 
  videoES = mpegDemux->newVideoStream(); 
#else 
  // The input source is assumed to already be a Video Elementary Stream: 
  videoES = fileSource; 
#endif 

  // Create a framer for the Video Elementary Stream: 
  videoSource 
= MPEG1or2VideoStreamFra

Re: [Live-devel] Live stream of Axis camera

2008-05-07 Thread julien . savarese
have you an exemple from a "FRAMEDSOURCE "???
I have already developpe a program which grab the video card, and I can 
obtain the picture in a buffer in RGB, and JPEG, bitmap.
IS this a class "framedsource" ??

thx for an exemple.
_
 Julien Savarese 
 Apprenti ingénieur. 
 Division SIS/DPM/RMS/MIE.
-




"Manuel Carrizo" <[EMAIL PROTECTED]> 
Envoyé par : [EMAIL PROTECTED]
07/05/2008 16:54
Veuillez répondre à
LIVE555 Streaming Media - development & use <[EMAIL PROTECTED]>


A
"LIVE555 Streaming Media - development & use" <[EMAIL PROTECTED]>
cc

Objet
Re: [Live-devel] Live stream of Axis camera






On Tue, May 6, 2008 at 6:36 PM, Ross Finlayson <[EMAIL PROTECTED]> 
wrote:
>  Using "ADTSAudioFileSource" might be wrong, if the input data is not in
> ADTS format.
>
>  Because you are streaming from a live source, then you may instead be 
able
> to use a simple "FramedSource" subclass (that you would write) that just
> delivers one AAC frame at a time (and sets "fPresentationTime"
> appropriately).

I will try this, thank you for the information

Manuel
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


Pensez a l'environnement : avez-vous besoin d'imprimer ce message ?
Think Environment : Do you need to print this message ?

Ce courrier électronique, et éventuellement ses pièces jointes, peuvent 
contenir des informations confidentielles et/ou  personnelles et a été envoyé 
uniquement à l'usage de la personne ou de l'entité  citée ci-dessus. Si vous 
receviez ce courrier électronique par erreur, merci de bien vouloir en avertir 
l'expéditeur immédiatement par la réponse en retour à ce courrier  et effacer 
l'original et détruire toute copie enregistrée dans un ordinateur, ou imprimée 
ou encore sauvegardée sur un disque . Toute  revue, retransmission ou toute 
autre forme d'utilisation de ce courrier électronique par toute autre personne 
que le destinataire prévue est strictement interdite.

L'internet ne permettant pas d'assurer l'intégrité de ce message, l'expéditeur 
décline toute responsabilité au cas où il aurait été intercepté ou modifié par 
quiconque.

This e-mail and possibly any attachment may contain confidential and/or 
privileged information and is intended only for the use of the individual or 
entity named above.  If you have received it in error, please advise the sender 
immediately by reply e-mail and delete  and destroy all copies including all 
copies stored in the recipient's computer, printed or saved to disk. . Any 
review , retransmission, or further use of this e-mail by by persons or 
entities other than the intended recipient is strictly  prohibited.  Because of 
the nature of the Internet the sender is not in a position to ensure the 
integrity of this message, therefore the sender disclaims any liability 
whatsoever, in the event of this message having been intercepted and/or altered.

___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


Re: [Live-devel] Live stream of Axis camera

2008-05-07 Thread Manuel Carrizo
On Tue, May 6, 2008 at 6:36 PM, Ross Finlayson <[EMAIL PROTECTED]> wrote:
>  Using "ADTSAudioFileSource" might be wrong, if the input data is not in
> ADTS format.
>
>  Because you are streaming from a live source, then you may instead be able
> to use a simple "FramedSource" subclass (that you would write) that just
> delivers one AAC frame at a time (and sets "fPresentationTime"
> appropriately).

I will try this, thank you for the information

Manuel
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


Re: [Live-devel] (no subject)

2008-05-07 Thread Ross Finlayson
Unable to determine our source address: This computer has an invalid 
IP address: 0x0

Beginning streaming...
Beginning to read from file...
**

I don't understand, because my IP adresse  is correct, but i'm using 
the same computer to stream and receive,


Nonetheless, something is wrong with the networking configuration of 
your system, because neither of the methods we use to determine the 
computer's IP address - (1) multicast loopback and (2) 
gethostname()+gethostbyname() - is working.


The most common reason for this error is that IP multicast is not 
configured correctly on your system.  Make sure that you have a route 
installed for 224/8.

--

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


Re: [Live-devel] Live stream of Axis camera

2008-05-07 Thread Manuel Carrizo
Hi Ross, I've subclassed the FramedSource, with a class that takes the
FramedSource of the subsession of the session between my program and
the camera and save it as fInputSource.

I print the presentation time in MultiFramedRTPSource::doGetNextFrame1()

In each doGetNextFrame my class uses fInputSource to set his own
fPresentationTime (I've added a getPresentationTime to FramedSource
for testing) and then call afterGetting(this), but if I print this
value is always 0, and if I connect to my program with openRTSP I get
a value like 1210191869 : 220988 ( tv_sec :  tv_usec ) that rises
(this number is in the output of openRTSP).

In the output of my program I also get a value like 1210191793:686042,
but after a moment, it change to a number of 5 digits, that is the
same that I get in the output of openRTSP connected directly to the
camera.

I'm using the same code of the first mail, with the difference that
now I use my class to create the source that I pass to the
startPlaying of RTPSink

Regards, Manuel
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


[Live-devel] MP4 Streaming

2008-05-07 Thread Jayant Chauhan
Hey,
I am new to RTSP and streaming as such.
After going through some stuff, I realized that to support
seeking in a streaming server/client setup, we need to use RTSP.
So for that livemedia (live555) seems to be the best place to start with
right?

 Now for my query, I am using Darwin Streaming Server as my server for MP4
streams. Now what I want to do is use live555 for my client. I started off
with the
openRTSP test program. It seems to work ok-okish. There seems to be problems
concerned with the media format support. The faulty scenarios are like :

1. If I use openRTSP to receive files (and to write the output to an MP4
file), the audio isn't there at times, though it has been stored.
2. The server sends a MEDIA NOT SUPPORTED reply to the DESCRIPTION request,
after
which the connection is closed -  And this happens for most of the MP4
files. Is there a work around for this?

What I want to do is just receive the stream and pass it to my MP4 parser.
And let it handle any inconsistencies? So the flow intended is :
i. Get the decoder initialization information (media initializations
etc), which can be done through SDP right?
  ii. Create two receivers for Audio and Video, and then just write the
audio and video frames to their respective buffers.

Is there an easier way to implement MP4 files streaming server/client which
does not depend on the media (audio and video) type support ? Any kinda
pointer would be deeply appreciated.


looking forward to the replies :D

sincerely
Jayant
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel


Re: [Live-devel] MP4 Streaming

2008-05-07 Thread Yamini S. [EPLX - DCC]
Hi,

   I am trying to do the same. But Can u tell me How u compile
openRTSP.cpp  and playcommon.cpp file alone.

 

Thanks & Regards,

S.Yamini

Programmer

R&D

Siemens Building Technologies Pvt. Ltd.

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jayant Chauhan
Sent: Thursday, May 08, 2008 11:53 AM
To: [EMAIL PROTECTED]
Subject: [Live-devel] MP4 Streaming

 

Hey,

I am new to RTSP and streaming as such.

After going through some stuff, I realized that to support

seeking in a streaming server/client setup, we need to use RTSP.

So for that livemedia (live555) seems to be the best place to start with
right?

 

 Now for my query, I am using Darwin Streaming Server as my server for
MP4

streams. Now what I want to do is use live555 for my client. I started
off with the 

openRTSP test program. It seems to work ok-okish. There seems to be
problems

concerned with the media format support. The faulty scenarios are like :

 

1. If I use openRTSP to receive files (and to write the output to an MP4
file), the audio isn't there at times, though it has been stored.

2. The server sends a MEDIA NOT SUPPORTED reply to the DESCRIPTION
request, after 

which the connection is closed -  And this happens for most of the MP4
files. Is there a work around for this? 

 

What I want to do is just receive the stream and pass it to my MP4
parser. And let it handle any inconsistencies? So the flow intended is :

i. Get the decoder initialization information (media initializations
etc), which can be done through SDP right?

  ii. Create two receivers for Audio and Video, and then just write the
audio and video frames to their respective buffers. 

 

Is there an easier way to implement MP4 files streaming server/client
which does not depend on the media (audio and video) type support ? Any
kinda pointer would be deeply appreciated.

 

 

looking forward to the replies :D

 

sincerely

Jayant





This message (including attachments) is confidential and may be 
privileged. If you have received it by mistake please notify the 
sender by return e-mail and delete this message from your system. You 
may not copy, disclose or use the contents in any way. SBTPL 
does not guarantee integrity of this communication nor that this 
communication is free of viruses, interceptions or interference. This 
communication does not create or modify any contract, and unless 
otherwise stated, is not intended to be contractually binding. Views 
or opinions expressed in this e-mail message are those of the author 
only.
___
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel