MPlayer from script

I need to start MPlayer from within a script to take the output from RTMPDump.

This works on Linux:

Quote:rtmpdump --rtmp "rtmpe://" --flashVer "WIN 11,0,1,152"

--swfVfy "" --conn Z: --playpath


940e483cc51cfa2ff4ec284d&__nn__=659726446001" -o -| /usr/bin/mplayer -

So, I tried to build this into a string and send it to os.system:

Quote:PlayString = 'rtmpdump --rtmp "rtmpe://" --flashVer "WIN 11,0,1,152"

--swfVfy "" --conn Z: --playpath


940e483cc51cfa2ff4ec284d&__nn__=659726446001" -o -| /usr/bin/mplayer -'

os.system(PlayString) [quote]

Now, I can see (ps -eaf) that the rtmpdump starts and mplayer starts, but the screen stays at the XBMC page.

How do I bring MPlayer to the foreground ?


I think you would need to use Popen to do that but you shouldn't need to. If you can get the stream with rtmpdump you should be able to play with xbmc if you format the url like this, from you rtmpdump above

rtmpe:// swfUrl= conn=Z: playpath=mp4:videos/19582164001/19582164001_1689951214001_b17-C5159720119A1-H264-1500-16x9.mp4?e=1340399144&h=24151f00940e483cc51cfa2ff4ec284d&__nn__=659726446001

You may need to add swfVfy=true and/or live=true.
Quote:I think you would need to use Popen to do that but you shouldn't need to

Thanks - that would be true if DVDPlayer supported/honoured the "socks" option, but it doesn't. I've opened a bug against that.

So, I need to use RTMPDump and pipe the output to Mplayer (or DVDPlayer).

I'll investigate Popen.

Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
MPlayer from script00