[Live-devel] using stdin for live555MediaServer

Simon Brown sbrown at microvideo.co.uk
Mon Aug 24 06:33:51 PDT 2020


On 21/08/2020 17:33, Ross Finlayson wrote:
>
> The main difference between “testMPEG2TransportStreamer” and the 
> “LIVE555 Media Server” (and “testOnDemandRTSPServer”; see below) is 
> that the former streams RTP over UDP multicast, whereas the latter 
> streams (by default) RTP over UDP unicast. It sounds like the bitrate 
> of your encoded transport stream is approaching (if not exceeding) the 
> capacity of your network. This is something that you should fix (e.g., 
> by reducing the resolution and/or frame rate of your encoder). (Note 
> that you CANNOT fix this by trying to stream RTP-over-TCP; you need to 
> reduce the bitrate of your stream.) 
I don't believe this to be the case.  I can receive the raw UDP stream 
without RTSP without any problems at all.
> Instead of modifying the LIVE555 library code, which is not recommended (and will get you no support here), you should instead work from the “testOnDemandRTSPServer” demo application, in the “testProgs” directory.
> At line 239 of “testOnDemandRTSPServer.cpp", change
> 	char const* inputFileName = "test.ts”;
> 	char const* indexFileName = "test.tsx";
> to
> 	char const* inputFileName = “stdin”;
> 	char const* indexFileName = NULL;
Thanks - I've done this and reverted the main files back to original.  
With some mixed results
>
> I suggest doing the following, in order (making sure that each step works OK before moving to the next step):
> 	1/ Capture ‘stdin’ into a “.ts” file - e.g., running
> 		cat < your-encoder-source > source.ts
> 	2/ Make sure that that the “source.ts” file plays normally (e.g., using VLC)
> 	3/ Try streaming the “source.ts” file (e.g., using the LIVE555 Media Server), and receiving it (over the network), using “openRTSP”, rather than VLC
> 		See http://www.live555.com/openRTSP
> 	4/ Rename the resulting "VIDEO-*” file to “received.ts”, and try playing that file using VLC
> 	5/ Use VLC (instead of “openRTSP”) as a RTSP client, to play the stream from the “rtsp://“ URL
> 	6/ Connect your encoder source to “testOnDemandRTSPServer” (modified as noted above), by running
> 		your-modified-testOnDemandRTSPServer < your-encoder-source
> 	7/ Try receiving the stream remotely using “openRTSP”
> 	8/ Rename the resulting "VIDEO-*” file to “received.ts”, and try playing that file using VLC
> 	9/ Use VLC (instead of “openRTSP”) as a RTSP client, to play the stream from the “rtsp://“ URL
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/

Ok, I've done 1, 2, 3, 4 and 5 without problem.  I stall at 6.  I 
connect the output of my encoder to stdin by spawning the 
testOnDemandRTSPServer from within my main program and connect pipes to 
it and then pushing the data into this pipe.  As soon as I do this, my 
program stalls, yet if I change my program back to pushing data out on 
UDP it's fine.

Similarly, if I add a second option to testOnDemandRTSPServer to stream 
a test.ts file on mpeg2TransportStreamTest and to stream stdin on 
mpeg2TransportStreamStdin then the server launched through my main 
program streams neither, yet if I launch it from the command line then 
the test file works (but obviously without a file connected to stdin the 
stdin doesn't work).

Is there any reason why or how test testOnDemandRTSPServer would be 
blocking my main program from running?

Simon Brown

-- 

Microvideo
Copley Hill Business Park
Cambridge Road
Babraham
CB22 3GN

tel: +44 1223 834119



More information about the live-devel mailing list