Thread Rating:
  • 0 Vote(s) - 0 Average
MPlayer from script
#1
Hi

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

This works on Linux:

Quote:rtmpdump --rtmp "rtmpe://bt.fcod.llnwd.net:1935/a800/o10/&" --flashVer "WIN 11,0,1,152"

--swfVfy "http://admin.brightcove.com/viewer/us20111026.1813/connection/ExternalConnection_2.swf" --conn Z: --playpath

"mp4:videos/19582164001/19582164001_1689951214001_b17-C5159720119A1-H264-1500-16x9.mp4?e=1340399144&h=24151f00

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://bt.fcod.llnwd.net:1935/a800/o10/&" --flashVer "WIN 11,0,1,152"

--swfVfy "http://admin.brightcove.com/viewer/us20111026.1813/connection/ExternalConnection_2.swf" --conn Z: --playpath

"mp4:videos/19582164001/19582164001_1689951214001_b17-C5159720119A1-H264-1500-16x9.mp4?e=1340399144&h=24151f00

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 ?

Thanks

David
Reply
#2
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

Code:
rtmpe://bt.fcod.llnwd.net:1935/a800/o10/& swfUrl=http://admin.brightcove.com/viewer/us20111026.1813/connection/ExternalConnection_2.swf 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.
Reply
#3
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.

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



Logout Mark Read Team Forum Stats Members Help
MPlayer from script00