0

I'm using ffmpeg as a proxy for playing RTSP streams in VLC (because it seems that VLC doesn't work too well with TCP-based RTSP streams). While in Linux I'm doing this by creating a FIFO file and using it as output for ffmpeg, in Windows I can't do this because os.mkfifo() doesn't work under this OS. So I have to find a way to start ffmpeg with subprocess.Popen() and sending it's converted data to VLC in real time (I'm using the VLC bindings for Python).

I tried to set ffmpeg's output to stdout (ffmpeg.exe -y -i rtsp://fms30.mediadirect.ro/live/utv/utv?tcp -acodec libmp3lame -ar 44100 -vodec copy -f flv -), catching that output and sending it to a SimpleHTTPServer class using sockets (well, I'm not sure that this approach was a good idea). I also tried by using pipes (with win32pipe.CreateNamedPipe) but I was still out of luck.

How I could do this? Or why VLC doesn't want to play this stream (rtsp://fms30.mediadirect.ro/live/utv/utv) while ffmpeg will can? This is the actual code used in Linux, which doesn't works on Windows: http://pastebin.com/vqX1Edwg

ov1d1u
  • 958
  • 1
  • 17
  • 38
  • You can check VLC property *RTP over RTSP (TCP)* under *Tools -> Show Settings (All) -> Input/Codecs -> Demuxers -> RTP/RTSP*. This will enable a TCP-based RTSP session (interleaved RTP i.e. RTP over the RTSP TCP channel.) http://thompsonng.blogspot.com/2011/03/rtsp-rtp-over-tcp.html and http://stackoverflow.com/questions/2408233/how-to-force-client-to-switch-rtp-transport-from-udp-to-tcp – ee. Mar 12 '12 at 09:48
  • I tried that, but it's seems that it's not working – ov1d1u Mar 12 '12 at 10:06
  • Is there any user:password required? It looks like it is coming from a RealMedia server. VLC has a specific issue with it http://wiki.videolan.org/Real_Media_Video and it seems that I could not find demuxer for Real format under VLC 2.0.0 (Windows) – ecle Mar 12 '12 at 11:27
  • No, there's no authentication required. The stream is also working with Totem (and other GStreamer-based players), without providin any username or password. Only Windows Media Player is requiring this, for an unknown reason... – ov1d1u Mar 12 '12 at 12:29
  • I've checked with Wireshark: VLC stucks early unable to request `DESCRIBE` RTSP session from RealMedia server right after `CSeq: 1` – ecle Mar 12 '12 at 22:36

0 Answers0