Hi,
I'm trying to get a minimal example for using a named pipe as a source of a 
stream for the LIVE555TM Media Server.
As a proof of concept, I would like to get a working example of making a stream 
from a sample.264 file into a named pipe and use the named pipe with a .264 
extension to have Media Server stream it.

Working example (video plays in vlc)
Files:
rawh264_sample            #The original slamtv60.264 just renamed
periodic_read.py            #A dummy application that creates a binary stream 
from the rawh264_sample
stream.264                     #The named pipe, created with "mkfifo stream.264"
live555MediaServer       #The server binary from mediaServer

Steps:
./live555MediaServer
Run vlc -> Ctrl+n (Open Network stream) -> rtsp://xx.xx.xx.xx:8554/stream.264
cat rawh264_sample >> stream.264
cat rawh264_sample >> stream.264       #It had to be called twice

---------------------------------------------------------------------------------------------------------------------------------

The idea is to make a simple streamer that just chops the raw video file and 
periodically sends chops.
The code the dummy streamer (periodic_read.py) is below everything.

Example I didn't get to work (The video starts loading in vlc but breaks)
Files:
rawh264_sample            #The original slamtv60.264 just renamed
periodic_read.py            #A dummy streamer that creates a binary stream from 
the rawh264_sample
stream.264                     #The named pipe, created with "mkfifo stream.264"
live555MediaServer       #The server binary from mediaServer

Steps:
./periodic_read.py > stream.264         #Move the raw file to the pipe
./live555MediaServer
Run vlc to get the stream


What happens is that the vlc shows that the buffer is loading, but breaks after 
half. The video never starts to play.
I get an error on the streamer side:
Traceback (most recent call last):
  File "./periodic_read.py", line 14, in <module>
    print chunk
IOError: [Errno 32] Broken pipe


Is it possible that the problem is in the sync between the streamers write 
speed and mediaServers read speed?
Other comments are welcome :)


------------------------------------------------------------------
# periodic_read.py
#!/usr/bin/python
import time
import sys

file_path = "rawh264_sample"
chunk_size = 1000
frequency = 200
f = open(file_path, "rb")
while True:
    chunk=f.read(chunk_size)
    print chunk
    time.sleep(1/frequency)
if chunk == '' :
    break

------------------------------------------------------------------


DISCLAIMER:
This e-mail may contain confidential and privileged material for the sole use 
of the intended recipient. Any review, use, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or 
authorized to receive for the recipient), please contact the sender by reply 
e-mail and delete all copies of this message.
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to