pyTivo - Transcoding server

Discussion in 'TiVo Home Media Features & TiVoToGo' started by armooo, Nov 25, 2006.

  1. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    48,374
    4,837
    Apr 17, 2000
    Nevada
    What this means is that I added a TiVo-TS output format to the profiles which can output to a .tivo file using the new Premiere compatible TiVo-TS format. These new files can contain either MPEG-2 or H.264 video and can be transferred to a TiVo using the standard pull method, even if you just use the free version of TiVo Desktop. There is no need to convert to MP4 and push from the PC.

    If you use pyTiVo then you can also do this with standard .ts files because the .ts files generated by VRD are now compatible with that as well. (TiVo Desktop does not currently support .ts files)

    I'm also looking at the possibility of creating a fake .tivo header so you can convert .wtv/.dvr-ms files to .tivo and retain the metadata or manually enter basic data for other file formats That might be another version out though.

    Dan
     
  2. moyekj

    moyekj Well-Known Member

    11,910
    663
    Jan 23, 2006
    Mission...
    Dan, so I'm assuming if I start with a .TiVo mpeg2 program stream or mpeg2/H.264 transport stream I can choose to output unecrypted H.264 TS that can be pulled with pyTivo? i.e. Anything pulled off a TiVo in any of the formats can be converted to unencrypted H.264 TS via VRD that will work to be pulled back to a TiVo using pyTivo?
     
  3. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    48,374
    4,837
    Apr 17, 2000
    Nevada
    Yes. The trick to making the TS streams TiVo compatible was a special random access packet. It doesn't really effect anything else so we enabled it as default for all TS output, which means the standard .ts files should work with pyTiVo the same way the ones from ffmpeg do.

    The TiVo-TS output would mainly be used to convert MPEG-2 .tivo files to H.264 .tivo files to save space.

    Dan
     
  4. txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    So with a new version of ffmpeg, I should be able to pull my MP4 files (h.264/aac) with your version of pytivo and they will be remuxed on the fly to ts (assuming I set ts=on in pytivo.conf)? Were you able to get the AAC audio remuxed to LATM/LOAS as Dan pointed out earlier in the thread? Or would my audio be converted to AC3?
     
  5. jcthorne

    jcthorne Well-Known Member

    3,114
    195
    Jan 28, 2002
    Houston
    Remember that Tivo does not support 5.1 channel AAC at all. Only 2 channel. If you want 5.1 it has to be AC3 which works fine in both TS or MP4 files.
     
  6. txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    I don't. 2 channel is what I convert everything to. My wife and I aren't audiophiles and we just listen to everything through the TV speakers. I want to keep everything compatible between iDevices and Tivo if possible. Can always stay with pushes if needed, but would love to be able to pull video up to the same folder as the recorded shows are in.
     
  7. jcthorne

    jcthorne Well-Known Member

    3,114
    195
    Jan 28, 2002
    Houston
    Guess I did not realize IOS devices still do not support AC3 audio even though Apple wrote the mp4 spec to include it.
     
  8. txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    Well...to tell you the truth, I haven't looked into that (transferring AC3 to apple devices) for quite some time. Will have to investigate...
     
  9. txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    From what I can gather, apple products still do not support AC3. I am hoping to keep my MP4 (H.264/AAC) as-is and be able to pull with wmcbrine's latest git. Might just have to tinker with it when I get a chance. Not sure if my Synology DS111 has the guts to convert even just audio on the fly in a reasonable time, so hoping that it will only need to remux.
     
  10. cherry ghost

    cherry ghost Well-Known Member

    6,114
    229
    Sep 13, 2005
    Chicago
    I use KMTTG to convert to an MP4 that contains both 5.1 AC3 and stereo AAC


    Code:
    Duration: 00:21:05.03, start: 0.033333, bitrate: 3038 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2485 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc
        Metadata:
          handler_name    : VideoHandler
        Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), s16, 384 kb/s
        Metadata:
          handler_name    : SoundHandler
        Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 160 kb/s
        Metadata:
          handler_name    : SoundHandler
     
  11. wmcbrine

    wmcbrine Well-Known Mumbler

    11,499
    701
    Aug 2, 2003
    Yes. Have I not made that clear? :confused: Yes, and it's awesome. :D

    AC3. Don't worry about it. Audio reencoding takes more overhead than remuxing, but still much, much less than video reencoding.

    For its purposes, FFmpeg treats "aac_latm" and "aac" as two different audio codecs. aac_latm is available for decoding, but not encoding. In the case of a file that already has aac_latm audio (some transport streams are like this), pyTivo will pass it through.
     
  12. larrs

    larrs Movie Fan-Addict

    1,028
    6
    May 2, 2005
    DFW
    lrhorer: what are the settings you use in Handbrake for this? How long does the average reencode take for, say, a two hour blu Ray rip?
     
  13. innocentfreak

    innocentfreak Well-Known Member

    9,165
    41
    Aug 25, 2001
    Florida
    I would be curious also. I am trying to figure out what profile will work best for my kmttg transfers mainly.
     
  14. larrs

    larrs Movie Fan-Addict

    1,028
    6
    May 2, 2005
    DFW
    ...may be wrong, but this is the first time i have ever done this. I am pretty sure I tried it before and it did not work as the file would have a red circle with slash indicating it could not transfer, but it does now.

    These are homemade AVCHD videos that have 1080/24p h264 video and ac3 448k audio. The files are 7-10GB and I am happy to report they pull in almost real time. Previously I have been converting them to h264 mp4 files, but I may not have to any longer.


    Anyone else notice this?

    EDIT: Pushes work as well. Am I crazy or is this new behavior?
     
  15. wmcbrine

    wmcbrine Well-Known Mumbler

    11,499
    701
    Aug 2, 2003
    The part where it pulls without transcoding is due to the recent changes in pyTivo. The part where it works at all -- well, I'm guessing you upgraded your FFmpeg? If so, that's why.
     
  16. larrs

    larrs Movie Fan-Addict

    1,028
    6
    May 2, 2005
    DFW
    Yes, that is it. I had not tried an m2ts file since the upgrade.
     
  17. moyekj

    moyekj Well-Known Member

    11,910
    663
    Jan 23, 2006
    Mission...
    wmcbrine, currently with ts=on setting any remux from mpeg2 program stream or mp4 containers discards any captions. In order to preserve captions "-c:s copy" needs to be part of the ffmpeg remux command.

    As a test I remuxed with ffmpeg an mpeg2 program stream containing 608 captions to mpeg2 transport stream with the above option and verified with mediainfo the captions were preserved and verified that when transferring to TiVo I could then turn captions on/off. I can supply a short test clip if needed, but it's easy to make your own by recording a short clip from any channel on TiVo with captions.
     
    ClearToLand likes this.
  18. wmcbrine

    wmcbrine Well-Known Mumbler

    11,499
    701
    Aug 2, 2003
    That's not what I'm seeing. But I'll try some more tests with and without the option.

    I thought it was interesting that "ffmpeg -codecs" reports:

    Code:
     ..S... eia_608              EIA-608 closed captions
    meaning, it can neither decode from nor encode to that format. I wasn't sure what to make of that.
     
  19. wmcbrine

    wmcbrine Well-Known Mumbler

    11,499
    701
    Aug 2, 2003
    Yeah, so far I'm not seeing any difference with "-c:s copy" or without. No acknowledgement from ffmpeg that it's doing anything with the option, for that matter. I think the captions are just being copied as part of the video. This is all with MPEG-2 PS -> TS.

    (As I mentioned earlier, what I'm seeing -- with or without the option -- is that captions are copied, but the copy is slightly lossy.)
     
  20. moyekj

    moyekj Well-Known Member

    11,910
    663
    Jan 23, 2006
    Mission...
    Hmm, yes looks like there is something else going on. Looks like there are different mux modes for captioning. DVD sources with 608 captions don't work for me. Here's how mediainfo reports them (after remuxing to TS with ffmpeg):
    Code:
    Text
    ID                               : 256 (0x100)-DVD-2
    Menu ID                          : 1 (0x1)
    Format                           : EIA-608
    Muxing mode                      : DVD-Video
    Muxing mode, more info           : Muxed in Video #1
    Duration                         : 1mn 0s
    Bit rate mode                    : Constant
    Stream size                      : 0.00 Byte (0%)
    
    On the other hand, TiVo source with 608 captions does work (with pyTivo as is):
    Code:
    Text #1
    ID                               : 256 (0x100)-608-1
    Menu ID                          : 1 (0x1)
    Format                           : EIA-608
    Muxing mode                      : A/53 / DTVCC Transport
    Muxing mode, more info           : Muxed in Video #1
    Duration                         : 49s 182ms
    Bit rate mode                    : Constant
    Stream size                      : 0.00 Byte (0%)
    
    For the case of DVD captions it doesn't work with or without "-c:s copy" so sorry for that.
    I'll have to look at this some more to see if there is a way to get captions working from DVD sources.
     

Share This Page