View Full Version : Hdtv --> Dvd
Imperium
15th April 2006, 02:33
Hey everyone. first of all. im a complete beginner to this scene so please cut me some slack. ok? :P
I was thinking. is it possible if you have a HDTV movie on your Harddisk. is it possible to convert it (downsample) to DVD (4.7gb) ? and that it will be playable on normal DVD player and a non hdtv plasma screen.
the reason i want to do this. is that i heard that if u convert a HDTV to DVD. it will give significant more quality then normal DVD.
but how can i realize this?
hope some of you can point me the right direction :)
thanks
Kika
15th April 2006, 22:11
Yes, that's possible.
Read the important threads here (use search) - you will find all the answers you need.
frednerk
16th April 2006, 12:02
This link http://forum.doom9.org/showthread.php?p=799785#post799785 is useful if you capture direct the SD channel rather than the HD channel, if you've a choice... given you want to burn to DVD, it suggests lossless "burning" since you can import the resulting fixed/demuxed audio/video files into DVD buillding programs such as DVDAuthorGUI or DVDlab etc - Aussie stations simulcast SD and HD versions of a show, so it's preferable to capture the SD version direct and use that since it's so close to DVD format.
Capturing HD and converting to SD for DVD burning, instead of the above if you have that option, will not generally improve the result for you much if at all (I stand to be corrected by more knowledgable people).
Even if you still capture HD, the steps below indicate how to fix/demux the .TS stream and then edit the demuxed streams to cut unwanted material prior to, say, DGIndex and AVISynth conversion to SD (DVD format) with the HC encoder.
I've a DVICO too, and am told 2 programs are quite useful and very very reliable on SD digital captures in particular (or even HD captures if you also want to post-process in some other way too):
1. first PVAStrumento 2.1.0.15 - I've found this recommended all over the place... fixing dud streams, demuxing multiple embedded audio, auto re-syncing streams, detecting/fixing scrambled packets, etc... it outputs mpv,ac3,mp2 files... (remember to rename the .TP into a .TS before running PVAStrumento or it won't work properly) http://www.offeryn.de/dv.htm
2. then mpeg2schnitt 0.8 to define/cut out the bits you don't want from the files produced by PVAStrumento... it can output consolidated mpv,ac3,mp2 files (ie not a snippet for each cut) ... http://world.altavista.com/babelfish/trurl_pagecontent?lp=de_en&trurl=http://www.mdienert.de/mpeg2schnitt/
3. if you want, then use the MUXer of your choice to recombine the mpv and audio into an mpg
What you do with the DVD-compatible mpv,ac3,mp2 from 1&2 (if an SD capture) or the mpg from 3, afterward, is up to you :)
Cheers mate
Cheers
MrTroy
16th April 2006, 15:59
the reason i want to do this. is that i heard that if u convert a HDTV to DVD. it will give significant more quality then normal DVD.True. A commercial DVD often has multiple sound tracks and loads of extras on the same disc, so that the bitrate for the main movie is low. Making your own DVD with 1 audio track and 0 extras would give a better quality, because you can use higher bitrate.
But if it's a long movie (say, longer than 90 mins) your self-made DVD will actually give worse quality. That's because commercial DVD's have more space (8,5 GB) than a writable DVD (4,3 GB) for the same movie.
frednerk
17th April 2006, 04:09
Just a thought, if some (many/most?) movies at present are up-sampled to HDTV resolution for broadcast, captured digitally and then re-processed/down-sampled to DVD (SD) would that necessarily improve quality ? I guess you're right in the OP implies a question of better quality as compared to a bought DVD which may or may not have other processing applied during production.
Your_Idol
9th October 2006, 13:44
"non hdtv plasma screen"
don't bother. You could use mpeg1 and not see the difference if you don't have HDTV
phædrus
19th February 2007, 22:36
I see a lot of people mention the PVAStrumento -> Mpeg2Schnitt combination. This sounds good, but I tried PVAStrumento on two .tp files (I renamed .ts before opening in PVAStrumento) and it was identifying and discarding so many GOP's that were oversized, according to the analysis, that there literally was hardly any program left. I haven't even got to the Mpeg2Schnitt part yet. Is there something wrong with the way I am using PVAStrumento, or is there something wrong with my HDTV card? Reception has been good, 87%-100% signal strength on that channel according to my MyHD card. Usually I can just put the .tp file directly to DGIndex and convert from there using the .d2v file without problems. Sometimes there is a sync problem, so that's why I wanted to try PVAStrumento. So I am trying to understand my problem, if anyone has any suggestions.
Oh, also on the second file I tried, it wouldn't even recognize all the streams embedded in the file. This particular frequency has three different channels on it. 56, 56.1 and 56.2, and the main 1920x1080 stream was on the first subchannel. PVAStrumento only seemed to list the first stream, which was 708x480. I am confused.
I know many have suggested VideoReDo, and I am sure it is a fine program. I want to learn about each step in the process, though, rather than just have it done for me. Though if I keep running into roadblocks, I may just take the path of least resistance. :)
Pookie
20th February 2007, 03:08
VideoRedo is great. The only app I know of which can take a regular program stream (vob, mpg, etc) and save it as a Transport Stream that plays on the MYHD MDP120.
phædrus - Broadcasters like to multiplex up to 3 TV channels into 1 Transport Stream. That's why you can see the main HD program, then some low res news channel, and on another sub-channel some weather radar image.
Very easy to extract only the good stuff from the .TP file -
Run it through Mpeg2Repair . It will leave you will a "fixed" .TP file that consists of only the video and audio PID of the HD program. You can automate the process - there's a command line front end for mpeg2repair - do a search in the January '07 postings. Otherwise, stick to the GUI.
Mpeg2Repair works well, but it is slow - 30 minutes for a 8GB TP file. A Faster app is Project X , but it isn't as simple to use. There's also Xport.exe by DrMpeg, which is incredibly fast at demuxing, but start with the easy app first.
Anyway, try a test with Mpeg2Repair :) http://homepages.roadrunner.com/mwilczyn/mpeg2repair/mpeg2repair.zip
phædrus
21st February 2007, 13:58
Thanks Pookie. I am trying it out. I will see this morning if the resulting avi encode has any audio sync problems. Will mpeg2schnitt accept the fixed .tp file for cutting? I need something for editing. I can't remember if mpeg2cut2 will take .tp files or not, but that was another one I considered.
laserfan
21st February 2007, 16:32
im a complete beginner...if you have a HDTV movie on your Harddisk. is it possible to convert it (downsample) to DVD (4.7gb) ?Assuming your HDTV movie is a Transport Stream, the simplest way to get to DVD is to drag & drop onto HDTV2DVD, a freeware application whose only prerequisite is the .NET framework.
Select whether you want a single or dual-layer disc and go.
phædrus
21st February 2007, 18:28
OK, this is a little strange. I processed a stream of Stargate Atlantis with Mpeg2Repair and got a ___fixed.tp file. I put this through DGIndex and converted AC3 to WAV. Made the WAV into riff-WAV MP3 at 128kbpsCBR. Convert video to .avi with VirtualDubMod and marry it back to the audio stream. It goes progressively more out of sync as the hour progresses.
If I make a .d2v project with DGIndex of only the last program segment, sync is fine.
That means that DGIndex is reading this "fixed" file, and the soundtrack is getting gaps in it that leave the sound progressively more ahead of the video. This seems to occur at some points during the commercial breaks, because taking only the program segments and making a .d2v project separately for each one, avoiding the commercials, and then encoding, I get no sync problems.
Where to go from here? Because Mpeg2Repair does not seem to fix the file as far as DGIndex is concerned. What am I not understanding?
Pookie
22nd February 2007, 03:09
Yes, that's a common problem. I believe it is due to bit rate changes of the audio during commercials. Not many free apps out there that can easily edit transport stream files. I'm going to recommend VideoRedo again, but if you're still interested in learning, you can try this:
Download wget.exe http://users.ugent.be/~bpuype/cgi-bin/fetch.pl?dl=wget/wget.exe
Save the code below as fix_tp.bat. You can use it to pre-process your Capture.tp file for editing and commercial removal.
On Mpeg2 Transport Stream files that contain errors, it'll do a decent job of automatically repairing and recreating a file named
output.mpg, which will hopefully play in sync and will serve as the input file to your Mpeg2 editor program. I recommend Mpg2Cut2, mostly because it as easy as cutting in VirtualDub. Another option is to run Comskip on Output.mpg to automatically cut out the commercials. It works quite well, but I'd hold off on that for a bit until you're comfortable using Mpg2cut2. Link: http://download.videohelp.com/download/mpg2cut2_6917_libmmd_mpalib.zip
Usage is simple: [ for the start of the clip, ] for the end of the clip, + to add clip to the queue
Place fix_tp.bat and wget.exe into the same folder as Capture.tp. Run by clicking on fix_tp.bat
@echo off
if not exist 7za.exe wget ftp://130.161.155.128/pub/frans/benoit/dicomserver/7za.exe
if not exist xport.exe wget http://www.w6rz.net/xport.zip
if not exist mplex.exe wget http://tinyurl.com/2cckyp/mjpegtools_180_P4_Win32_Muxxi.7z
if not exist cygwin1.dll wget http://alloy.mit.edu/alloy30/cygwin1.dll
if not exist ac3fix.exe wget http://tinyurl.com/28q2bn/ac3fix.exe
if not exist mpeg2repairCLI.exe wget http://www.shuberg.org/utils/mpeg2repairCLI.zip
if not exist mpeg2repair.exe wget http://tinyurl.com/26bg5x/mpeg2repair.zip
7za e -y xport.zip
7za e -y mjpegtools_180_P4_Win32_Muxxi.7z
7za e -y mpeg2repairCLI.zip
7za e -y mpeg2repair.zip
:: --- if there isn't an input file named "capture.tp" exit
if not exist capture.tp goto end
:: --- fix errors and remove dummy PIDs
mpeg2repairCLI.exe /R out_fixed.tp capture.tp
:: --- demux video and audio from fixed file
xport out_fixed.tp 1 1 1
:: --- patch and fix audio track
ac3fix.exe bits0001.mpa fixed.ac3
:: --- mux back into a mpeg2 program stream file
mplex -f 3 -b 1800 -r 19200 -o output.mpg bits0001.mpv fixed.ac3
del bits0001.mpa & del bits0001.mpv & del fixed.ac3
:end
See if the resulting output.mpg plays in sync. It might play a bit jumpy- that's OK, it only has to be in sync. You're only using output.mpg as the input for your Mpeg editor / Dgindex and transcoder. Edit out the commercials with the great Mpg2Cut2 app.
* Note: The command line front end for Mpeg2Repair requires .NET 2.0
twolfe18
22nd February 2007, 05:56
just to jump in, how do programs like nero 7 handle mpeg4 (either xvid or h.264) => mpeg2 (dvd) compare to the other programs you have mentioned? is the quality lower?
i know with nero 7 you can select to do a 2-pass encode with vbr, so i would think that it could work pretty nice.
also, is there a maximum bitrate that most dvd players can handle? i would assume that you cant put like a 30 second clip at a billion kb/s on a dvd and play it in your dvd player.
phædrus
22nd February 2007, 21:04
Thanks, Pookie. I just noticed looking at the .bat file that this has to retreive a bunch of programs from the net, and the computer I am using for HDTV is not connected to the net. So I'll have to get those files and burn them to a CD, and transfer them to the other computer manually. However, thanks for the heads up on the .NET 2.0 needed.
I take it that all the executable files will need to be in the same folder before the batch file will work? (Then it looks like I'll have to modify the batch file. I'll get expert help for this.)
I will try this and see how it goes. I don't object to buying a program like VideoReDo -- if it was an all-in-one solution for taking programs and converting them to an ISO I could burn on DVD. But it is only one step in the process. Also, I am converting to DivX at the moment, but eventually I want to use CCE (as I do now within DVD Rebuilder). Well, that is another learning curve. But someday if VideoReDo adds those features, it might really be exactly what I want.
Pookie
22nd February 2007, 21:38
Once you've downloaded all of the required little programs, you can rem out the lines that begin with
"if not exist". I was just trying to simplify finding and downloading everything manually.
The only requirement for the files in the batch script is that they are in your path somewhere. If you created a folder on C:\> called HDutils, you could add the following to the top of the script:
Path=%path%;c:\hdutils;
Fix_tp.bat would need to reside in a permanent path location, like C:\windows\system32
Ideally, the script can be enhanced to run Comskip, cut out the commercials, autorun Dgindex, and execute your favorite command line encoder against the resulting .AVS file. For DivX, you can use Mencoder.exe.
phædrus
22nd February 2007, 22:41
Oh, there would be one other little complication, it appears to me. The batch file is supposed to create a file output.mpg -- this is how I read it.
But the input file capture.tp will have two or three programs in it -- the main broadcast channel and one or two subchannels. How will Mpeg2RepairCLI.exe know which one I want? Maybe I am revealling my ignorance about .mpg files, but I didn't think they could contain two or three TV channels of audio/video information.
Is this a fly in the ointment? When I used the Mpeg2Prepair GUI version to process a file, I had to select a specific PID, and in the resulting ___fixed.tp file, the program seems to have put that PID at the "top of the stack" so that DGIndex recognized it immediately, and I did not have to go and select the correct PID (as I would have had to do on the input .tp file).
Pookie
22nd February 2007, 22:54
Excellent question and one that I pondered as well. I asked the author of Mpeg2repairCLI to release a version which lets you choose the PIDs to process. Until then, one of the 2 repair apps automatically searches for the PID containing HD dimension video. I have yet to see it choose the wrong PIDs.
phædrus
23rd February 2007, 15:08
Very good then. I'm glad I don't have to worry about that. Thanks for the script. I think to simplify things, even though I'll have to move my modem temporarily, I will connect my HDTV computer to the web to allow the script to download and unzip everything I need, then disconnect it. But first I need to install the .NET.
phædrus
5th March 2007, 03:00
Pookie, let me tell you how I am doing with your script. I used it to download and unpack all the needed executables and .dlls into one folder. Then I let it start to work on a capture.tp file. It did output an out_fixed.tp. I wasn't watching the computer closely, but it appears that the demux was successful, as it started to create mpv and mpa files, past that point something went wrong. The window closed (after it deleted the mpv and mpa files it created) and that was that. I think it ran into a problem in the ac3fix stage.
I suspect also that it did not select the correct PID in the program stream. At least, I wanted to eliminate that uncertainty. So I tried again, doing the Mpeg2Repair step manually with the GUI. Once I was certain I had a _fixed.tp file that was properly done, I edited your .bat file and made a new .bat file that would pick up the process at that point.
:: --- demux video and audio from fixed file
xport out_fixed.tp 1 1 1
:: --- patch and fix audio track
ac3fix.exe bits0001.mpa fixed.ac3
:: --- mux back into a mpeg2 program stream file
mplex -f 3 -b 1800 -r 19200 -o output.mpg bits0001.mpv fixed.ac3
del bits0001.mpa & del bits0001.mpv & del fixed.ac3
:end
Again, the demuxing worked fine. the bits0001.mpa and mpv files were created. I watched as it moved to the ac3fix stage and some error occurred -- and before I could read any error messages, the window closed, and again my .mpv and .mpa files were deleted.
Can you suggest what I can do at this point to determine why the ac3fix is choking? I am getting close to success here, but I'm blocked here at this step.
Pookie
5th March 2007, 04:21
Hi phædrus, I'm glad that you're trying out the script.
Try this just to temporarily troubleshoot.
:: --- patch and fix audio track
ac3fix.exe bits0001.mpa fixed.ac3
pause
:: --- mux back into a mpeg2 program stream file
mplex -f 3 -b 1800 -r 19200 -o output.mpg bits0001.mpv fixed.ac3
pause
rem del bits0001.mpa & del bits0001.mpv & del fixed.ac3
:end
--------------------------------------------------------------------
If it is ac3fix, replace it with the Ac3cutter app (only 80K in size) - http://www.bestsharing.com/files/DbbVBSn236181/ac3%20cutter%20v0.1.rar.html
from:
ac3fix.exe bits0001.mpa fixed.ac3
to:
ac3cutter.exe bits0001.mpa fixed.ac3
phædrus
7th March 2007, 18:09
Pookie, it turns out that I was at fault. When I was deleting the zip files I must have accidentally deleted the ac3fix.exe file. So I replaced it and everything works fine. I ran my capture of Stargate Atlantis through it, took the output.mpg to DGIndex, demuxed and converted the audio to MP3 with CDEx, then made an avi with VirtualDub. I didn't even edit out the commercials, and the whole show stayed in sync. I hope this will continue to work in the future and my initial success is not a fluke.
Then, I tried to get fancy. I've never used CCE as a standalone program before, but always in conjunction with DVD-Rebuilder or DVD2SVCD. But I wrote an avs script, and took the same output.mpg file above, ran it through DGIndex and demuxed to ac3 and then loaded the avs script in CCE to make a DVD compliant .mpv, which I remuxed to the ac3 using the same mplex that you had me download. The picture looks beautiful, but now the sound lags the video by about .5 seconds.
Let me get this straight. Apparently when DGIndex does an AC3 to WAV conversion, it applies the correct audio timing delay, but when it just demuxes the AC3, it does not correct. It seems like this is what is happening.
Basically, now I need to learn how to correct the timing on the AC3 stream of an Mpeg2 file. I am a newbie at this. I have played around with delaying or advancing the audio stream of an avi file, using VirtualDubMod. That's easy. But when resyncing mpeg video, what would be a good bet for the AC3 stream?
Yes, I know I haven't learned to cut out commercials with Mpeg2Cut2 yet, but I have to take one step at a time. I will learn to do that. On the Mpeg2Cut2 page, it seems there are a lot of caveats about editing out multiple chunks of an mpg file. They list a number of situations where it doesn't cut exactly on the GOP you've specified. Is it really that finicky in practice?
I hope you will let me pick your brain a bit more, till I get this process down to the point where I can get reliable results in the format I prefer (which would probably be a DVD compliant mpeg2 file -- as this would play well on my software or hardware players).
Pookie
7th March 2007, 22:17
Cool. Happy to help out, phædrus. Pick away. If I don't have the answer, a fellow Doomer certainly will.:)
Very good sign that the remuxed file is in sync. The delay after encoding can be attributed to a number of different reasons, but I think it is the commercials that are probably tripping things up. It would be optimal for you to cut them out with Mpg2Cut2 - it'll also reduce your encoding time by 33% for a 1 hour Television program. Don't worry about the GOP stuff - it only means that your cut will be accurate to 1 second, which is precise enough for the kind of editing we're doing here. Your other option is to run comskip against the output.mpg file. It works very well, but it is a bit slow. I'd encourage you to try Mpg2Cut2 first. It really is an easy program to figure out. I'll post some screen caps if you need assistance.
When you demuxed the audio from the MPG file, did DGindex report a delay ? It'll name the .AC3 file with the delay amount in milliseconds at the end of the file name -example:
File 3_2ch 384Kbps DELAY -182ms.ac3
In that case, you can use DelayCut http://jsoto.posunplugged.com/tools/delaycut_1212_exe.zip
delaycut -auto -o "Fixed_Audio.ac3" "File 3_2ch 384Kbps DELAY -182ms.ac3"
It will automatically cut the file and compensate for the delay amount it reads from the file name. Nice, huh ?
In case you don't want to cut the commercials, you can also rem out the last line from the batch file so it doesn't delete the bits0001.mpv and fixed.ac3 files, then run Dgindex against bits0001.mpv only. Mux your encoded M2V with fixed.ac3.
No guarantee this will resolve the delay issue, however. You'll just have to try it.
Mug Funky
8th March 2007, 02:29
i heard that if u convert a HDTV to DVD. it will give significant more quality then normal DVD.
not necessarily. it varies from DVD to DVD, but generally speaking working off a massively compressed HD stream compared to an almost-uncompressed SD source to produce the same DVD, you SD source will win, all other things being equal.
the film transfer for a HD stream will most likely be better - mainly due to the equipment used for it. SDTV film transfers usually happen in realtime and go out to tape. HDTV transfers will be done using a much newer and higher quality film scanner.
however, the vastly better quality of a HD transfer will more than likely be destroyed by mpeg-2 compression (HD channels in my country are about 12 mbps - nowhere near enough - not even close). the blocks will be smaller after resizing down, but it'll still be crap.
phædrus
8th March 2007, 15:13
OK, I tried another tp file, Monday night's capture of 24, and already we have new problems. After it got through mpeg2repair, and demuxing, the ac3fix program threw a bunch of errors complaining about the frame size being too large, as I recall. Then after remuxing, the final output.mpg was only about 100MB in size, in other words it muxed about a minute or so of the program and then quit. With no useful output.mpg, I couldn't cut commercials if I wanted. Just to watch the show now, I will have to put the fixed.tp file (which appears not to be so fixed after all) through DGIndex, a piece of the program at a time, and encode each piece separately with VirtualDubMod. That's working fine, but I'm not finished yet. Clearly there are issues with these transport streams that we're not addressing yet.
Thank you for the delaycut option, though. That will be a helpful tool, I think.
What we need is something like a Gordian Knot for HDTV. I'm hoping eventually some clever people will put that kind of thing together. It'll have to be pretty fault tolerant, though. The streams I've been recording seem to have all sorts of problems, even when OTA reception is perfect.
Oh, another option that I might use in some cases is HDTV2DVD, if I could get it installed. That wouldn't work for me with most TV programs though -- it doesn't seem to have editing capabilities, does it?
Pookie
8th March 2007, 17:15
VideoRedo, buddy.
It has a full 2 week trial period. You should check it out. For $50, you'll save yourself so much hassle. You'll be able to edit your transport stream file directly - remove the commercials, fix transport stream errors. I always try to use free and GPL versions of utilities, but there isn't anything in the freeware world that competes.
Whenever you have errors in your TS files, it might take several different methods to end up with a file that you can transcode.
As far as ac3fix- as I mentioned a few posts back, download ac3cutter and use it instead. Same syntax as ac3fix.
phædrus
15th March 2007, 21:28
OK, one more question -- at the end of this process (the script you wrote), we get an output.mpg which is a muxed high definition MPEG2 stream plus the fixed ac3 audio. Is there an easy way to turn this back into a transport stream? i.e. a program that will take an .mpg file like this one as input and save as a .ts or .tp format?
Pookie
15th March 2007, 22:10
Yes, there's a free method which I recently discovered using Avidemux2.
http://fixounet.free.fr/avidemux/win32/r2885_win32.zip
Open the Mpeg in Avidemux2
Let the App Index the Mpeg file
Set Video and Audio codecs to "Copy"
Set Output format to Mpeg TS
-----------------------------------------------------------------
Or, VideoRedo will let you save as TS.
phædrus
16th March 2007, 00:00
Pookie, you da man!
Normally I wouldn't care about mpg to ts conversion, but I deleted my original .tp file of a program I wanted to convert to DVD quick and dirty with HDTV2DVD. And that only accepts transport streams as input.
Oh, I think I will soon be able to get this HDTV thing down to a system. I'm getting more consistent results now.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.