Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was facing the same issue and looked into the Python VLC bindings but because I was pressed for time and there was a lack of examples using the bindings, I went for another approach.</p> <p>The vlc command line is extremely powerful. Using subprocess.call i did direct calls to the vlc command line. </p> <p>This is the format I used and it worked beautifully.</p> <pre><code>subprocess.call([path_to_vlc, mms_url, '--sout', 'file/avi:'+target_file, 'vlc://quit']) </code></pre> <p>In the part of the list of parameters you send to call, here is a description of each:</p> <ul> <li><strong>path_to_vlc</strong> -- As the name suggests. You don't have to use " to encapsulate spaces as with os.system for Program Files, etc. subprocess.call does that for you.</li> <li><strong>mms_url</strong> -- is the url to the stream. Since in my case it was a mms stream the param name stuck. You can use any of the supported vlc stream prefixes.</li> <li><strong>'--sout'</strong> -- since call encapsulate spaces for you, you need to explicitly separate each param where a space is needed. The actual param here is --sout file/avi:.... but we have to split them into two.</li> <li><strong>'file/avi:'+target_file</strong> -- The uri (and muxer) pointing to the target file. I used no path to the file since I was standing in the target directory when calling the python script. The target file should </li> <li><strong>'vlc://quit'</strong> -- Last we tell vlc to quit after playback. This way you get rid of the zombie vlc windows that stick around after.</li> </ul> <p>If you wish to see the full code i used to first find the it <a href="http://blog.ireality.no/2011/03/parsing-webpage-for-streams-and.html" rel="nofollow">here</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload