View Full Version : Guide for .ts file to dvd
Little Raven
16th March 2005, 12:39
I have been searching for a good step by step guide on how to convert a HDTV .ts file into a DVD, but all I can find are guides to make it into a xvid/divx or that HDTV2MPEG program.
That program doesn't work about half an hour into the recording the audio gets out of sync and it gets more out of sync every minute (like it's getting progressive out of sync)
Can anyone here point me to a good guide or in the right direction?
dvwannab
16th March 2005, 20:51
try:
http://forum.doom9.org/showthread.php?threadid=49349
htguy
20th March 2005, 21:07
demux TS w/ ProjectX (latest version) default settings
result is a m2v file (video) and ac3 (audio file).
I then convert m2v file with Procoder2 to dvd standard video file only
then when the conversion is done you get a dvd compliant m2v file.
merge the newly created m2v file with the ac3 file with your burning software.
you got a nice quality dvd from your HD source. I used 7500 bitrate but it can be higher.
I should also note that I stripped commercials with HDTVtoMPEG2 1.11 beta.
eswrite
5th April 2005, 22:37
@Little Raven:
I have been searching for a good step by step guide on how to convert a HDTV .ts file into a DVD, but all I can find are guides to make it into a xvid/divx or that HDTV2MPEG program.
I'm working on the same thing, and after some research and a lot of stumbling trial-and-error, here's what I have come up with:
1) VideoReDo: Use VideoReDo to cut commercials and convert .tp/.ts to MPEG2. This is not freeware ($50), but it also purports to correct sound problems due to frame dropouts, etc.
2) DGIndex: Load the file from step 1 into DGIndex, and save the project with demux.
a) Note: I have also been able to load the .tp file directly into DGIndex and demux from it! The problem here is this doesn't guarantee audio/video sync if the source has dropout, which is likely for OTA HDTV. You will also need to use HDTVtoMPEG2 to retrieve the audio and video PIDs if you go straight into DGIndex (i.e., open the clip in HDTVtoMPEG2, view/record the PIDs, close HDTVtoMPEG2--no processing).
b) DGIndex generates a .d2v file which you can load into AVISynth. This .d2v file points to a .m2v file, which should be your MPEG2 source. It also generates a sound file, most likely a .ac3 file for the clip.
3) VirtualDubMod: Write an .avs file that calls the .d2v file with an MPEGSource() call. This is probably the most difficult step (still fine-tunning myself) because it will turn you into a computer programmer and semi-video expert if you aren't one already. Load this script into VirtualDubMod. In the script you can also load the audio generated in step 2 (AC3 most likely) with either:
a) DirectShowSource(), provided you have AC3 filters installed, or
b) NICAC3Source(), with the NICAudio.dll adapted filters from Filmshrink.
b) Use VirtualDubMod to test the script and generate a short output clip (i.e., save, let it go for a couple of minutes, Abort). If everything works, go to step 4.
d) You will need two basic HDTV conversion scripts, one for 1280x720p and another for 1920x1080i content. These will basically serve two functions: a) to join/dub your video and audio, and b) to down-size from HDTV resolution to DVD resolution, and c) interlace if needed (in the case of 720p content). Which all adds to: convert HDTV to DVD-compliant video. Once you get all this to work well (I'll post my final scripts when I'm done figuring out the implications of resizing interlaced material), you can re-use your scripts with minor edits for different broadcasts you want to process.
4) QuEnc: Use QuEnc to load the tested .avs script that you generated in step 3. Here's a beautiful AHA moment: If you use VirtualDubMod to fully process the .avs script, you will get AVI output, but you need MPEG2 output, which QuEnc can generate in one pass! I was very excited to discover this. I like it for two reasons:
a) I need an MPEG2, not an AVI. If I port an AVI into my DVD authoring software, it will need to convert to MPEG2, which could be lengthy and produce inaccurate results.
b) If you don't choose compression, you better have tons of HDisk space, because that AVI will need it. If you choose compression (except for HuffYuv, which still takes a lot of room) you will have loss, on top of the loss the final MPEG2 conversion will incur.
5) DVD Authoring: At the end of step 4, you should have a DVD-compliant MPEG2 file which you should be able to load into DVD authoring tool and burn away.
Anyway, that's my plan right now, and I'm about 90% there once I get AC3 audio to work (I was using AC3Source, which drops dialog due to downmixing issues). As I said, of all these, step 3 is definitely the head-spinner. You'll have to find and load plugins, make function calls, etc. In short, a programming task. Here's my 1080i conversion script, still a work in progress, so you can get an idea:
#~~~ HDTV-1920x1080i.avs ~~~#
#ASYNTHER HDTV 1920x1080i 29.970fps
# This script will take a source with a res of 1920x1080i at a
# frame rate of 29.970fps and perform IVTC to get 23.976fps and
# resize it to DVD-NTSC resolution of 720x480i.
# Note: 1080i >>> 480i requires de-interlacing prior to resize;
# use method suggested by scharfis_brain.
LoadPlugin("C:\Program Files\VirtualDub\DGMpgDec\DGDecode.dll")
LoadPlugin("C:\Program Files\VirtualDub\AviSynth 2.5\plugins\TDeint.dll")
LoadPlugin("C:\Program Files\VirtualDub\AviSynth 2.5\plugins\BT709ToBT601.dll")
#LoadPlugin("C:\Program Files\VirtualDub\AviSynth 2.5\plugins\AC3Source.dll")
#LoadPlugin("C:\Program Files\VirtualDub\AviSynth 2.5\plugins\MPASource.dll")
LoadPlugin("C:\Program Files\VirtualDub\AviSynth 2.5\plugins\NicAudio.dll")
LoadPlugin("C:\Program Files\VirtualDub\AviSynth 2.5\plugins\SimpleResize.dll")
# 1) Load .dv2 source generated with DGIndex, which can process
# HDTV .tp/.ts streams or MPEG2 files generated by VideoReDo
# if the latter is used to cut commercials.
Video=MPEG2Source("hdtv_src.d2v")
Assert(Video.height >= 1080, "HDTV_1080: input clip must have 1080 scan lines")
Video.ConvertToYuY2(interlaced=true)
#BT709ToBT601()
#Audio=AC3Source("hdtv_audio.ac3") # <== has problems with downmix
### Use DirectShowSource instead of AC3Source
#Audio=DirectShowSource("hdtv_audio.ac3") # <== need latest AC3 filters
### Use NicAC3Source
Audio=NicAC3Source("hdtv_audio.ac3")
AudioDub(Video,Audio)
# 2) De-interlace source material prior to re-sizing
### TDeing sloooow, 96 hrs for 2 hr clip
#TDeint(mode=1,link=0,type=3)
### Dumb Bob much faster, 5 hrs for 2 hr clip
#AssumeTTF()
#Bob()
### Use InterlacedResize-nothing to do here
# 3) For Source AR of 1.778:1 -- 16:9 Wide-Ssreen
Crop(4,4,-4,-4) # only for 1088 scan lines
#BicubicResize(720,480,0,0.5)
#Lanczos4Resize(720,480)
InterlacedResize(720,480) #<== Does this give sufficient quality?
# 4) Interlace output for DVD MPEG2 compliance
#AssumeTFF()
#Separatefields().Selectevery(4,0,3).Weave()
#~~~ HDTV-1920x1080i.avs ~~~#
Guest
5th April 2005, 23:00
>You will also need to use HDTVtoMPEG2 to retrieve the audio and
>video PIDs if you go straight into DGIndex
DGIndex can determine the PIDs. What are you talking about???
eswrite
6th April 2005, 00:23
DGIndex can determine the PIDs. What are you talking about???
Well, not apparently out of the box. I tried to load the .tp file, and it failed, so I specified the PID in Stream->Set PIDs, and that worked. Now I see you can auto-detect with Stream->PIDs Raw. Is that what you mean? That would be great. You know me and getting rid of extra steps ;).
Now, if you could tell me that DGIndex corrects for audio sync due to drop-outs, you would definitely know what I'm talking about because I'd be shouting it from the mountain tops.
Guest
6th April 2005, 04:48
Originally posted by eswrite
Now I see you can auto-detect with Stream->PIDs Raw. Is that what you mean? Yes, of course! If there are no PAT/PMT tables, you have to use Raw PID Detection. There is no need to resort to some obscure third-party application. :)
Maybe I should automatically resort to Raw if PAT/PMT fails. Yeah, that's the ticket. I mean, how does a n00b know the difference. :)
Now, if you could tell me that DGIndex corrects for audio sync due to drop-outs, you would definitely know what I'm talking about because I'd be shouting it from the mountain tops. You got me on that one. I'll be addressing it after MPEG1 support is completed.
Thank you for your feedback and interest in my tools.
Little Raven
6th April 2005, 10:46
arrghhh my computer crashed beyond recognition so I decided to reformat and now I'm gonna try your method eswrite.
I'll keep you posted of my findings too thanks a lot for your imput
eswrite
6th April 2005, 14:39
After a frustrating night, it looks like I will have to modify my procedure as follows:
Step 3) will be for video only. I will leave the audio demuxed until step 5), where hopefully my DVD authoring sw will be able to mux (combine/transcode/etc.) the DVD-compliant video I generate in step 4) with the audio generated in step 2).
Basically, QuEnc chokes on my AC3 sound (maybe because it's 384Kbs?), and VirtualDubMod doesn't do much better, so I am left to follow the recommendation everyone makes: use AviSynth+VDubmod for video only and re-attach the sound elsewhere.
eswrite
12th April 2005, 00:30
See this [work in progress] guide for what I have come up with so far:
http://eswrite.50megs.com/hdtv2dvd.html
Note that I haven't been able to do pulldown on IVTC'd material, so I'm letting ULeadMovieFactory deal with a 24fps MPEG (the guide isn't up to date in that respect yet).
sjchmura
13th April 2005, 16:53
EVE (mainconcept) is $50 and works fantastic. edit, commercials, convert - just great.
Nero also works and you can edit (more cluncky)
Ulead Movie studio 4 also imports TS also
eswrite
13th April 2005, 18:03
Ulead Movie studio 4 also imports TS also
Maybe, but my experience with MovieFactory 4 suggests it won't work much better in Studio. Basically, if ULead's software has to down-size and re-encode the material, kiss audio/video sync goodbye. That's the whole reason I have entered the long and painful journey of using VDubMod, AviSynth and whatever else I can get my hands on to get around ULead's bug.
I'll look into EVE: if it simplifies things and gives me good quality, that will be a very good thing.
EDIT: I found this quote on EVE
I tried this app to convert a HDTV .TS stream (1280x720p, 59.94 fps) to DVD (720x480,29.97 fps), and it reported that the conversion time was over 12 hours!
I can frameserve via AVISynth to CCE basic, and convert the same file in about 1.5 hours on my Athlon XP2600.
I don't believe the quality of the output could be improved enough to warrent an additional 9+ hours conversion time.
http://www.videohelp.com/tools?tool=Mainconcept_EVE
I'm wondering if this guy is doing all the conversion(s) necessary for his stream, i.e., IVTC, resize, pulldown, or dealing with 5.1 AC3, because it's taking me about that long to do a 1.5 hr HDTV stream with the various steps I outlined in my guide. Doubt that CCE shortens processing all that much.
f@chance
15th April 2005, 12:04
This is my first venture into HDTV.TS world and found the research for it interesting and feel I am starting on a bleeding edge again. However I may miss some basic facts here. This is what I want to end up with. DVD compliant MPEG2 video stream plus a DD 5.1 AC3 audio stream that can be imported into DVD Maestro for authoring.
My source is a 1280x720 progressive TS with the commercials removed giving me a 43 minute TV episode. No prices for guessing where it came from since I live in the UK and HDTV will not arrive here until 2006. The source plays fine in WMP Classic and I can't detect any video/audio sync problems.
I now did the following steps to convert the TS into MPEG2. Opened the stream in DGIndex. It complained of not finding PIDs. Selected the Stream->PIDs Raw detection and it poped up a box with entries for video and audio with two buttons on the bottom for setting the video and the audio. I highlighted the Audio track and clicked Set Audio, then I highlighted the video track and clicked Set video. Is this the correct procedure?
I then saved the project and it created a D2V vile and an AC3 file with the appendage -390ms. Does this mean that the audio is lagging behind the video by 390 ms and I have to move the audio forward by using -390 ms in either AC3 Delay Corrector or AC3 Fix?
I next created the following AVS file:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
MPEG2Source("C:\HDTV\MyEpisodes\Myepisode.d2v")
FDecimate()
LanczosResize(720,480)
Opened it in CCE 2.70 with the settings according to Screen shots of the template settings in http://forum.doom9.org/showthread.php?s=&threadid=49349&perpage=20&pagenumber=3
I left it running with about an hour to go by the time I left home and have not checked the results yet, but I am itching to see it.
Can anyone detect any areas of improvement or errors? What needs to be done with the -390ms audio track?
Thanks
F@Chance
eswrite
15th April 2005, 15:30
@f@chance:
Did you read through my guide (http://eswrite.50megs.com/hdtv2dvd.html)?
Note the following:
1) Your AVISynth script only deals with the video. This is what most recommend. YMMV. In my own script (see my guide) I mux video and audio together and use DelayAudio() to sync up the sound. For your -390ms, you would use DelayAudio(-0.390)
2) Your determination that there are no audio sync problems--is it only by examination, i.e., viewing of the clip? If so, you still (probably) have dropouts which may cause sync to go out of phase when you process/mux audio and video together. As I indicate in my guide, I use VideoReDo to clean up my HD stream's dropout problems. At a minimum, you can use its QuickFixStream feature, then feed the resultant file to DGIndex.
3) How did you come up with FDecimate()? Since you are in the UK, you are dealing with PAL material, and as I recall, Telecine issues are different (I'm no expert here). As you can see in my guide, I'm dealing with NTSC material, so I have to inverse-telecine (IVTC), process the video, then re-apply pulldown at the end to get back to DVD-compliant MPEG2.
Wilbert
15th April 2005, 17:09
How did you come up with FDecimate()? Since you are in the UK, you are dealing with PAL material, and as I recall, Telecine issues are different (I'm no expert here).
If you look at the resize line in his script you will notice he has a 29.97 source. In the hdtv world there is no PAL or NTSC. Only ATSC or PVA streams ...
Btw, not all hdtv at 29.97 is telecined.
f@chance
15th April 2005, 17:20
@eswrite
Thanks for the quick reply. I live in the UK but I am a fan of the show 24 so I obtained a TS recorded in the US of episode 17 from the NGs and they do wonders for an expat like me who lived 30 years in the US.
I read your guide and was not quite clear on why I have to deal with the muxed file. In DVD Maestro when you right click on the sound track it creates a sync audio track for the video. In the past I have only found sync problems when the editing out of commercials wasn't done clean. Since I have no control over the Transport Stream and someone else has done the editing out of commercials I checked visually if the sound moved out of sync in different places.
"GaveUp" posted this little utility that runs through the audio stream and corrects errors that come from the FOX network switching from 448khz DD 5.1 to 192khz during commercials and then go back. I intend to use this since 24 is from FOX.
Thanks for the idea on the -390ms job. In the past I have run this through AC3 Header and put a negative number in the delay field and it would fix it, perhaps I will try this and see what happens.
All in all I love the HDTV quality but in the UK none of my friends have the ability to play TS footage so I am trying to put it on DVD since everyone has a player.
Thanks for your help and your guide is very helpfull since more and more novices will ask the same question How do I put a TS on DVD.
eswrite
15th April 2005, 17:57
@Wilbert
I wasn't terribly clear, but when I make a distinction of NTSC vs PAL, I am referring to the output (DVD) format, not the source (HDTV). Since f@chance wants to generate a DVD from the HD source, he will go through a different (simpler, I believe) conversion process than what I have to go through if I detect my source is telecined.
@f@chance,
Wilbert is right. Not all HDTV is telecined. Follow the DGDecomb.dll AviSynth tutorial to determine if you have 3:2 pulldown in your source. Donald Graft does a good job of walking you through the checkout process, even if it seems a bit intimidating at first. My experience with all HD shows I've tried to convert to DVD is that they are telecined; even the "progressive" 720p shows on ABC seem to want to use the "film" look. I'm guessing 24--I used to be a regular watcher--is following the same approach.
I read your guide and was not quite clear on why I have to deal with the muxed file. In DVD Maestro when you right click on the sound track it creates a sync audio track for the video.
I'm still working this out myself. Unfortunately, I haven't had good results with feeding separate audio and video into my DVD authoring software and coming up with sync'ed output (the software, ULead MovieFactory4 may have to do a lot with this.)
In my guide, my intention is to use QuEnc, which accepts .avs scripts, to generate the final DVD-compliant MPEG2. In my case, I have to generate an NTSC MPEG2; in your case, I'm guessing, it will want to be PAL. Anyway, what I'm trying to do (and what few others recommend) is to do the audio+video mux/join in Avisynth, so that QuEnc's output will not be an elementary stream. This gets me a bit stuck at the moment, because since all of the sources I have run into are telecined, I have to inverse-telecine before I resize, and at the end of the process, I end up with 24fps where I need 30fps (for NTSC). (In your case, you need 25 fps, right?) So now I have to perform pulldown on the file, but DGPulldown only handles elementary streams (i.e., video only), which leaves me in a pickle. Fortunately, Nic, QuEnc's author has expressed interest in adding a pulldown option, so I may be in luck soon.
f@chance
15th April 2005, 18:43
Originally posted by eswrite
Follow the DGDecomb.dll AviSynth tutorial to determine if you have 3:2 pulldown in your source. Donald Graft does a good job of walking you through the checkout process, even if it seems a bit intimidating at first.
Where do I find these procedures? I hate to run in the IVTC issue because it will do ages to encode than.
Unfortunately, I haven't had good results with feeding separate audio and video into my DVD authoring software and coming up with sync'ed output (the software, ULead MovieFactory4 may have to do a lot with this.)
DVD Maestro does an excellent job the only time I found that they go out of sync is because during the commercial cut the audio some how was longer or shorter and it through everything out of wack. When looking at the converted WAV file I can measure how much needs to get cut off or needs to be inserted. Almost efverytime cutting to bring the audio forward. DVD Maestro will then kep the streams in sync.
In my case, I have to generate an NTSC MPEG2; in your case, I'm guessing, it will want to be PAL. .... So now I have to perform pulldown on the file, but DGPulldown only handles elementary streams (i.e., video only), which leaves me in a pickle.
No I am staying in NTSC land for the DVD because I don't want to mess with the frame rate and my menus. The menus are 720x480 WS and I hate to generate PAL menus. DGPulldown is what I want to use also and that is why I stay in the ES world. Looks like you may want to try a different authoring package. I have also had excellent results with DVD Lab. the only problem with that one is that I can't figure out how to drag several video streams on one track and then generate the AC3 file for it made up of all the AC3 pieces.
Hope you get your difficulty sorted :)
MarkGrigsby
24th April 2005, 23:23
I was wondering, is there really any need to use Telecide for 720p material? If there are no interlaced frames present, surely that can be left out?
Guest
25th April 2005, 03:55
Yes, that is correct. If there's no combing, then there's no need to decomb. :)
f@chance
25th September 2005, 09:54
Well, Here we go again. A new TV season a New #1 TV show and my second attempt of converting from HDTV 720p TS to MPEG2 DVD compliant format.
Neuron2, I want to thank you for all your excellent tools that made it possible to do a conversion that rivals the Official releases in quality. A 4 Gig HDTV TS stream was available of a show with 12 emmy award nominations and I said lets give it a second try.
DGIndex 1.44 RC2 worked perfectly. DGDecode to do the AVI frameserve for CCE worked perfectly. Decimate(cycle=5) to reduce the FPS to 23.976 perfectly. It was a success all around thanks to your excellent tools and thanks to eswrite for his guide.
Simple AVS script:
LoadPlugin("C:\Program Files\DGIndex\DGDecode.dll")
LoadPlugin("C:\Program Files\DGIndex\Decomb.dll")
MPEG2Source("D:\TV Series\EmmyAward\HDTV\EmmyAward-201.hdtv.720.dd51.d2v")
SelectEven().Decimate(cycle=5)
Crop(0,0,-4,0)
LanczosResize(720,480)
Just wanted to post this because I have a feeling the TS to DVD conversion will soon reach critical mass and the novices like me will inundate this forum with questons :D
laserfan
28th September 2005, 04:38
I edit my transport streams with VideoReDo Plus, and if I want a SD DVD Nerovision Express does it for me--the resulting output looks great. Couldn't possibly be easier, though it could of course be cheaper!
Krawhitham
9th October 2005, 20:38
Well, Here we go again. A new TV season a New #1 TV show and my second attempt of converting from HDTV 720p TS to MPEG2 DVD compliant format.
Neuron2, I want to thank you for all your excellent tools that made it possible to do a conversion that rivals the Official releases in quality. A 4 Gig HDTV TS stream was available of a show with 12 emmy award nominations and I said lets give it a second try.
DGIndex 1.44 RC2 worked perfectly. DGDecode to do the AVI frameserve for CCE worked perfectly. Decimate(cycle=5) to reduce the FPS to 23.976 perfectly. It was a success all around thanks to your excellent tools and thanks to eswrite for his guide.
Simple AVS script:
LoadPlugin("C:\Program Files\DGIndex\DGDecode.dll")
LoadPlugin("C:\Program Files\DGIndex\Decomb.dll")
MPEG2Source("D:\TV Series\EmmyAward\HDTV\EmmyAward-201.hdtv.720.dd51.d2v")
SelectEven().Decimate(cycle=5)
Crop(0,0,-4,0)
LanczosResize(720,480)
Just wanted to post this because I have a feeling the TS to DVD conversion will soon reach critical mass and the novices like me will inundate this forum with questons :D
OK so you are encoding the Video then remux the audio after correct?
while eswrite's guide is doing it all in one step?
f@chance how are you compensating for audio delay, I take it that is why eswrite does it in one step but I really like the idea of using CCE instead of QuEnc
f@chance
10th October 2005, 01:29
OK so you are encoding the Video then remux the audio after correct?
while eswrite's guide is doing it all in one step?
f@chance how are you compensating for audio delay, I take it that is why eswrite does it in one step but I really like the idea of using CCE instead of QuEnc
The audio track will tell you if there is a correction needed when DGIndex demuxes the audio track. In my case it was 0msec, so no delay/correction needed.
Then when authoring in DVD Maestro I use Create Sync Audio track and it is taken care off no delay no sync issues on the first 3 episodes of the emmy wining drama.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.