Page 1 of 16 12311 ... LastLast
Results 1 to 15 of 229

Thread: VLC modules for playing, streaming, etc.

  1. #1
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    76

    VLC modules for playing, streaming, etc.

    I have written two Tivo modules for the VLC media player. Info on VLC can be found here. It's an open-source media player that plays all sorts of media files, with its own codecs.

    Basically, with these modules, you can now use VLC to play TY files like this:
    Code:
    vlc filename.ty                    (play a TY file)
    vlc tivo://my-tivo-host/nnnn       (nnnn is fsid)
    vlc tivo://my-tivo-host/nnnn/pppp  (pppp is part 0,1,2,3...)
    vlc tivo://my-tivo-host/list       (lists programs on the tivo)
    vlc tivo://my-tivo-host/llist      (detail list of programs)
    VLC is actually far more sophisticated and can do things like transcode the file to another format and stream it out using several different protocols. All in one step! I use this setup to pull shows off my DTivo, transcode them to ASF/DIV3, and stream them out at low bandwidth over my cable modem (and like I said, it's one step). Then I can watch them wherever using Windows Media Player. And VLC has a built-in web server that gives this whole thing even greater potential, if someone can put it all together.

    The two modules are a demux and vstreamer. Currently, the demux module only plays TY files from Series 1 Tivos. If I had some Series 2 or HD streams to test with, it would support those as well, but ... The vstream module allows VLC to connect to a Tivo running the vstream server. It's a bit less stable & complete, but works well for now.

    I've attached windows binaries of the two modules. They're DLLs and go in your VLC plugins directory, and are for the current 0.8.1 release of VLC. The source for an early version of TY demux module (if anyone's interested) can be found in the VLC nightly source snapshot from their website. The source for the vstream module isn't available yet; I've got a couple of things to add before I release it.

    Stealthdave has graciously agreed to compile them for Mac and i386-Unix and will hopefully post them soon.

    tx413

    Edit: Latest source & binaries attached. Bugs fixed. Support for Series 2.
    Attached Files Attached Files
    Last edited by tx413; 04-18-2005 at 03:25 PM. Reason: updated source & binaries to latest

  2. #2
    Join Date
    Mar 2005
    Posts
    8

    Examples for VLC

    This sounds like what I have been looking for. Would you mind listing a couple of advanced command line examples for VLC:

    1. Http based streaming of live recoding from a TiVo (vlc doing transcoding/server).
    2. Pulling an existing recording off a TiVo and saving it in mpeg-4 format (vlc doing transcoding).

    vlc is so extemely flexible that it is little difficult to determine the correct options for a vlc newbie.

    Thanks in advance,
    Jens
    Last edited by hojbjerg; 03-16-2005 at 10:56 AM.

  3. #3
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    76
    Quote Originally Posted by hojbjerg
    Would you mind listing a couple of advanced command line examples for VLC:

    1. Http based streaming of live recoding from a TiVo (vlc doing transcoding/server).
    2. Pulling an existing recording off a TiVo and saving it in mpeg-4 format (vlc doing transcoding).
    Well, it looks like the "Live" streams aren't playing so well using the vstream module. I'm looking into that. But for other programs, to stream them out over HTTP would be like this:
    Code:
    vlc --sout=#transcode{vcodec=DIV3,vb=256,scale=0.5,acodec=mp3,ab=64,channels=2}
    :duplicate{dst=std{access=mmsh,mux=asfh,url=0.0.0.0:1234}}
    tivo://my-tivo-address/nnnnnnn
    Where nnnnnnn is the fsid. Of course it all should go on one line (NO SPACE BEFORE :duplicate, SPACE BEFORE tivo://), I broke it up to make it look pretty in here. That will transcode to DIV3 video, mp3 audio, scale the image by half, and stream it out over any tcp interface at a combined bitrate of about 320 Kbits/sec. This is playable by Windows Media Player. Another cool option to add in there after "scale" is "fps=20" which would lower the frame rate to 20 frames per second. Or you could try 15 or 10 or whatever. That really saves on bandwidth if you can stand to watch it.

    For transcoding to mpeg-4, you would do something like this:
    Code:
    vlc --sout=#transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}
    :duplicate{dst=std{access=file,mux=ts,url="c:\output.mpg"}}
    tivo://my-tivo-address/nnnnnnn
    The video bitrate is 1Mbit, audio bitrate is 192Kbit. You may want to adjust the "mux=" setting to ps, or asf, or something else. That's the encapsulation, and to be honest I'm not sure what's the proper choice. Using the above, WMP complains about needing a MP4S codec when playing the resulting file. VLC plays it just fine, though.

    All of these settings are available within the VLC gui; you don't have to use the command line. And remember: Windows Media player is very very picky about some things. VLC of course plays everything just fine. So if you're streaming, use VLC on both ends for best results.

    Edit: I've adjusted the streaming example above to be more compatible with WMP.
    Last edited by tx413; 03-16-2005 at 02:30 PM. Reason: adjusted streaming parameters

  4. #4
    Join Date
    Feb 2002
    Posts
    285

    OS X modules for VLC 0.8.1

    OS X modules for VLC 0.8.1 availabl!

    Just download and unzip, then copy them into the VLC.app in the Contents/MacOS/modules folder. For example, if VLC.app is in your /Applications folder, open your terminal:
    Code:
    $ cp libtydemux_plugin.dylib /Applications/VLC.app/Contents/MacOS/modules
    $ cp libvstream_plugin.dylib /Applications/VLC.app/Contents/MacOS/modules
    Attached Files Attached Files
    - Stealth Dave

  5. #5
    Join Date
    Mar 2005
    Posts
    8

    Can't get to work on a dtivo s2

    I can't seem to get these plug-ins to work.

    - I downloaded and installed vlc 0.8.1 for win32
    - Copied the libty*.dll and libvstream*.dll to c:\program files\videolan\vlc\plugins
    - In command prompt:

    cd c:\program files\videolan\vlc
    vlc.exe tivo://192.168.1.107/list

    The vlc gui shows and selecting view->messages says:
    Code:
    main error: no suitable access module for `tivo://192.168.1.107/list'
    vserver is running, as I can view streams through tivowebplus.

    Doing vlc.exe tivo://192.168.1.107/142582 causes a video window to show, but no video or sound. Following are some of the error messages:

    Code:
    main warning: late picture skipped (1673263915)
    main warning: late picture skipped (1673263943)
    tydemux debug: parsing ty chunk #47
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: free bitrate mode
    mpeg_audio debug: frame too big 2091 > 2090 (emulated startcode ?)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    libmpeg2 warning: invalid picture encountered
    libmpeg2 warning: invalid picture encountered
    libmpeg2 warning: invalid picture encountered
    main warning: late picture skipped (1673364437)
    main warning: late picture skipped (1673364466)
    libmpeg2 warning: invalid picture encountered
    libmpeg2 warning: invalid picture encountered
    libmpeg2 warning: invalid picture encountered
    tydemux debug: parsing ty chunk #48
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    main warning: late picture skipped (1673464757)
    main warning: late picture skipped (1673464776)
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode
    mpeg_audio debug: emulated startcode (no startcode on following frame)
    mpeg_audio debug: emulated startcode
    Any idea?
    Last edited by hojbjerg; 03-16-2005 at 09:09 PM.

  6. #6
    Join Date
    Jul 2004
    Location
    California
    Posts
    298
    I am getting the exact same results as hojbjerg. No joy. But, this is EXACTLY what I have been hoping for! Thanks for making some progress on VLC playback!!

  7. #7
    Join Date
    Jul 2004
    Location
    California
    Posts
    298
    And when I try to play a .ty file locally, I get similar results, but the following error messages in VLC:

    Code:
    .....
    main warning: late picture skipped (32974350447)
    main warning: late picture skipped (32974350467)
    libmpeg2 warning: invalid picture encountered
    libmpeg2 warning: invalid picture encountered
    libmpeg2 warning: invalid picture encountered
    ........

  8. #8
    Join Date
    Feb 2003
    Location
    PDX
    Posts
    36
    Stealthdave,

    libtydemux_plugin.dylib.bz2 unzipped as an empty folder. libvstream_plugin.dylib.bz2 unzipped fine.

  9. #9
    Join Date
    Feb 2003
    Location
    Texas
    Posts
    76

    Series 1 only

    hojbjerg:
    You must have missed the part of my original post where I said dumux (playing) only works on Series 1 Tivos. I don't have a S2 unit or any streams to test / develop with. If someone could give me some samples, I'd be glad to get S2 support going.

    As for the vstream, however, you should at least be able to get the list. It shows up in the "messages" window as well. It will indeed error out with the error you showed, because VLC is trying to "play" something and all we're doing is providing a file list. Do this: (1) Start VLC with no command line arguments. (2) Open the "messages" window. (3) Open a "stream" of tivo://192.168.x.x/list and see what happens in the messages window.

    The list isn't so pretty right now. Next release will fill up the VLC playlist with all programs from the tivo. Then you can just pick one from the playlist.

    And, sadly, getting a play list won't do you any good since you have an S2 unit. The sooner I get some streams, the sooner S2 support starts working!

  10. #10
    Join Date
    Jun 2003
    Posts
    592
    Quote Originally Posted by tx413
    The sooner I get some streams, the sooner S2 support starts working!
    I can provide SA S2 streams... do you have a place to "stash" them? This will be very handy for me if you can get S2-support working.

    -psxboy
    TCD652160 TivoHD
    1TB
    11.0m-01-2-652

  11. #11
    Join Date
    Feb 2002
    Posts
    285
    Quote Originally Posted by aersloat
    Stealthdave,

    libtydemux_plugin.dylib.bz2 unzipped as an empty folder. libvstream_plugin.dylib.bz2 unzipped fine.
    Hmmm... for some reason, this module looks like a folder to Stuffit. No matter what I compress it with, Stuffit turns it into a folder. If you decompress it from the command-line with "bzip2 -d libtydemux_plugin.dylib.bz2", the module will uncompress intact.
    - Stealth Dave

  12. #12
    Join Date
    Feb 2003
    Location
    PDX
    Posts
    36
    thanks; that did the trick.

  13. #13
    Join Date
    Jan 2004
    Posts
    8
    stealthdave,

    Are you going to continue to work on your tystreamer project or is there any chance you'd consider changing gears a bit and write a web frontend for this VLC streaming?

    I briefly tried to figure out how to do it but eventually gave up, I just don't know enough about .php to do it properly, but I was able to find a resource that may help.

    http://members.liwest.at/scoutice/thomas/vlc.htm

    On that site someone did a web based frontend for streaming live tv from a pc capture card, maybe some of that could be usefull to someone more gifted at php then I.

    I figured you'd probably be able to put one together pretty fast by re-using a lot of your tystreamer code. You could still use the mencoder setup to fetch the program id's from the tivo and present the list, and store all the vlc.exe parameters in the .ini file like the mencoder/ffmpeg parameters were previously stored. I hate to impose, but a good frontend would really tie this together Wish I could help out this project more.

    T

  14. #14
    Join Date
    Nov 2002
    Posts
    221
    Quote Originally Posted by Twitch1977
    stealthdave,

    Are you going to continue to work on your tystreamer project or is there any chance you'd consider changing gears a bit and write a web frontend for this VLC streaming?

    I briefly tried to figure out how to do it but eventually gave up, I just don't know enough about .php to do it properly, but I was able to find a resource that may help.

    http://members.liwest.at/scoutice/thomas/vlc.htm

    On that site someone did a web based frontend for streaming live tv from a pc capture card, maybe some of that could be usefull to someone more gifted at php then I.

    I figured you'd probably be able to put one together pretty fast by re-using a lot of your tystreamer code. You could still use the mencoder setup to fetch the program id's from the tivo and present the list, and store all the vlc.exe parameters in the .ini file like the mencoder/ffmpeg parameters were previously stored. I hate to impose, but a good frontend would really tie this together Wish I could help out this project more.

    T
    Although I was able to get tystreamer to work, I was pretty much wondering the same thing. BTW: I wasn't able to get the linked VLC app to work.

    Thanks for everything, and keep up the fantastic work guys.
    Scott

    SAT-T60 Ver 3.5

  15. #15
    Join Date
    Feb 2002
    Posts
    285
    Actually, the future of TyStreamer most definitely is VLC and VOD (Video On Demand). I've done some preliminary testing, and it looks very promising! The advantages of using VLC are many:

    • Single application - tx413's ty module has been accepted by the VLC team and will be part of the next official release of VLC! Woohoo!
    • WMP compatibility - something that seems very important to TyStreamer users. VLC can stream video compatible with the popular MS player
    • Stream stability - as most TyStreamer users have found out, there are stability issues with the current streams. Even under the best of conditions, they tend to give out after 3-4 minutes rather unexplanably
    • Webserver compatibility - TyStreamer has issues with Apache 2 for some unknown reason, which really bugs the $&!# out of me! VLC uses its own built-in server to stream the video. It's very effective.
    • Vstream module rocks!!!

    There are only a couple of things holding back a VLC-based:
    • S2 compatibility - the current ty module only works on S1 streams. tx413 is working very hard to improve that, but he needs test streams! Does anyone have a large ftp server that could be used to collect test streams for him? Or people could snail-mail him DVDs or CDs with test streams. (I did, which led to better S1 support. )
    • VOD - the current VOD implementation can only transcode to MPEG2; mpeg4 is a much better streaming codec for lower bandwidth connections. I could use non-VOD solutions, but they're not as slick

    There might be a couple more issues that I'm forgetting, but those are the major ones. But I've no doubt that the next revision of TyStreamer will be VLC-based, thanks in no small part to tx413's great work!
    - Stealth Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •