PDA

View Full Version : tivo to SVCD using tytools 7 workflow



lmurray
06-17-2003, 05:53 AM
Hi all,
I've made a website/workflow for converting tivo video to SVCD (using tytools 7). This is nothing new for most of you, but may help out some newbies. Hopefully the step by step approach will help. This is mainly for a S1 SA tivo, although the steps may help on other machines. Please feel free to post questions here. I'll add them to the FAQ if need be.


http://themurrays.homeip.net/downloads/tivo/extraction_articles/tivo.html.new


enjoy,
-lloyd-

P.S. thanks for jdiner for this great tool!

Homer S
06-26-2003, 10:19 AM
If you use the built in Transcode to get closer to SVCD compliance, when to you turn it on? Before getting the .ty or when multiplexing?

Homer Out

Pro-289
06-26-2003, 01:39 PM
Moved to this thread (http://www.dealdatabase.com/forum/showthread.php?s=&threadid=8092&perpage=15&pagenumber=4#post108230).

Pro-289
07-02-2003, 02:45 PM
Moved to this thread (http://www.dealdatabase.com/forum/showthread.php?s=&threadid=8092&perpage=15&pagenumber=4#post108228).

Homer S
07-02-2003, 11:38 PM
Using VCDEasy to master the xSVCD, there is an error with a bad block on mpg's created with TyTool. It has happened every time. The typical error text is like this (forgive the English, not the programmer's native language).

"blah.ty.mpg"
This MPEG file have bad packets:
bad packet at packet #166574 (stream byte offset 387117976) - remaining 4 bytes of stream will be ignored

Do you want to add this file anyway ?

(Yes)(No)

The file was cut, transcoded and multiplexed via TyTools.

Any clues?

Homer Out

Pro-289
07-03-2003, 04:56 PM
Hm, I thought I saw that message once even with a non-tytool .mpg. Did that happen at the end of the process? Maybe it's VCDEasy's way of saying it reached the end of the mpeg.

Homer S
07-03-2003, 08:51 PM
I do not think so. It does not happen with mpg's from my Dazzle 2 or from TMPGenc.

Does anyone use TyStudio? I couldn't get it to run on my DTivo S2... If someone uses TyStudio and tried to make a disk using VCDEasy, then we would know if it is the software or the DTV source...

Homer Out

Cat Jesus
07-04-2003, 09:49 AM
Originally posted by Pro-289
I'll post a workflow that seems to work good for me with TyTool7r6 or higher. At least works on a DVD player that didn't play a Ty-MPG SVCD. This assumes your audio is not Dolby Digital 5.1, that's a whole new ballgame. :)

[B]IF YOU'RE NOT GOING TO CUT VIDEO

TyTool - Create .MPG
...Select "Network-MultiplexMode" option and "Patch Audio Holes" and "sVCD 44.1 @ 224". Get your show from the "Now Playing" list. You now have a .MPG file.
TMPGEnc - Create new .MPG
...Use the Project Wizard for Super Video-CD. Follow instructions. Load the .MPG file. You can use "Source Range" to make more precise frame-accurate trims at the beginning and end. You now have a new SVCD compliant .MPG file.
Nero - Create SVCD
...Create a new SVCD project. Add your new .MPG (should not complain about compliance). Create a menu if your DVD player supports menus. Burn to disc.


I tried this but the audio kept phasing in and out and the video had a barely discernable pause every few seconds. I have an SA Tivo vers. 3.0 with turbonet. I originally tried using tystudio but it kept failing with the following error:

mplex: Too many frame drops -exiting
mplex: mplex finished prematurely and did not exit gracefully

So then I decided to use the ty stream it created and used your process above.

Is there a fool proof way to make an SVCD from a ty file? I'm an experienced programmer but I am rather ignorant about video and audio processing. I did check to make sure that my Tivo was recording at 480x480.

Here's the beginning of the tystudio log file I referenced above.

demux: demuxing
demux: Audio offset (for mplex -O) is -9
mplex: Audio offset reset to 9, video offset reset to 0
mplex: mplex version 2.2.2 ($Date: 2003/03/27 23:59:42 $)
transcode: MPEG Hdr 0, len = 864
transcode: FrameSync = 0x7ff
transcode: Ver = MPEG version 1
transcode: Layer = Layer II
transcode: Protection = Not Protected by CRC
transcode: Bitrate = 192
transcode: SampleRate = 32000 -> 44100
transcode: Padding = 0
transcode: Private = 0
transcode: Channel Mode = Stereo
transcode: Ext Mode = 0
transcode: Copyright = Not copyrighted
transcode: Original = Copy of media
transcode: Emphasis = None
mplex: Pipe looks like an MPEG Video stream.
mplex: Pipe looks like an MPEG Audio stream.
mplex: Found 1 audio streams and 1 video streams
mplex: Selecting SVCD output profile
mplex: Multiplexing video program stream!
mplex: Scanning for header info: Video stream e0 (unnamed)
mplex: VIDEO STREAM: e0
mplex: Frame width : 480
mplex: Frame height : 480
mplex: Aspect ratio : 4:3 display
mplex: Picture rate : 29.970 frames/sec
mplex: Bit rate : 3500000 bits/sec
mplex: Vbv buffer size : 229376 bytes
mplex: CSPF : 0
mplex: Scanning for header info: Audio stream c0 (unnamed)
mplex: MPEG AUDIO STREAM: c0
mplex: Audio version : 1.0
mplex: Layer : 2
mplex: CRC checksums : no
mplex: Bit rate : 24576 bytes/sec (192 kbit/sec)
mplex: Frequency : 44100 Hz
mplex: Mode : 0 stereo
mplex: Mode extension : 0
mplex: Copyright bit : 0 no copyright
mplex: Original/Copy : 0 copy
mplex: Emphasis : 0 none
mplex: SYSTEMS/PROGRAM stream:
mplex: rough-guess multiplexed stream data rate : 3753296
mplex: Setting best-guess data rate.
mplex: Run-in Sectors = 78 Video delay = 34773 Audio delay = 0
mplex: New sequence commences...
mplex: Video e0: buf= 235520 frame=000000 sector=00000000
mplex: Audio c0: buf= 4096 frame=000000 sector=00000000

Pro-289
07-09-2003, 05:11 PM
Cat, do you know if your DVD player will play over-spec SVCDs (xSVCD)? If not, then you'll get problems with your TyStudio encode, since the line near the bottom says "rough-guess multiplexed stream data rate : 3753296", which is 3.58Mbit. SVCD spec is about max 2.7Mbit. So you'll get freezes and pauses when the DVD player hits those >2.7 chunks.

You should be getting the best results with your SA Tivo using TyTool. As TyTool can see audio & video holes & errors and patch them up to keep sync, while other programs would see the errors and just continue while not patching them so you get sync problems. Is your SA Tivo recording in NTSC 29.97fps? Have you tried TyTool using a different .TY? Maybe your .TY file is way damaged.

I used to think the quality of a DTivo was that of an SVCD, but it's actually a bit or more (pun intended) higher. Only the video height and width is spec (480x480). The audio is higher, 48k, and the video is higher, >5Mbit at times. If you want to create a spec SVCD, you'll have to encode the video&audio to a total of no more than 2778 kbit, or 355584 bytes, or 2844672 bits, or 2.712891 Mbits. That's where TMPGEnc comes in. Some of my DTivo .TYs hit the 4-5Mbit video bitrate mark, about half of DVD spec, but almost twice that of SVCD spec.

I'm not too experienced with TyStudio, or SA Tivo .TYs. But TyTool7r6 or higher should work great with a SA Tivo .TY file. Unless the .TY is hardcore damaged, you should be able to create a good 2.7Mbit-44.1kHz SVCD using my method above.

r0x
07-09-2003, 09:45 PM
Pro-289,

- What is the best way of creating an input for TMPGEnc v2.513 from a .ty stream? (It seems to be expecting something that is NOT already a MPEG or derivative of MPEG.)

- Is it best to use TMPGEnc's built-in wizard or go with custom settings? If custom settings are better, what should I set them to? (There are so many of them... :-0)

My main interest at the moment is to create spec. compliant SVCD's (so far I haven't found a player other than my PC that will take the DTiVo SVCD's...) but I'm assuming the same principles will apply when transcoding to create spec. compliant DVD's.

Thanks,

r0x

Pro-289
07-10-2003, 04:47 AM
r0x, I think you can input all kinds of files to TMPGEnc. Like I just converted a .AVI to spec SVCD .MPG, and burned it with Nero. Worked fine on my player. Should work fine with TyTool created .MPGs too.

Bottom line, you could just load the SVCD template (see below), set your input/output files, and Start encoding, and get a good spec SVCD .MPG. Everything below is just tweaking it a bit.

If you want to tweak your SVCD a bit, then press the 'Load' button at the bottom and load the template 'SuperVideoCD (NTSC).mcf' in the template directory. Then select your video & audio source, and your output filename. If your original audio is 192kbit, as the on the DTivos, then you'll need to change one setting from the template loaded. Select Setting->Audio and press "Bitrate:" then "Unlock". Now select 192 kbits as your audio. You can select any bitate for your audio, but if you're starting with 192 or whatever, then there's no use to go any higher. But you could go lower if want better video and lesser audio quality.

After changing the audio bitrate of the template, you could also experiment with Setting->Video->Motion search precision. Depending on how long you want to wait vs. quality. I've read that 'Highest quality' isn't much better than 'High quality'.

You could also experiment with Setting->Video->Rate control mode. 2-pass VBR should give good results, but longer encoding. But that option may not be worth while when encoding DTivo video, cause the source is usually higher than spec, so you usually won't end up with low Variable Bit Rate rates compared to CBR (Constant Bit Rate). But it might help a bit. I think you could use any of these settings, CBR, VBR, MVBR, CQ_VBR, & CQ. I think they're all spec. But they have end results on your encoding time vs. quality.

Using the template also, you could set your source range by selecting Setting->Advanced and double-click "Source range".

When you're done with the settings, select the Start button near the top. You should now have a spec SVCD .MPG.

r0x
07-10-2003, 07:18 AM
Pro, what is the best way of converting a .Ty into .AVI?

When I try to open a Tytool-generated .MPG in TMPGEnc, I get a pop up error message to the effect that TMPGEnc "can not open the file or unsupported". When I split the .Ty to .M2V and .M2P files with Tytool and then try to open the separated audio and video in TMPGEnc (as it seems to expect separate audio and video inputs) I get the same error message.

I found that you can convert from a TyTool DTiVo .MPG into a RGB .AVI in VirtualDub, but that turned my ~400 MB file into a ~30 GB file - there must be a better way...

Thanks,

r0x

P.S. This is a version of VirtualDub 1.5.4 that supports MPEG2 and AC3:

http://fcchandler.home.comcast.net/stable/index.html

Pro-289
07-10-2003, 05:40 PM
You shouldn't be dealing with .AVIs. You must have selected uncompressed to make such a HUGE file. But then you'll just have to compress it back down to a ~400MB Mpeg2 SVCD stream anyway.

I've found some .TYs, when converted to .MPG, don't import into TMPGEnc. I've sent Jdiner a portion of the .TY so he could look at it. But I was able to import the .M2V & .M2A (where are you getting .M2P?) into TMPGEnc from the problem .TY.

I've found on this one particular .MPG, when I hex-edit and cut 2084 bytes out, I can then use the .MPG in TMPGEnc. The 1st second is now corrupt, but it doesn't get encoded and is skipped.

I guess I was just lucky with a bunch of other .TYs I've used in the past.

Pro-289
07-10-2003, 07:16 PM
EDIT3: Only do the HEX-EDITING below if you don't have a good MPEG-2 decoder installed into TMPGEnc and you're not able to import any .MPGs into it. Read the post near the top to install a good one so you don't have to HEX edit your files.

I found a way to be able to import bad TyTool7r7a .MPGs into TMPGEnc with no chopping.

I just used a hex editor and CUT the 1st 14 bytes. Yup, removed'm all. In my .MPG, I ended up cutting (00 00 01 BA 44 00 04 00 04 03 01 89 C3 F8) out of the beginning. Make sure the next bytes after that start with (00 00 01).

And after a timely "Judging field order..." message from TMPGEnc, it will accept your edited .MPG now. :D

The .MPG seems to play fine, and without damaging the 1st second. But you probably shouldn't use the edited .MPG elsewhere. As it doesn't work with all of the other programs out there.

EDIT: I think actually it's better to just CUT the 1st 2084 bytes. It's not as corrupt as cutting only 14 bytes. But make sure the remaining bytes start with (00 00 01 B3), your actual cut bytes may vary.

EDIT2: Actually, hold off on hex editing anything. I came home and it works fine on this computer. The .MPG is importing into TMPGEnc. Using version 2.513.53.162 (core 1.96.149) here. So it must be something in the setup on the other computer. I'll have to investigate further.

r0x
07-11-2003, 12:07 AM
Hey Pro,

Thanks for your reply!

I got the "M2P" file by using TMPGEnc's MUX split feature - I thought I would be able to fool it by splitting the .MPG file and then reimporting the parts. No can do...

Since my last post I have acquired my first DVD player, a Portland PVD-1000 from Target. The reason I bought that particular one is because the new TyTool 7r7 release notes say something about optimizing for a Mintek 1600. I saw a blurb on the Nerd-Out forums saying that the Portland player is a virtual clone of the Mintek. I figured that I would be in a better position to figure out what my problems are if I had a DVD player and used the same one JDiner is using... ;-) I finally found out that my original SVCD doesn't work! (At least not in this player...)

Anyway, I re-MUXed a new .MPG from the original .TY file with TyTool 7r7 with audio transcoding to 44.1 kHz / 192 kbps and then burned a compliant SVCD (no unchecking the "compliant" box, etc.) in Nero. So what I wound up with is the original DTiVo video and new audio. This disk played with some minor freezing/pixelation - I finally got something that works!

The bad news, if you can call it that, is that TMPGEnc won't take this new MPG. However, the Ulead Movie Factory 2 Trial Version doesn't have any problem (EDIT follows) accepting it as an input. (End of EDIT) My better computer is in the process of transcoding into a compliant SVCD with Ulead. I'll look up the version numbers of TMPGEnc when its done.

r0x

EDIT: Ulead movie factory produced a choppy video that seems to freeze/rewind/repeat every 5 seconds. Also, audio goes in and out of sync. when it does that. Not worth the time and effort... :-(


The version of TMPGEnc I'm using is:

Verison: 2.513.53.162
Core Version: 1.96.149

FWIW, I'm working with a .TY stream from HBO's "Sex and the City" from 6/29 (The "Steve-O TiVo" episode.) The Setup->Info screen in WinDVD says the video in the .MPG is 15000bps.

netlizard
07-11-2003, 11:37 AM
How do you keep the audio and video synced? Most of the mpg files that I have made, the audio is either too fast or too slow. I am using TyTool7r7 and have tried it with editing the commercials out and without editing. I didn't know if I was messing something up. I have tried both workflows at the beginning of this post, but neither fixed the problem....

Please help with audio sync...

Thanks,
Netlizard

Pro-289
07-11-2003, 03:52 PM
EDIT: Got it read .MPGs again. I think my Ligos demo trial ran out or something. It used to work. Follow the instrustions from this post (http://www.dealdatabase.com/forum/showthread.php?s=&threadid=25014&highlight=tmpgenc+ligos). Basically it says to install the K-Lite (http://www.k-lite.tk/) Codec Pack Full version. It contains the Ligos codec. Then run the Ligos configuration and uncheck the Overlay option. Then move the Ligos up a priority level to the top in the VFAPI menu in TMPGEnc.


Originally posted by r0x
So what I wound up with is the original DTiVo video and new audio. This disk played with some minor freezing/pixelation - I finally got something that works!
You're getting the freezes because your video is still not SVCD spec. But if you can live with that, then it's ok. Install PowerDVD and select the option to show information. Then you'll see where in your video it spikes to 5Mbps, and that's probably where you're getting freezing/pixelation.

Both machines are using the same exact version of TMPGEnc. I think the problems I'm having with TMPGEnc not loading my .MPGs is in the Option->Environmental Setting->VFAPI plug-ins. On the machine that works, I have:
avi2(OpenDML) File Reader
BMP/PPM/TGA/JPG
Ligos MPEG-2
CyberLink MPEG-2
Microsoft MPEG-1
Wave File Reader
DVD2AVI Project File Reader 1.77.3 (DVD2AVI.vfp)
TMPEGEnc Project File Reader 2.513 (TMPGEnc.vfp)
DirectShow Multimedia -1
AVI VFW compatibility -2

I think it's the "Ligos MPEG-2" plug-in that's making it work. I don't have a Ligos plug-in on this non-working machine.

But I was able to get TMPGEnc to read my .MPGs by installing this MPEG-2 VIDEO VFAPI Plug-In (http://www.marumo.ne.jp/mpeg2/) near the bottom of that page, it's a .LZH file, so you'll need something like WinAce (http://www.winace.com/) to open the archive. This M2V.VFP plug-in is slower than the Ligos plug-in. So you should probably find a way to get a Ligos plug-in in there. I've just installed the Ligos demo from their site (http://www.ligos.com/lsx_mpeg.htm), but I think TMPGEnc only recognizes legal plug-ins, and probably not trial/demo plug-ins.


Originally posted by netlizard
How do you keep the audio and video synced?
You should be using the latest version of TyTool (http://www.dealdatabase.com/forum/showthread.php?s=&threadid=25588#post105979) and use its audio transcoding to convert your audio to 44.1@192. If your audio is Dobly Digital, then you'll have some problems, since TT doesn't fully support DD yet. Also make sure "Patch Audio Holes" is selected. If you have audio holes in your source, then your audio will probably be a bit out of sync.

r0x
07-12-2003, 07:32 AM
ANOTHER UPDATE: I found a couple of TMPGEnc SVCD templates in this thread, here:

http://www.dealdatabase.com/forum/showthread.php?s=&postid=51740&highlight=tmpgenc+AND+svcd+AND+template#post51740

The one that is labelled "directivo" produced really good results - you can still see some motion artifacts/jerkiness but most casual viewers wouldn't mind it. (As far as I can tell the only things this template does is change the Rate Control Mode to CQ_VBR and Motion Search Precision to High Quality.) Even though this disc is SVCD standard-compliant my POS Portland PVD-1000 player froze for a few seconds about a minute into playback. No issues on PC... :-0

UPDATE: The Ligos codec does indeed produce better video than the Marumo MPEG-2 VIDEO VFAPI Plug-In, but there is still some room for improvement - motion seems like a series of still shots.

Hey Pro,

Thanks again for your reply! (Especially for including all of those convenient links ;-) You da man! :-)

I installed the MPEG-2 VIDEO VFAPI Plug-In from the http://www.marumo.ne.jp/mpeg2/ page (BTW, WinRAR will open .LZH files) and TMPGEnc indeed read in the DTiVo .MPG and allowed me to re-encode. I went with the SVCD wizard and left all of the default settings. The disc plays in my player, however, the video is jerky kind of like bad PAL <-> NTSC standards conversion from 20 years ago... :-0

Have you hit the magic combination of CBR, VBR, MVBR, CQ_VBR, & CQ, etc., to produce smooth motion? Also, would expect that using the Ligos codec will produce better results with the TMPGEnc wizard default settings?

Thanks,

r0x

P.S. Pro, does your RCA player handle the DTiVo SVCD .MPG high bit rate bursts without freezes / pixelation?

Pro-289
07-14-2003, 02:49 PM
Originally posted by r0x
P.S. Pro, does your RCA player handle the DTiVo SVCD .MPG high bit rate bursts without freezes / pixelation?
Yea, I think it does. With experiments I was doing in the beginning, I didn't understand the standard SVCD spec, so I just made SVCDs straight from Ty .MPGs. But giving those discs to my brother, I realized something wasn't quite right. Also I think my player will play 48k audio on SVCDs too, but not sure if any others will, haven't tried that on my brother's player.

I think I found a good way to make SVCDs from Tivo AC3(DD5.1) sources with perfect sync. Basically when you make your compliant SVCD .MPG from the elements, because you have to split them so you can transcode DD5.1->Mpeg audio. Do NOT use the .M2V as your Video File. That's why you get audio sync issues. I notice some jerky and very fast video play at the beginning of the .M2V. Even in Windows Media Player & PowerDVD. So that results in audio sync offsets by the time you get to the end of your video. So far, I've been able to convert two 30 minute shows from DTivo AC3->SVCD 44.1 with perfect sync all the way though. I'll edit my workflow post at the beginning of this thread and include what I did.

Originally posted by r0x
Have you hit the magic combination of CBR, VBR, MVBR, CQ_VBR, & CQ, etc., to produce smooth motion? Also, would expect that using the Ligos codec will produce better results with the TMPGEnc wizard default settings?
I think I usually get smooth motion anyway. I've found some bad .tys though which cause a few problems. But all in all, I either just use CBR 2520, or VBR 2520, 'slow' or 'very slow' precision. But while I was sleeping last night, I also encoded with ghost&noise reduction for the heck of it. I think it took about 7 hours for a 30 minute show on an XP 1600. :)