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

TiVo-VideoReDo-AutoProcessor Program

Discussion in 'TiVo Home Media Features & TiVoToGo' started by dlfl, Jul 19, 2007.

  1. dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    If you are interested in having automated MPEG4 conversion built into TVAP, instead of requiring a user-defined post process batch file as is currently done, please chime in here.

    A recently released Source Forge project called fflib.net makes it relatively easy to add this capability to TVAP.

    The advantage would be simplicity. However if you are already using the post process batch method there will be no advantage. In fact the price for simplicity is limited configurability. You will not have all the parameters and options for fine tuning conversions that you have when using HandBrake in a post process batch.

    fflib.net is somewhat of a black box. There is almost no documentation. However in my initial testing it has converted to .mp4 with H264 video and AAC audio, .avi with MPEG4 video and mp3 audio, and FLV. You can set the video size and video- and audio-bitrates --- or you can let them default to automatic settings which seem halfway reasonable at least.

    In one test I converted an hour long .mpg, which was generated by VideoReDo performing a QSF on a .tivo file. The output file was a .avi and I sent it back to my TiVo via pyTivo. It was quite acceptable.

    I don't know if the .mp4's it produces are iPod compatible. If someone will tell me the video format and bitrates I will convert a small .mp4 and get it to them for test on their iPod.

    My current thought is to have this capability as an automatic option in TVAP. If the fflib.net DLL file is installed in the run-time directory, TVAP will enable the option. The current post process batch capability would still be there in either case. I would add a button to pop up a configuration page where you would select video size, file fomat and bitrates, or defaults.

    Let me know if you're interested.
     
  2. jrusch

    jrusch New Member

    16
    0
    Dec 3, 2008
    I am new to Tivo and new to trying to use this software. I need help. When I try and use this software, 0 byte files are created.

    This is from the log file:
    12/11/2008 10:08:35 PM Started QSF, input: GaryUnmarried
    12/11/2008 10:08:37 PM VideoReDo said: INFO: VideoReDo version 3. 1. 5. 564 - Jul 5 2008
    12/11/2008 10:08:42 PM VideoReDo completed QSF, creating: D:\Export\GaryUnmarried_QSF.mpg
    12/11/2008 10:08:42 PM Started Ad Scan/auto-cuts, input: GaryUnmarried
    12/11/2008 10:08:44 PM VideoReDo said: INFO: VideoReDo version 3. 1. 5. 564 - Jul 5 2008
    12/11/2008 10:08:45 PM VideoReDo said: INFO: Failed file open: D:\Export\GaryUnmarried_QSF.mpg. Will retry
    12/11/2008 10:08:49 PM VideoReDo said: INFO: Failed file open twice: D:\Export\GaryUnmarried_QSF.mpg. Will retry
    12/11/2008 10:08:59 PM VideoReDo said: ERROR: Unable to open file/project: D:\Export\GaryUnmarried_QSF.mpg
     
  3. dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    jrusch:

    I think your problem is a bad version (564) of TVSuite. Install the latest revision and try again. http://www.videoredo.net/msgBoard/showthread.php?t=6961

    From the changelog for TVSuite version 566:
    [Fix] COM: FileOpenBatch and FileOpenBatchPIDs don't work starting with Build 564

    COM: FileOpenBatch is what TVAP uses for QSF. According to your log excerpt the QSF only took 7 seconds which seems suspiciously short.
     
  4. dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    Tiny change: The title item in the pyTivo metadata file no longer incorporates the episode # and episode name (for series).

    Remember to uninstall the previous version.
     
  5. Jan 4, 2009 #265 of 418
    msmart

    msmart New Member

    228
    0
    Jan 2, 2007
    Speaking of metadata files...

    I'm trying to figure out how to take the metadata text files created by TVAP and import them into an Excel file. Each line (without the header (before the ":")) to a column. Has anyone done this?

    It would be nice to have the information contained in the metadata files in one file.

    Oooh..... Feature Request... append the metadata information for a show directly into an Excel file on the next available row as TVAP processes each show.
     
  6. Jan 4, 2009 #266 of 418
    dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    I know how to do this but I see it as risky because of complications due to possible variations in OS and version of Office installed.

    I thought about an option to output a single line (per video) text file with delimited fields that would be easy to import into Excel with "Text-to-data". However this, (and the direct Excel write), has the issue of what do you do with multiple-entry fields such as vActor etc.? I guess you could assign a certain number of fields, i.e., four actor fields, and just take the first four(?).

    There are some other design questions to be addressed if this goes forward, but first is a text file for import of interest to you?
     
  7. Jan 4, 2009 #267 of 418
    msmart

    msmart New Member

    228
    0
    Jan 2, 2007
    Ah yes, the vActor and version dilemmas, understood.

    I really only need three fields; description, seriesTitle, and episodeTitle. I copy those fields into an Excel spreadsheet to create a list of shows/movies that I've burned to DVD. I also copy the data into an application I use (Epson Print CD) to print the title and description directly onto printable DVD media.

    I know this can be done with an Excel VB script but I'm not that good at it. I would be most appreciative if I could impose upon you to write one for me. It would open each of the metadata files in a directory and place the three fields into separate columns. I'm on Windows XP SP2 using Excel 2003.

    If you were to add such a feature, I agree, use the first four actors and leave it at that. As for the pipe between first and last names, write it as is and leave it up to us to use find/replace to change it to a space or comma in Excel.
     
  8. Jan 5, 2009 #268 of 418
    dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    Could you go for a C# program that does what you want? (TVAP is a C# program BTW.) If so, do you need to maintain more than one xl file? And do you want it to always process all files in a selected directory or select one or more files in a file browser? Should it create a new xl file each run, or add to an existing file? In the latter case it has to have logic to prevent duplicates.

    The simplest case is there is only one xl file in a fixed location and it is completely recreated on each run using all metadata files in one folder. Many variations are possible but the programming gets more complex.

    Fortunately we have the same OS and version of Office.
     
  9. Jan 5, 2009 #269 of 418
    msmart

    msmart New Member

    228
    0
    Jan 2, 2007
    A C# program would be great.

    No.

    All files. Once processed, I will move the files to a different folder.

    A new one each time. I can copy its contents to a different "master" file.

    Keep it simple, all files in folder to a new xl file each time the program is run.

    Me thanks you in advance.
     
  10. Jan 6, 2009 #270 of 418
    wgw

    wgw New Member

    217
    0
    May 16, 2007
    dlfl,

    Would you you be able to add partCount and PartIndex to your metadata extracts? I does not get transferred to the Tivo, but it is viewable on the Info screen. Here is a sample from TiVoVideoDetails. I've added the fields to my pytivo git branch.

    Code:
    <partCount>2</partCount>
    <partIndex>1</partIndex>
     
  11. Jan 7, 2009 #271 of 418
    dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    What are these? I don't see anything with those names in the TivoDecode XML data that TVAP reads from TiVo files via TivoDecode.dll. (I also don't see them in the pyTivo Wiki metadata page.)
     
  12. Jan 7, 2009 #272 of 418
    wgw

    wgw New Member

    217
    0
    May 16, 2007
    They only appear when it's a multi part episode or series. When present, text like "Part Index 1 of 2", "Part Index 2 of 2" will appear on the info detail screen. For example, Man vs Wild - Siberia, airing this saturday on Discovery is part 1 of a 2 part episode. And "Land of Ice" airing Jan 19 is part 2.

    I still need to add them to the wiki, as well as my other templates.
     
  13. Jan 7, 2009 #273 of 418
    dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    OK, I'll record the Man vs. Wild so I can have a sample to test the XML parsing with. If it's in the XML string it should be no problem to add it to the metadata files. I assume the format would be:

    partCount : 2
    partIndex : 1

    Correct? I also assume that either both items should be present or neither of them, correct?
     
  14. Jan 7, 2009 #274 of 418
    wgw

    wgw New Member

    217
    0
    May 16, 2007
    Yes, thats correct on all counts.
     
  15. dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    pyTivo metadata output file now includes partCount and partIndex items if they are both present in the TiVo file metadata. This adds two items to the XML data file for each video, but there should be no complications. TVAP will create default values (empty strings) if the data isn't in the XML file, rather than failing due to missing data.

    PyTivoMetaGen has been similarly modified.

    Be sure to uninstall previous versions.
     
  16. dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    If QSF is your entire VRD processing chain (i.e., no AdScan) and the "_QSF" in the output file name is undesirable, see this post on the VideoReDo forum.

    This should work even if you are using a TVAPpostProcess batch file, since it is performed later in the TVAPcleanUp batch file. It should be fairly obvious how to extend it to rename whatever new video file (e.g., .mp4) is created by your TVAPpostProcess script.
     
  17. Feb 4, 2009 #277 of 418
    dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
  18. Feb 7, 2009 #278 of 418
    dlfl

    dlfl Cranky old novice

    6,991
    16
    Jul 6, 2006
    Near...
    7 February 2009 Ver. 0.72
    - Added HandBrake stall detection for TVAPpostProcess scripts. If the script runs HandBrake, TVAP checks every 5 minutes to see if HandBrake used less than 10% of CPU time over 5 minutes. If so it kills HandBrake. A descriptive log message is written.

    HandBrake completed an encode but didn't terminate the other day. Per the HandBrake forum such stalls occasionally happen to others, also. If you have several videos waiting to be processed, they are blocked since the TVAP post process never ends. This should prevent this.

    If you suspect a problem due to this new feature please let me know -- and revert to Ver. 0.71, which is still on the download site.
     
  19. CanMan00

    CanMan00 New Member

    4
    0
    Feb 16, 2008
    Hey dlfl, I'm interested in seeing your HB post-processing scripts! I don't have 10 posts yet so I can't see any links in your signature.

    I love the internet... Every time I think to myself, "Damn, this task I'm trying to do is a hassle. I wish I could make it easier..." I end up stumbling across a solution that someone much smarter than me has already been able to figure out.

    First I found VideoReDo, then your TVAP program. Then I wrote my own PowerShell script to do some magic with the HandBrakeCLI afterwards and it looks like you may have already solved my problems there too. Thanks for writing it and sharing it with the rest of us!
     
  20. msmart

    msmart New Member

    228
    0
    Jan 2, 2007
    I don't want to steal dlfl's thunder but I'll offer up mine so you can compare after he posts. My output is for iPod. I use the smaller resolution and a lower bitrate to make smaller filesizes but the picture quality is still good IMO.

    The Handbrake version I've been using is a development version, newer than 0.9.2 but before 0.9.3 became final. I saw on the Handbrake forum that 0.9.3 introduced some undesirable side effects (won't go into them here you can visit their forum and make up your own mind). The svn1477 version seemed, to me, a little better than 0.9.2 so I've stuck with it.

    TVAPpostProcess.bat
    Code:
    @echo off
    setlocal
    
    rem all folder path values should end with the '\' character
    
    rem folder containing hbcli.exe (Handbrake installation folder)
    set HBFolder=C:\Program Files\Handbrake_svn1477\
    
    rem folder containing this batch file and .mpg video input file
    set localDir=G:\VideoReDo AdScan\
    
    rem destination folder for encoded output video
    set outdir=L:\iPod Ready Video\
    
    set mpgName="&#37;localDir%%~1.mpg"
    set m4vName="%outDir%%~1.m4v"
    if not exist %mpgName% goto done2
    if exist %m4vName% del %m4vName%
    
    
    "%HBFolder%HandBrakeCLI.exe" -i %mpgName% -o %m4vName% -e x264b30 -E faac -w 320 -b 384 -r25 -x keyint=300:keyint-min=30:bframes=0:cabac=0:ref=1:vbv-maxrate=384:vbv-bufsize=2000:analyse=all:me=umh:subme=6:no-fast-pskip=1 -B 160 -R 48
    
    rem next line creates a log file of processed videos, if you uncomment it
    echo %m4vName% >> "%outdir%HandbrakeBatchLog_svn1477.txt"
    
    rem rename and copy pyTivo metadata file (if present) to output folder
    rem if not exist "%localDir%%~1.mpg.txt" goto done2
    rem set metafile="%outdir%%~1.m4v.txt"
    rem copy "%localDir%%~1.mpg.txt" %metafile%
    :done2
    rem pause
    Then there is the cleanup batch file which runs right after Post Process:

    TVAPcleanUp.bat
    Code:
    rem @echo off
    setlocal
    set localDir=G:\VideoReDo AdScan\
    
    set mpgName="%localDir%%~1.mpg"
    set MetaDataName="%localDir%%~1.mpg.txt"
    
    copy %MetaDataName% "M:\TiVo Edited Movies\Show Descriptions\%~1.mpg.txt"
    del "%~1.mpg.txt"
    del "%~1.vprj"
    
    rem pause
    Obviously you'll need to edit it to conform to your directory structure.

    TVAP is a great tool, isn't it!! :up:

    ADDED: CanMan, I just saw your post in the other thread, since you have 1080 files, my HB settings may not help you. But what you can do is use the HB GUI and get your settings the way you want them then there is a tab that creates a CLI string which can be copied to the batch file.
     

Share This Page