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

New program for 1 step TTG downloads, decryption, encoding - kmttg

Discussion in 'TiVo Home Media Features & TiVoToGo' started by moyekj, Mar 15, 2008.

  1. May 16, 2012 #4081 of 10413
    OOOOPS!

    OOOOPS! New Member

    25
    0
    Aug 7, 2003
    Thanks again. Good to know I can still copy and paste. :)
    now kmttg/ffmpeg is complaing about something else :eek:
    One other thing I pulled this off the tivo if that makes any difference. I did not have a dvd source handy at work. The stream is from an ota recording.
    Code:
    04 SHOWS, 908 GB USED, 2 GB FREE
    >> ENCODING WITH PROFILE 'ff_tivo_cartoon' TO FILE E:\Tivo\kmttg\Curious George Maple Monkey Madness.mp4 ...
    E:\Tivo\kmttg\ffmpeg\ffmpeg.exe -y -i "E:\Tivo\kmttg\Curious George Maple Monkey Madness.mpg" -threads 4 -acodec copy -vcodec libx264 -vpre medium -crf 19 -g 24 -f mp4 "E:\Tivo\kmttg\Curious George Maple Monkey Madness.mp4" 
    encoding failed (exit code: 1 ) - check command: E:\Tivo\kmttg\ffmpeg\ffmpeg.exe -y -i "E:\Tivo\kmttg\Curious George Maple Monkey Madness.mpg" -threads 4 -acodec copy -vcodec libx264 -vpre medium -crf 19 -g 24 -f mp4 "E:\Tivo\kmttg\Curious George Maple Monkey Madness.mp4" 
    FFmpeg version SVN-r21085, Copyright (c) 2000-2010 Fabrice Bellard, et al.
      built on Jan  8 2010 06:05:02 with gcc 4.2.4
      configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-mingw32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --enable-avisynth --enable-gpl --enable-version3 --enable-zlib --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-libopencore_amrnb
      libavutil     50. 7. 0 / 50. 7. 0
      libavcodec    52.45. 0 / 52.45. 0
      libavformat   52.46. 0 / 52.46. 0
      libavdevice   52. 2. 0 / 52. 2. 0
      libswscale     0. 8. 0 /  0. 8. 0
    [mpeg @ 0x314ee90]MAX_READ_SIZE:5000000 reached
    
    Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
    Input #0, mpeg, from 'E:\Tivo\kmttg\Curious George Maple Monkey Madness.mpg':
      Duration: 00:13:03.36, start: 0.233367, bitrate: 12119 kb/s
        Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 12205 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
        Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
    File for preset 'medium' not found
    Thanks,
    OOOOPS!
     
  2. May 16, 2012 #4082 of 10413
    txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    Grr...sorry. And I am always telling my son to check his work. FFMPEG changes x264's 'medium' preset to 'normal'. It should look like this:
    Code:
    # Description (single line, keep short)
    <description>
    mpeg4 container, same res FFMPEG CRF 19 h.264 video, copy audio (ac3)
    
    # Encode command or script (single line)
    # Known keywords: FFMPEG, HANDBRAKE, MENCODER, PERL, INPUT, OUTPUT, PWD, CPU_CORES, SRTFILE
    <command>
    FFMPEG -y -i INPUT -threads CPU_CORES -acodec copy -vcodec libx264 -vpre normal -crf 19 -g 24 -f mp4 OUTPUT
    
    # Encoded output file extension
    <extension>
    mp4
     
  3. May 16, 2012 #4083 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    Note that with ffmpeg that comes with kmttg windows package there are no preset files included so using -vpre won't work no matter what setting you try.
     
  4. May 16, 2012 #4084 of 10413
    OOOOPS!

    OOOOPS! New Member

    25
    0
    Aug 7, 2003
  5. May 16, 2012 #4085 of 10413
    OOOOPS!

    OOOOPS! New Member

    25
    0
    Aug 7, 2003
    well shoot. Off to find a different version of ffmpeg or parameters for normal and medium.
    Thanks for kmttg and the information.
     
  6. May 16, 2012 #4086 of 10413
    lew

    lew Active Member

    3,966
    3
    Mar 12, 2002
    I haven't used this program recently. Some files I want to D/L, use VRD to cut edit then use VRD profiles for encoding. I don't know why the video needs to be decoded. VRD will let you edit, and encode, a tivo format file.

    kmttg wants to decode the video, even though I didn't check this option.

    I'm using version v0p8q. There didn't seem to any reason for me to upgrade to the newer version.
     
  7. May 16, 2012 #4087 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    It's doing qsfix 1st. I found out long ago qsfix with video dimension filter enabled is required for me (or VRD would choke on some files that change video resolution between show & commercials). A qsfix run doesn't hurt other than taking a little more time. If you don't like it you could always enable nothing in kmttg so you are using it only for downloads then use VRD directly for the rest, or use VAP.
     
  8. May 17, 2012 #4088 of 10413
    lew

    lew Active Member

    3,966
    3
    Mar 12, 2002
    Not a bad practice. I had video I know didn't need it and didn't select qfix. I was surprised to see it was doing it anyway.

    Two questions:
    1. Again using VRD. I don't know the "batch" commands for VRD. Normally there isn't a need to create a mpg file with the cuts. VRD can directly save the tivo video, or mpg created from qsfix, to mp4. This step doesn't really add much time. I guess it's a nitpick. Just curious if the step is needed when using VRD in "batch command" mode.
    2. Atomic parsley gave an error 2. I di a google search and can't figure out what that means.

    Thanks.
     
  9. May 17, 2012 #4089 of 10413
    txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    Well...phewy! Ok, I guess I should have looked into this before recommended something else with ffmpeg. Things look like they have changed a lot since I last looked. I couldn't find a source of presets that matched up with x264 defaults. Simply try this one:
    Code:
    # Description (single line, keep short)
    <description>
    mpeg4 container, same res FFMPEG CRF 19 h.264 video, copy audio (ac3)
    
    # Encode command or script (single line)
    # Known keywords: FFMPEG, HANDBRAKE, MENCODER, PERL, INPUT, OUTPUT, PWD, CPU_CORES, SRTFILE
    <command>
    FFMPEG -y -i INPUT -threads CPU_CORES -acodec copy -vcodec libx264 -flags +loop -coder ac -level 41 -crf 19 -refs 3 -bf 3 -me_method umh -subq 9 -me_range 16 -qmin 10 -qmax 50 -qscale 1 -sameq -g 24 -f mp4 OUTPUT
    
    # Encoded output file extension
    <extension>
    mp4
    That is really just changing the -b 3000k flag to -crf 19. Again, try it with numbers between 18-23 if you don't like the quality. I just tried it on a 2min clip from Dexter. It worked and resulted in a file with bitrate at 2197kbps for the video. It took 2m 39s to do that file on a quad core i5 laptop. It will output the video as 29.97fps which is good and bad. That is the native framerate for most video that is broadcast and earlier Tivos are better at displaying it. Unfortunately, that will also encode the telecined frames as-is, so you will see interlacing.

    I just tried with my old profile for handbrake (hb_tivo_sd_crf) and I didn't like what it did to the aspect ratio of the file. I will see if I can tinker with it a bit and find something that I like better. The "benefit" of handbrake is that it has come built-in filters to inverse telecine. People have mixed results with it. I prefer to do my encodes by hand with avisynth and x264.
     
  10. May 18, 2012 #4090 of 10413
    txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    Ok, came up with a new Handbrake profile that seems to work pretty well. It will perform an inverse telecine on material as well which helps drive the size down a bit more. For the same Dexter clip, Handbrake completed the conversion in 1m 31s with a final bitrate of 1174kbps. The final framerate is 24.281 fps which is close to FILM rate. Handbrake's detection algorithm will allow variable frame rate which can be a problem for some uses. I haven't used Handbrake for a couple of years for my conversions, but when I did I really didn't notice any issues on my TivoHD with playback.

    The is a profile base on the hb_tivo_sd_crf profile*:
    Code:
    # Description (single line, keep short)
    <description>
    Handbrake tivo sd: mp4 container, Constant Quality (CRF=19) h.264 video, ac3 audio
    
    # Encode command or script (single line)
    # Known keywords: FFMPEG, MENCODER, HANDBRAKE, PERL, INPUT, OUTPUT, PWD, CPU_CORES, SRTFILE
    <command>
    HANDBRAKE -i INPUT -4 -v -O -9 -5 -e x264 --x264-preset medium -f mp4 -q 19.0 -a 1 -E copy:ac3 -x keyint=48:min-keyint=4 --denoise="weak" --keep-display-aspect --crop 0:0:0:0 -o OUTPUT
     
    # Encoded output file extension
    <extension>
    mp4
    * I used the latest Handbrake CLI (0.9.6) for this profile (not the one included on kmttg). You will need to download the CLI here, and replace the one included with kmttg to use it. If you want to use it with the included Handbrake CLI (0.9.5), modify the profile as below:
    Code:
    # Description (single line, keep short)
    <description>
    Handbrake tivo sd: mp4 container, Constant Quality (CRF=19) h.264 video, ac3 audio
    
    # Encode command or script (single line)
    # Known keywords: FFMPEG, MENCODER, HANDBRAKE, PERL, INPUT, OUTPUT, PWD, CPU_CORES, SRTFILE
    <command>
    HANDBRAKE -i INPUT --cpu CPU_CORES -4 -v -O -9 -5 -e x264 -f mp4 -q 19.0 -a 1 -E ac3 -x keyint=48:min-keyint=4 --denoise="weak" --keep-display-aspect --crop 0:0:0:0 -o OUTPUT
     
    # Encoded output file extension
    <extension>
    mp4
     
  11. May 31, 2012 #4091 of 10413
    lpwcomp

    lpwcomp Active Member

    8,081
    2
    May 6, 2002
    John's...
    Couple of things:

    1. Is running kmttg under Win2k the cause of the times being EST rather than EDT?
    edit: Now the times are correct.

    2. The "Season Pass" button doesn't seem to work properly. It acts as if I hit the "Record" button.
     
  12. May 31, 2012 #4092 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    "Season Pass" button only for Guide table was erroneously bringing up Single Recording dialog. The buttons for Season Premieres and Search tables are fine. This was fixed in v0p8s version just released.
     
  13. May 31, 2012 #4093 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    v0p8s version released with an enhancement and some fixes. Consult the release_notes for details.
     
  14. May 31, 2012 #4094 of 10413
    lpwcomp

    lpwcomp Active Member

    8,081
    2
    May 6, 2002
    John's...
    OK. Thanks for the quick response. I have installed v0p8s and all is copacetic.:)

    Enhancement request: Use the guide data to display what's playing on the tuners in addition to the channels.
     
  15. Jun 5, 2012 #4095 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    v0p8t version released with RPC/iPad remote related enhancements and fixes. If you use the RPC remote on Linux platform this contains fix to long-standing issue with Read timeouts on that platform. See release_notes wiki for details.
     
  16. Jun 22, 2012 #4096 of 10413
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    I'm suddenly having the same problem with one of my TiVos. I switched CATV providers, and the new provider offers a "free" Premier with their service, so I installed the Premier into the theater and moved the other TiVos around. Since they all got moved around, I renamed them on tivo.com, but now both Bobjour and Tivo Beacon seem to be confused about how many TiVos are on the network, what their IP addresses are, and what their names are. I can't get the TiVo in the guest room to return its NPL in kmttg no matter under which name I try the request.

    Yes, numerous times.
     
  17. Jun 22, 2012 #4097 of 10413
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Under FireFox, it gets a connection reset. Under IceWeasel it just returns a blank page.

    Edit: Without the Recurse=Yes option, it returns an XML with many (but not all) of the videos on the TiVo. With the Recurse=Yes option, the tvlog reports:

    Code:
    Jun 22 08:03:37 (none) [TvHttp:443:83][1395]: write connection timed out, 1:01
     
  18. Jun 22, 2012 #4098 of 10413
    ThAbtO

    ThAbtO TiVoholic by the bay

    6,739
    9
    Apr 6, 2000
    SF Bay Area
    Check the IPs, any duplicate IPs?
     
  19. Jun 22, 2012 #4099 of 10413
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Nope, but some of the units the search "finds" are no longer valid. For example, when the Premier was first turned up, it had IP 192.168.1.13, issued from DHCP. I changed the IP to 192.168.1.105, and the unit can be found at that address, but the system still insists there is a TiVo at 192.168.1.13.
     
  20. Jun 22, 2012 #4100 of 10413
    lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    OK, I found the problem. For anyone who might have this issue in the future:

    The fact the query was failing with the Recurse=Yes get field pointed to a problem with one of the folders. I brought up the NPL in the browser without the Recurse=Yes option and then started drilling into the folders one by one, starting with the newest ones. They all came up fine until I hit The Twilight Zone. This one timed out. I used a different method and looked at the recordings in the folder, focusing on the most recent ones, and there was one which was considerably shorter than all the others. I deleted that recording, and now I can query the TiVo from KMTTG.
     

Share This Page