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

Video ReDo questions from a newbie

Discussion in 'TiVo Home Media Features & TiVoToGo' started by ElJimador, Jan 9, 2013.

  1. ElJimador

    ElJimador New Member

    25
    0
    Jan 8, 2013
    Excellent point. I started looking more seriously into a NAS upgrade since my last post and the more I'm getting into that the more I'm seeing the value of converting to H264, and I hadn't even considered the power consumption part of it. So yeah, I've changed my mind on that.

    BTW, any NAS recommendations? I had originally just been thinking about getting a 3 or 4TB box like my current WD MyBookLive but as I'm starting to realize how quickly that might fill up even converting everything to H264 I'm thinking now about something more expandable like a 2 or 4 bay Synology. I'm just noticing that price jump when you look at anything over 3TB and I'd rather not get anything now that's not going to remain incorporated in my setup as I grow. (The 1TB NAS I have now I'll just keep reserved for pics and music).
     
  2. ElJimador

    ElJimador New Member

    25
    0
    Jan 8, 2013
    Thanks Dan. I thought having a quad core processor meant that I should be able to run more than 1 encode at a time (again, not really appreciating how much work these jobs are for your CPU). I'll stick to that going forward and will try out the batch manager too. Appreciate the tip.
     
  3. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,446
    165
    Apr 17, 2000
    Nevada
    Video encoders are multi-threaded, meaning they will use all 4 cores to do one encode and speed up the process. It's much faster to run theme one at a time.

    Dan
     
  4. mlippert

    mlippert New Member

    59
    0
    Apr 2, 2010
    Massachusetts
    Hi,
    I just wanted to chime in.
    1st about a year ago I also grabbed the VideoReDo trial and played with it for a while. I decided it was an excellent product that was worth it's price and I bought the TV Suite version figuring that although my immediate plans didn't need H.264 encoding or processing, that I might eventually.

    I am currently using it in conjunction with kmttg, which is very easy to set up and use (just follow the instructions on the site). kmttg is great for queuing up downloads and decodes from your tivo, and I just discovered that it can run the VideoReDo adscan and create a videoredo project file for your review. I mostly don't bother removing the commercials because even once the ad scan is done you have to review and adjust all cuts and that can be a little time consuming.

    While I'm posting, maybe I can ask those people if there is a kmttg profile that they find maintains the best quality and can be sent back to the tivo by pyTivo? I've got VideoReDo and I know that kmttg has ffmpeg and handbrake profiles as well. I'd like to save some space, but keep the quality as close to the original mpg2 as I can.

    Also does the container format matter? I hadn't thought so, but I recently saw a comment by Dan203 where he said that mkv loses some timing and that mp4 was better if you were ever going to re-edit the video. I haven't found any other confirmation of this by googling, but Dan203 is a developer of VideoReDo so I'm looking for more information.
     
  5. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,446
    165
    Apr 17, 2000
    Nevada
    It's not specifically the MKV format that's the problem. The MKV format actually supports higher resolution time stamps. But for some reason everyone has standardized on using millisecond resolution time stamps for MKV. For playback that's fine, but for frame accurate editing it's a problem because the math doesn't quite work out and you can end up with some rounding errors that cause a shift of +/- one frame. (it also causes issues with our syncing routines)

    If you remux the file using MKVMerge and use the CLI option to set the time stamp resolution higher, say to 10,000 ticks per second, then it should work just as well as any other format. However 99% of the MKVs you download, or even the ones output by VideoReDo, will use the millisecond resolution which can potentially cause a problem.

    All other formats will typically use a time stamp resolution of 90KHz or higher, which is why they work fine. Although I have seen a few MP4s with lower resolutions that cause a similar issue in VRD. However they're rare and all MP4s output by VRD use 90KHz ticks so they will work fine. Originally I tried outputting MKVs with higher resolution ticks too, but we got complaints because apparently some players just assume MKVs will use milliseconds and don't actually adhere to the set value. So for compatibility we dropped back to ms and just try to warn people of the issues.
     
  6. mlippert

    mlippert New Member

    59
    0
    Apr 2, 2010
    Massachusetts
    Dan, thanks for the response, it was very clear and helpful. Just to make sure I really understood, the millisecond resolution is the same as 1KHz ticks, or equivalently 90KHz is the same as 1/90 millisecond resolution.

    I've still got so much to learn about this stuff, starting with what exactly the container format provides. I'm guessing the timestamps are used to sync the various parts that are in the container (most notably the video with the audio?) and those parts don't carry their own timestamps?

    I would have thought that the video and audio had inherent timing as long as they are based on the same start point they have a built in rate that would keep them in sync and intermediate sync points could always be calculated by starting from the beginning.
     
  7. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,446
    165
    Apr 17, 2000
    Nevada
    Yes. Milliseconds are 1KHz or 1000 per second and 90KHz is 90000 per second. The reason ms isn't enough is because most video frame rates don't divide evenly into 1000. For example NTSC is 29.97fps. 1000/29.97 = 33.3667. That get's truncated to 33 and causes a rounding error.

    The timestamps have a few uses. First off they tell the play clock when to display or play a frame. So no matter how fast the computer is able to demux and decode the frames it plays them at the proper time. This maintains both smooth playback and audio/video sync. In this case ms is OK because if the frame is displayed +/- 1/2 a ms it would never be noticed by the user.

    However in VideoReDo we also use them for maintaining sync during output, even after some frames have been cut, and for doing the seeking to the start/end of cut points. If the time stamps are inaccurate then it can cause errors in both those portions of the code.

    I'm working on trying to come up with a conversion routine that will properly convert ms to 90KHz without the error. However it's not as simple as it sounds. To maintain proper sync and playback speed the ms timestamps in MKV jump. So for example with 29.97 the frames will be...

    33, 66, 100, ...

    With every 3rd frame jumping an extra ms like that it makes it difficult to compensate for. especially considering every frame rate will have a different pattern and two files with the same frame rate might as well.
     
  8. mlippert

    mlippert New Member

    59
    0
    Apr 2, 2010
    Massachusetts
    Thanks Dan, that was a great explanation!

    And I think I understand the VideoReDo problem when writing after frame edits have been made.

    So most tools that remux an mkv into an mp4 don't normally change the timestamp resolution from 1KHz to 90KHz?

    Hmm, normally NTSC at 90KHz (90000/29.97=3003.0030) the frames would be at:
    0, 3003, 6006, 9009...
    and you only jump an extra tick every 333 frames instead of every 3 frames.

    Doing a straight conversion of the ms timestamps to 90KHz would give you:
    0, 2970, 5940, 9000...

    However, what if you converted a ms timestamp to a frame offset and that frame offset back to 90KHz? So for NTSC video:
    66ms * (29.97 frames/s) = 1.978 frames, rounded to the nearest frame is 2.

    A frame offset of 2 at 90KHz is at tick 6006, which is what it would be if the timestamp was originally 90Hz instead of having the 66 tick difference.

    I think that this may occasionally be off a frame as you explained, however I think it avoids any cumulative errors.

    Dan, I hope the above wasn't presumptuous but maybe it could help your algorithm. I know I don't know the intricacies of the problem (everything I do know, you've just explained to me!).

    Mike
     
  9. hershey4

    hershey4 New Member

    179
    0
    May 31, 2006
    Red Sox Nation
    I am newbie about to enter this arena also and am considering similar options too. This thread has been very helpful. Thanks to all.

    One of the difficulties I am encountering reading this and so many threads on these related topics, is terminology. Could someone kindly thumbnail some of the terms being used: encoding, decoding, transcoding, codecs, decrypt (haven't seen encrypt, does it apply?)

    For context, my needs are just to occasionally make a DVD playable on a PC or a player or occasionally make a snippet to upload to my Android (HTC Rezound) or Youtube to share with a friend. I guess editing out ads would be nice, but not critical. Because I don't have much volume in mind, MPEG2 will probably be fine.

    I got faked out recently when a DVD I burned from my Tivo (Humax S2 with burner), would play on my PC (w/WMP), but not my friend's PC or player. I think I have just figured out from reading all these threads it is because my PC has Tivo Desktop with my MAK.

    Thanks to this learning curve, I now realize that several Tivo DVD's I've burned over the years will be useless if my Tivo becomes a brick. I never realized that until now. I may have more converting to do than I thought.
     
  10. ThAbtO

    ThAbtO TiVoholic by the bay

    6,724
    8
    Apr 6, 2000
    SF Bay Area
    Decrypt = Removing the protection imposed by the Tivo and then it will be a regular mpeg2 file.
    Encode = convert to another format to be used on a different device, ie: ipad, iphone, etc.

    There is no 'decode' in a Tivo sense.

    Transcode = the process the Tivo does to convert the video files to a proper format so it plays on the Tivo.

    You can take the files off the Tivo DVDs, if it has .TiVo file extension, remove the protection with programs such as TivoDecode and there would be .MPGs instead. You would not need the Tivo involved.
     
  11. hershey4

    hershey4 New Member

    179
    0
    May 31, 2006
    Red Sox Nation
    It does not. When WMP failed to play the Tivo-burned DVD on a PC other than mine, I opened the DVD in explorer and all I saw was the normal VIDEO_TS stuff and the VOB. Could I grab the VOB and convert that if necessary to a more usable format?

    The .tivo file is only what comes over to the PC.

    BTW, I just downloaded the VideoRedo trial and decoded a .tivo file, extracted a show segment, and am in the process of uploading to Youtube to show a friend. Took less than 10 minutes and so far so good. Very easy and intuitive.

    Next I will see if I can get it to my phone somehow.
     
  12. ThAbtO

    ThAbtO TiVoholic by the bay

    6,724
    8
    Apr 6, 2000
    SF Bay Area
    VideoReDo trial is quite limited. If you want to decrypt, you can get the free TivoDecode. However, it does not have any editing capabilities.
     
  13. hershey4

    hershey4 New Member

    179
    0
    May 31, 2006
    Red Sox Nation
    huh? I just did the trial fine. Oops did I use the wrong word? I said decode. Did I mean decrypt? I can't see the earlier part of this thread right now for the newbie terminology lesson.

    Or are you talking about decrypt/decoding the VOB file on the DVD? That's not my concern at this point now. That only came up because of my incorrect assumptions about a Tivo-burned DVD. I think I have something that can convert a VOB.
     
  14. steve614

    steve614 what ru lookin at?

    10,722
    0
    May 1, 2006
    Dallas, TX
    Did you download the H.264 version?

    It is just a matter of knowing what phone you have and/or what file format and video resolution your phone will accept.
     
  15. dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    Also, if you want VRD to be uncrippled (in re video length) you need to perform the free trial registration found in its menu system.
     
  16. Dan203

    Dan203 Super Moderator Staff Member TCF Club

    37,446
    165
    Apr 17, 2000
    Nevada
    We actually do something like that, but it's not 100%. There is still a chance for rounding errors which can cause issues with our syncing logic. That being said I did some work on it today and found a few small bugs in the logic that might help improve it a little. I also disovered that the code I was using for the video frames doesn't work that great for audio frames, so I adjusted the audio logic to use a different calculation. Although I may have run into a bigger bug in VRD pertaining to AAC with 44.1KHz sampling rate. I need to look into that a bit more in the morning.
     
  17. hershey4

    hershey4 New Member

    179
    0
    May 31, 2006
    Red Sox Nation
    so is 236MB for 4.5 minutes of real time unreasonably big? I thought that was because it was MPEG-2. It did take a surprisingly long time to upload to youtube. I assume they shrunk it to something more efficient.

    I did get the registration key, but I think I cut the video before applying it. Maybe I will try again.
     
  18. dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    Not an unreasonable file length. The free-trial registration affects only the duration of video file you can process. I think the limit is 15 min without registraion.

    The upload time to youtube probably was set by the file size, your upload speed, and them converting it to a more compact encoding, e.g., H.264.
     
  19. hershey4

    hershey4 New Member

    179
    0
    May 31, 2006
    Red Sox Nation
    I ran the 236MB through AnyVideoConverter and it became 30MB as a mp4. Much better. Too bad VDR can't do that in one step (for a reasonable cost).

    I will explore the trial of VDR V3 some more and will probably get it, but definitely not the h.264 version.
     
  20. dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    Very unlikely that 30 MB file had the same resolution and picture quality of the 236 MB video -- although that probably isn't important for YouTube uploads. That's an 8:1 compression from Mpeg2 to H.264. To maintain resolution and PQ you need to restrict compression to around 2:1.

    VRD TVS4 (H.264) can do this in one step. It costs $96 instead of $75 for 'V3', a difference of only $21. Or are you actually planning to buy 'V2' (VRD Plus, for $50, the one that can't make DVD's)? If 'V2' or 'V3' plus AnyVideoConverter does all you will ever want, then you are good. The total time to make your .mp4 won't be much different whether done in one step or two since the bulk of the time is spent recoding from mpeg2 to H.264 video.
     

Share This Page