Question about playing DVB-T with subprocess in python

This forum is about all development around libVLC.
BenWen
New Cone
New Cone
Posts: 2
Joined: 16 Jun 2009 18:49

Question about playing DVB-T with subprocess in python

Postby BenWen » 16 Jun 2009 19:03

I am trying to play DVB-T with VLC, this is suppose to be a working command for VLC
dvb-t:// :dvb-frequency=593000 :dvb-bandwidth=6: program=530

I am using Python and want to use subprocess to run this command, here is my code

command = ':sout=#duplicate{dst=display,dst=std{access=file,dst=test.ts})'
vlc_path = r'C:\Program Files\VideoLAN\vlc\vlc.exe'
dvbprocess = subprocess.Popen([vlc_path, '-vvv', 'dvb-t:// :dvb-frequency=593000 :dvb-bandwidth=6 :program=503',command])


but if i execute this i will get this error
VLC cannot open MRL 'dvb-t:// :dvb-frequency=593000 :dvb-bandwidth=6 :program=503'

Does anyone know what wrong with my code. Thanks for your help and i will be appriciate to hearing from you.

Best regards,
Ben

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Question about playing DVB-T with subprocess in python

Postby CrapulaX » 17 Jun 2009 14:27

Does the entire command used directly in DOS console is working ?
Are you able to launch VLC with other commands using your script ( only an input file for instance) ?

May be the '//' is not well recognized ? Did you try using "..." instead of '...' ?

BenWen
New Cone
New Cone
Posts: 2
Joined: 16 Jun 2009 18:49

Re: Question about playing DVB-T with subprocess in python

Postby BenWen » 17 Jun 2009 17:59

This command is working in command line
vlc -vvv dvb-t:// :dvb-frequency=593000 :dvb-bandwidth=6 :program=503
i've tried "..." instead of '...' but it still not working.

Finally i found the way to solve. Python subprocess.popen not allow to open command with space inside it, so my command should like this :-)
subprocess.Popen([vlc_path, '-vvv', 'dvb-t://', ':dvb-frequency=593000', ':dvb-bandwidth=6', ':program=503'])


Best regards,
Ben


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 24 guests