1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Capturing Slingbox 350/500 video

Discussion in 'TiVo Coffee House - TiVo Discussion' started by moyekj, May 25, 2013.

  1. Oct 3, 2013 #61 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    No you can mimic any remote button press. You can look at the Perl script yourself: slingbox\rec2.pl for the Pro models. Lines 65-72 have the channel change related code:
    Code:
    if ($chan) {         # want to tune to a channel
        $ircmds = '';
    #   $ircmds = pack("v4", 0x21, 500, 0x24, 500); # send Menu, Exit (in case power off)
        for $chdigit (split(//, sprintf("%04d", $chan))) {
            $ircmds .= pack("v2", $chdigit ? $chdigit + 8 : 18, 500);
        }
        sling_cmd(0x87, $ircmds . pack("x456 v4", 3, 0, 0, 0));
    }
    
    You'd have to figure out what the hex values are for each button press though. The 500 above I believe is #millisecs between button presses to use. Don't know how the original author figured out the hex values for each so that would be something you'd have to play with.
     
  2. Oct 27, 2013 #62 of 155
    morac

    morac Cat God

    8,962
    23
    Mar 14, 2003
    NJ
    I tried out kmttg with my Slingbox Pro HD and it captures video without a problem. The only issue I'm seeing is that the default resolution/aspect ratio is way off. I captured to a matroska formatted file and the default resolution is 1920x544 (aspect ratio 3.53:1). If I manually change the aspect ratio to 16:9 it looks fine, but it seems like it should pick a better default.

    On a side note there's a few things you can tweak in your instructions:

    1. You can get the Slingbox ip address and port at http://support.slingbox.com/
    2. You can play the files in WMP if you install the Haali Media Splitter and ffdshow tryout codecs.
     
  3. Oct 27, 2013 #63 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    I'll add a note about IP + port.
    I don't have a Slingbox Pro to experiment with. But you may want to try hardcoding different values of $vs in slingbox\rec2.pl script and perhaps set $hd=1 (after the GetOptions call) to see if you can get a better default resolution and aspect ratio. On the 350/500 $vs=16 gives 1920x1080 and 16:9 aspect ratio and bit rate can be up to 7Mbps which results in really nice captures.
     
  4. Oct 27, 2013 #64 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
  5. Oct 27, 2013 #65 of 155
    morac

    morac Cat God

    8,962
    23
    Mar 14, 2003
    NJ
    Odd. I wonder how the SlingPlayer iPad app works then. It outputs 720p from 1080i sources and looks fine. Unless it's doing some kind of hardware scaling.
     
  6. Oct 27, 2013 #66 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    Using VLC player if you set 16:9 aspect ratio it looks OK right? So perhaps the iPad player is doing just that?
     
  7. Nov 4, 2013 #67 of 155
    benicehavefun

    benicehavefun New Member

    16
    0
    Nov 4, 2013
    Thanks moyekj for including this nifty Perl script in kmttg. I have both a Solo and a Pro HD, with the Solo connected to a D*TV HD DVR so it's the one I'd like to use. So far, Slinguist's updated script "rec2a.pl" from page 9 of the Place Shifting Enthsiasts "How to record slingbox pro HD stream..." thread, is working fine with the Solo. I'd love to be able to run it through kmttg, though a quick jEdit compare of "rec2.pl" in your package and Slinguist's "rec2a.pl" leads me to believe a straight swap isn't going to work. Hard to tell what you changed vs Slinguist's changes from 2 to 2a. Is there an easy way to get 2a up and running with kmttg?
     
  8. Nov 4, 2013 #68 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    I have a Solo (the original Slingbox Solo) and couldn't get it to work with that modified version. I would say if you can try it out using straight Perl (i.e. not through kmttg) and manage to get it working with your Solo, then I can put in the effort to support it through kmttg. i.e. Basically just download the rec2a.pl script and modify IP and password as necessary and then run it directly using Perl to see if you can get it to work. It didn't quite work for me - I managed to connect to my Solo but it didn't like 1 or more commands sent from the script and was not able to capture anything.
     
  9. Nov 4, 2013 #69 of 155
    benicehavefun

    benicehavefun New Member

    16
    0
    Nov 4, 2013
    I did another test this afternoon, this time with an hour long episode recorded in 1080i as a source and I'm able to capture a 640x480 recording using the Solo. So, a successful 60 minute capture today plus a couple of shorter prior tests, a half-hour and about 10 minutes. I haven't had any recording or playback issues. My Solo is about 5 years old, but has up-to-date firmware. Also, I've replaced the capacitors (which were bulging) causing lots of network disconnects. Since the capacitor replacement in June it's been working as new.

    Anyway, if you're willing to implement the rec2a.pl script in kmttg, that would be fantastic! I'll definitely make use of it. This is one of the more convenient ways (for me) to get recordings off of my "locked-down" DVR.

    BTW, I also experimented with Slinguist's suggested script change in Post 96 of the Place Shifting Enthusiasts thread, to get Play/Pause implemented as a command line option. In kmttg, perhaps in the channel change field? That would be sweet too, as one could start playback using a Sling client, pause it, and let the Slinguist script resume the playback upon execution. Unfortunately, I couldn't get it to work, the script would throw an error message immediately and never start capturing. Perhaps there was an issue using "p" as a command line argument rather than a channel number?

    Thanks for taking a look at this!
     
  10. Nov 4, 2013 #70 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    Can you attach here or provide a link to rec2a.pl script. I can't seem to find it or any attachments in that thread anymore (perhaps it requires login to see them).
     
  11. Nov 4, 2013 #71 of 155
    benicehavefun

    benicehavefun New Member

    16
    0
    Nov 4, 2013
    Downloads are a little odd there, as you have to be logged in and you need to be sure you're not looking at a page cached in your browser if you went to the page before logging in! Login, then refresh page 9 and look at post #90. I don't have enough posts in this forum to attach a link but the download is at "placeshiftingenthusiasts.com/wp-content/sp-resources/forum-file-uploads/slinguist/2013/07/rec2a.zip"

    If you end up back at the Place Shifting forum, and have a moment, see if the change Slinguist is talking about in post #96 has any obvious flaws. It didn't work for me, but it would be slick if we could send a "Play" IR command rather than a channel change for capturing existing DVR recordings...
     
  12. Nov 7, 2013 #72 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    OK, I took that rec2a.pl script and added the kmttg related changes to it. So you can try now in your kmttg installation rename the existing rec2.pl under slingbox folder to something else, and then rename the rec2a.pl in attached zip file to rec2.pl and put it under kmttg slingbox folder. Then choose Slingbox Pro in kmttg and see if the captures work.

    NOTE: I didn't test the script at all after making changes.
     

    Attached Files:

  13. Nov 7, 2013 #73 of 155
    benicehavefun

    benicehavefun New Member

    16
    0
    Nov 4, 2013
    Thanks moyekj! I just downloaded the zip, so I'll give it a try and let you know how it works...
     
  14. Nov 7, 2013 #74 of 155
    benicehavefun

    benicehavefun New Member

    16
    0
    Nov 4, 2013
    I've done a couple of quick 5 minute captures in .ts and .mkv and they look great. Thanks again. I'd like to be able to do a QSF and output to a WTV container, followed by Comskip processing (my standard work flow). I tried loading both clips into VideoRedo, without success. The .ts file gave me an error about header info, the .mkv loaded but the video looks terrible. Are there any options you can think of in kmttg that would produce a video file that could be opened in VideoRedo? Are the QSF, Ad Detect and Encode options in kmttg available for Slingbox captures too?
     
  15. Nov 7, 2013 #75 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    Not sure what the Solo spits out for video but I don't think it's H.264 like the Pro and later do. Perhaps you can make a capture available so I can download and take a closer look?
     
  16. Nov 8, 2013 #76 of 155
    benicehavefun

    benicehavefun New Member

    16
    0
    Nov 4, 2013
    I'm attaching a link to a zip file containing two 5 minute sample captures for you to take a look at. Let me know when you've downloaded the file so I can delete it from Mega. Thanks again for the help!

    EDIT: Link deleted by benicehavefun
     
  17. Nov 8, 2013 #77 of 155
    benicehavefun

    benicehavefun New Member

    16
    0
    Nov 4, 2013
    I'll be interested to hear what you think about the quality of the video coming off the Solo. It looks pretty good to me. When I Sling to my iPad I'm able to get "High Quality" off both my Solo and my Pro HD -- and they look identical.
     
  18. Nov 8, 2013 #78 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    OK, I got it. The video is in H.264 format and yes it looks pretty nice. I also had trouble playing your mkv capture with VRD TVS4. However, when I started VRD a new version was available which I installed. The latest version is able to play the mkv capture properly. However, running qsfix or making cuts in the video and saving it results in garbled mess. I would suggest you post in VRD forums and upload the mkv to their ftp site for them to look at.

    Time permitting I'll try and compare an mkv capture from my 350 to see what could be different. I also have actually never tried a qsfix or edits on a 350 mkv capture, so I'll try that out to see if that works OK.
     
  19. Nov 10, 2013 #79 of 155
    morac

    morac Cat God

    8,962
    23
    Mar 14, 2003
    NJ
    I'm not sure why, but when I tried to edit a 640x480 mkv file captured from my Slingbox Pro-HD in VideoRedo TV Suite and save it back to either a mkv or mp4, VideoRedo removed all the audio resync so basically the audio was lost.

    The audio appears to be AC3. That's not an output option for VideoRedo. I tried re-encoding the audio, but that didn't help. It doesn't look like VideoRedo can process the audio on the files. It can play it, but can't do anything with the file.

    Here's what the output showed:

    Video output frames: 3640
    Audio output frames: 76
    Processing time (secs): 15
    Processed frames/sec: 241.89
    Actual Video Bitrate: 133.70 Mbps
    Audio resync frames removed: 2323

    Edit:

    Doing a quickstream fix results in the same issue.

    I tried re-encoding, but that generated an error. Basically I can't edit the file in VideoRedo TV Suite.

    Edit 2:

    I think part of the problem might be that the reported frame rate is 1000 fps which is obviously wrong. The video plays back fine in every program I've tried so far. Editing is problematic though. I used ffmpeg to convert to a mp4 file and the resulting file played the audio at a normal speed, but the video was in extreme slow motion (less than 1 fps).

    Edit 3:

    I tried to use VideoRedo's elementary muxing capability to split the mp4 file and grab the m4a audio and then split the mpv and grab the H.264 video. VideoRedo complains the H.264 video file is not recognized as video, despite it having just created it.
     
  20. Nov 10, 2013 #80 of 155
    moyekj

    moyekj Well-Known Member

    11,151
    34
    Jan 23, 2006
    Mission...
    I think for these Slingbox Pro and earlier models the problem goes back to what Dan explained earlier in this thread:
    http://www.tivocommunity.com/tivo-vb/showthread.php?p=9838027#post9838027

    For benicehavefun sample above when I examine the mkv file with mediainfo, frame rate information is not available. In contrast for an mkv capture from my Slingbox 350 when I examine it using mediainfo, frame rate information is present under Video section. I'm able to edit mkv captures from my 350 with VRD without problems. So the 350 is putting extra information in container including frame rate.

    It appears that VRD needs to have the frame rate information when editing the mkv file in any way, else it doesn't work properly.
    It would be good to get some samples to VRD folks to get their perspective. If there's a way to improve the combination of capture + ffmpeg to make a VRD friendly version then I'd like to know about it.
     

Share This Page