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. Apr 24, 2012 #4021 of 10413
    Bulldawg9908

    Bulldawg9908 New Member

    47
    0
    Feb 19, 2011
    Nevermind--moyekj beat me to it. Run QS Fix.
     
  2. Apr 24, 2012 #4022 of 10413
    Bulldawg9908

    Bulldawg9908 New Member

    47
    0
    Feb 19, 2011
    I made sure I removed all partial files and enabled overwrite existing. Downloads are still failing. I also tried it with a show I've never downloaded--same result.

    There is a new component of the error message now: <h2>Server Busy</h2> is showing up above "Download failed to file: ......."

    Does this mean the problem is likely on the TiVo end? Can I restart it remotely somehow?
     
  3. Apr 24, 2012 #4023 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    Yes "Server Busy" means you will have to reboot TiVo to fix it. There's no way to directly issue a reboot request AFAIK.
     
  4. Apr 24, 2012 #4024 of 10413
    nahtanoj1

    nahtanoj1 New Member

    21
    0
    Nov 19, 2007
    Thanks to you both. I'll try that tonight.
     
  5. Apr 24, 2012 #4025 of 10413
    Bulldawg9908

    Bulldawg9908 New Member

    47
    0
    Feb 19, 2011
    A reboot fixed it. Thanks for your help.
     
  6. Apr 24, 2012 #4026 of 10413
    todd_j_derr

    todd_j_derr Member

    180
    0
    Jun 6, 2000
    Pittsburgh,...
    Crap, I only tested the new ffmpeg using WMP on my computer but for some reason the resulting files did not play at all well on my Xoom - it dropped a lot of frames and was basically unwatchable. Of course I only discovered this when I was on a plane leaving for a long vacation... so I caught up on my reading instead. :)

    With the old ffmpeg the sound was messed up but the video played perfectly. I'm hoping I just messed up a flag or something, we'll see.
     
  7. Apr 25, 2012 #4027 of 10413
    nahtanoj1

    nahtanoj1 New Member

    21
    0
    Nov 19, 2007
    So I added "QS Fix" as a task and it seems to have done the trick - mostly. That said the QS fix task failed on a few of the files and it seems strange it would fail on some but not on others. The logs details are below and it seems to have happened just on the Frozen Planet files (3 of 5) I have a .ac3 file, a .m2v file, and of course a .mp4 but the .mpg.qsfix is not there. Any ideas? P.S. - i included my entire log file from the whole session of multiple downloads as I thought that might help. Again Thanks for the help!

    >> DOWNLOADING /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).TiVo ...
    /usr/bin/curl --anyauth --globoff --user tivo:MAK --insecure --cookie-jar /tmp/cookie6642415719039427750.tmp --url http://194.168.1.48:80/download/Frozen Planet.TiVo?Container=/NowPlaying&id=132046 --output "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).TiVo"
    encoding job completed: 1:22:07

    Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).TiVo: size=4079.62 MB elapsed=0:23:13 (24.57 Mbps)
    ---DONE--- job=download output=/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).TiVo

    >> DECRYPTING /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).TiVo ...
    /Users/jonathanbaker/Applications/kmttg_v0p8r/tivodecode/tivodecode --mak MAK --no-verify --out "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg" "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).TiVo"

    ivodecode job completed: 0:03:05
    ---DONE--- job=decrypt output=/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg
    (Deleted file: /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).TiVo)
    NOTE: Free space check failed...
    >> Running projectx demux on /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg ...
    java -jar /Users/jonathanbaker/Applications/kmttg_v0p8r/ProjectX/ProjectX.jar "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg" -demux -out /Users/jonathanbaker/Video
    summary of created media files:
    .Video (m2v): 5540 Frames 00:03:04.860 '/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).m2v'
    Audio 00 (ac3): 5777 Frames 00:03:04.864 0-0-0-0 '/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).ac3'
    => 202,527,447 bytes written...
    -> we have 14301 warnings/errors.
    demux job completed: 0:01:19
    ---DONE--- job=projectx
    demux output files:
    /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).m2v
    /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).ac3
    >> Running ffmpeg remux to generate /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg.qsfix ...
    /Users/jonathanbaker/Applications/kmttg_v0p8r/ffmpeg/ffmpeg -y -fflags genpts -i "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).m2v" -i "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).ac3" -acodec copy -vcodec copy -f dvd "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg.qsfix"
    Unable to find remux output file: /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg.qsfix
    remux failed (exit code: 1 ) - check command: /Users/jonathanbaker/Applications/kmttg_v0p8r/ffmpeg/ffmpeg -y -fflags genpts -i "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).m2v" -i "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).ac3" -acodec copy -vcodec copy -f dvd "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg.qsfix"
    FFmpeg version SVN-r19732, Copyright (c) 2000-2009 Fabrice Bellard, et al.
    configuration: --shlibdir=@executable_path --arch=i386 --cpu=i686 --disable-static --enable-shared --enable-pthreads --enable-gpl --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libfaad --enable-libx264 --extra-cflags='-I/Users/yoav/src/lame/include -I/Users/yoav/src/faad2-2.7/include -I/Users/yoav/src/faac-1.28/include -I/Users/yoav/src/x264' --extra-ldflags='-L/Users/yoav/src/lame/libmp3lame/.libs -L/Users/yoav/src/faad2-2.7/libfaad/.libs -L/Users/yoav/src/faac-1.28/libfaac/.libs -L/Users/yoav/src/x264/'
    libavutil 50. 3. 0 / 50. 3. 0
    libavcodec 52.34. 0 / 52.34. 0
    libavformat 52.38. 0 / 52.38. 0
    libavdevice 52. 2. 0 / 52. 2. 0
    libswscale 0. 7. 1 / 0. 7. 1
    built on Aug 27 2009 10:32:06, gcc: 4.0.1 (Apple Inc. build 5484)
    /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).m2v: Unknown format

    NOTE: Free space check failed...
    Computed resolution to use for output file = 1280x720
    >> ENCODING WITH PROFILE 'ff_ipad' TO FILE /Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mp4 ...
    /Users/jonathanbaker/Applications/kmttg_v0p8r/ffmpeg/ffmpeg -y -i "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg" -threads 4 -vcodec libx264 -level 31 -subq 6 -me_range 16 -qmin 10 -qmax 50 -g 300 -s 1280x720 -r 29.97 -b 2500k -maxrate 4000k -acodec aac -ac 2 -ab 160k -ar 48000 -f mp4 "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mp4"
     

    Attached Files:

  8. Apr 25, 2012 #4028 of 10413
    chrispitude

    chrispitude New Member

    518
    0
    Apr 23, 2005
    Xoom playback troubles aside, what improvements are you noticing?

    I tried the latest ffmpeg. The only change I noticed was that the encode took twice as long. File size and visual quality (not exhaustively checked) seemed unchanged, but I am looking at kid's cartoons and that's not the most demanding source material.
     
  9. Apr 25, 2012 #4029 of 10413
    cherry ghost

    cherry ghost Active Member

    5,279
    6
    Sep 13, 2005
    Chicago
    Same for me, double the encode time and no visual improvement. Maybe I'm not seeing it because all my encoding is for an iPad.
     
  10. Apr 25, 2012 #4030 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    It looks like ffmpeg which remuxes the audio and video back together again that ProjectX demuxes is failing. i.e. It's not ProjectX failing but ffmpeg failing to mux:
    Note that to test ffmpeg just run it from command line by executing the ffmpeg command to remux the files:
    Code:
    /Users/jonathanbaker/Applications/kmttg_v0p8r/ffmpeg/ffmpeg -y -fflags genpts -i "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).m2v" -i "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).ac3" -acodec copy -vcodec copy -f dvd "/Users/jonathanbaker/Video/Frozen Planet - Winter (04_22_2012).mpg.qsfix"
    
    You can substitute /Users/jonathanbaker/Applications/kmttg_v0p8r/ffmpeg/ffmpeg above for a different version of ffmpeg obtained elsewhere to see if you can get it to work.

    You can also perhaps use VideoLAN VLC to try playing the video only file .m2v above to see if that plays OK.
     
  11. Apr 26, 2012 #4031 of 10413
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Are there any other kmttg/AirVideo users out there?

    AirVideo (for Linux) comes with a special build of ffmpeg that's used for offline conversion of files from the iOS app. When I kick off a batch conversion (through AirVideo) of a 3.2gb (1280x720) .MPG file (downloaded and decrypted from my Premiere via kmttg) it takes about an hour (Atom 330 CPU, not a powerhouse) and I get a nice 180mb (800x450) .M4V file that plays very well over remote WiFi and 3G in the AirVideo app.

    What I'd like to do is be able to create a similar encoding profile for kmttg so I can have it pre-encode for AirVideo instead of having to use the manual batch feature of the app. I've tried a few different ways, without luck. Here's the ffmpeg command-line AirVideo is generating:

    The conversion-id and port-number parameters seem to be part of this custom ffmpeg build. A lot of the other parameters are gibberish to me. What I see while this is running is two files created in the target directory: a randomly named .aac file and a randomly named .h264 file. When it's done, though, I get a nice .M4V file so I'm guessing something is muxing them at the end? When I tried to build a conversion profile for kmttg based on that command-line I got an .M4V file and a .H264 file and both were not valid video files.

    Any ideas?
     
  12. Apr 26, 2012 #4032 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    Try something like this:
    ff_airvideo.enc
    Code:
    # Description (single line, keep short)
    <description>
    airvideo H.264 + 2 channel AAC encoding
    
    # Encode command or script (single line)
    # Known keywords: FFMPEG, HANDBRAKE, MENCODER, PERL, INPUT, OUTPUT, PWD, CPU_CORES, SRTFILE
    <command>
    /etc/tivo/airvideo/ffmpeg-for-airvideo -y -i INPUT -threads CPU_CORES -flags +loop -g 30 -keyint_min 1 -bf 0 -b_strategy 0 -cmp +chroma -refs 1 -coder 0 -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -trellis 0 -sc_threshold 40 -i_qfactor 0.71 -qcomp 0.6 -ss 0.0 -vcodec libx264 -vf crop=1280:720:0:0,scale=800:448,pad=800:448 -aspect 800:448 -async 1 -f mp4 -crf 24 -qmin 24 -r 29.97 -ar 48000 -ac 2 OUTPUT
    
    # Encoded output file extension
    <extension>
    m4v
    
     
  13. Apr 26, 2012 #4033 of 10413
    species8472jj

    species8472jj New Member

    56
    0
    Dec 23, 2009
    I am trying to use KTTMG to essentially transfer a show from one tivo to another.

    Yes, when I am home it really isn't necessary, but when I'm not at home it is nice to log into my PC remotely, start this process, and find the show on my "desired" tivo when I arrive home.

    This is what I did. I went and chose the show I wanted to transfer, and I ticked the "push" box.

    It proceeded to download the show to my PC (no issues), then what I am expecting is that it would take that show and push it to the Tivo box. And it did say that it was successful (although I know it can't be since it was way too fast).

    I looked and the show did appear in the now playing list, however, really none of the show was pushed. It essentially is an empty file.

    I hope I am making sense. If anyone could help, I'd really appreciate it.
     
  14. Apr 26, 2012 #4034 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    "push" is just sending a request to pyTivo to push a video to your TiVo of choice so you need to 1st make sure that your pyTivo pushes are working properly. If you are pushing .TiVo files directly I believe you need some special options in pyTivo. Ask in pyTivo thread or forums and try pushing a .TiVo file via pyTivo web server. Once you get that working you should be good to go via kmttg.
     
  15. Apr 26, 2012 #4035 of 10413
    wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    Yeah, .TiVo files aren't directly pushable, so you have to set up tivodecode in pyTivo, so it can decrypt them as it pushes. That's all.
     
  16. Apr 27, 2012 #4036 of 10413
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Nice, thanks! That seemed to do the trick ... not sure what I was missing when I tried it myself.

    The problem now, though, is the cropping/scaling. I know kmttg has the HEIGHT parameter, but it expects it to be #xHEIGHT. A lot of those parameters in the AirVideo encoding are using the colon format:

    Code:
    -vf crop=1280:720:0:0, scale=800:448, pad=800:448 -aspect 800:448
    The above, which you and I hard-coded into the profile, works fine for a 1280x720 HD recording from FOX, but causes cropping issues on a 1920x1080 HD recording from NBC.

    Is there a way to handle that dynamically? Or should I just create separate encoding profiles for 720p vs 1080i recordings?

    Thanks again for your help!
     
  17. Apr 28, 2012 #4037 of 10413
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    I ended up doing this for now: I have separate AirVideo encoding profiles for 1080, 720, and SD sources and use them accordingly for the auto-transfers. Seems to be working pretty well and the results stream to AirVideo on my iPad smoothly.
     
  18. Apr 28, 2012 #4038 of 10413
    species8472jj

    species8472jj New Member

    56
    0
    Dec 23, 2009
    Right now I am learning KTTMG, so I appreciate the help I have been getting. I downloaded a file from my TiVo and converted it into an mpg which worked fine.

    The next task was the "ad Detect" which worked without giving any errors. Finally, I was running "ad cut" and that is where the errors occurred. Please see below...

    "C:\Program Files (x86)\KMTTG\comskip\comskip.exe" --ini "C:\Program Files (x86)\KMTTG\comskip\comskip.ini" "c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012).mpg"
    comskip job completed: 0:07:24
    ---DONE--- job=comskip output=c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012).edl
    >> Running comcut on c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012).mpg ...
    "C:\Program Files (x86)\KMTTG\mencoder\mencoder.exe" "c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012).mpg" -edl "c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012).edl" -oac copy -ovc copy -of mpeg -vf harddup -o "c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012)_cut.mpg"
    comcut failed (exit code: -1073741819 ) - check command: "C:\Program Files (x86)\KMTTG\mencoder\mencoder.exe" "c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012).mpg" -edl "c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012).edl" -oac copy -ovc copy -of mpeg -vf harddup -o "c:\Users\Jim\Videos\Grimm - Cat and Mouse (04_20_2012)_cut.mpg"
    1 duplicate frame(s)!

    1 duplicate frame(s)!

    1 duplicate frame(s)!

    1 duplicate frame(s)!

    [This 1 duplicate frame occurs many times]

    Warning! FPS changed 23.976 -> 29.970 (-5.994005) [4]

    Skipping frame!

    Skipping frame!

    Skipping frame!

    Skipping frame!

    Skipping frame!

    [again 1 duplicate frame repeats many times]

    1 duplicate frame(s)!
    Couldn't realloc frame buffer(idx), abort


    PARSE_MPEG12: add_frames(143809) failed, exit
     
  19. Apr 28, 2012 #4039 of 10413
    ThAbtO

    ThAbtO TiVoholic by the bay

    6,736
    8
    Apr 6, 2000
    SF Bay Area
    Try running QSFix.

     
  20. Apr 29, 2012 #4040 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    Yes if you have VideoRedo then that's the best choice to configure kmttg for QS Fix. Else configure kmttg for ProjectX if you haven't already and enable QS Fix task and kmttg will no longer need to use mencoder for performing the commercial cuts which is where you are seeing problems.
     

Share This Page