Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
20th September 2015, 06:59 | #1 | Link |
Registered User
Join Date: Sep 2015
Posts: 20
|
Procedure For Processing DVD VOB Files?
I'm trying to minimize/remove grain and minimize/remove some ghosting on some TV series DVD's.
Been reading and trying to understand various online guides and tutorials, particularly in using AVISynth for DVD processing. Unfortunately the guides found so far are not quite complete or not quite detailed enough, or are difficult to follow/understand. What I've managed to do so far - > decrypt/deprotect the DVD's using AnyDVD and saved the resulting DVD contents copy to the HDD for editing > ran DGIndex to create a d2v file from the DVD VOB file as AVISynth can't read VOB files directly (apparently) > managed to write an AVS (AVISynth) script to read the d2v files and then run a degrain AVISynth plugin (plugin is located in AVISynth 'plugin' subdirectory, and the plugin is named "degrainmedian") > ran the AVS script by opening the AVS script in Virtualdub and then pressing 'play' button; two windows open in Virtualdub which shows the video running/playing in both windows, and a message at the top of Virtualdub main window that "dub in progress", which suggests the video is being processed (degrained). Eventually the videos stop playing and the dub has presumably finished. Now there are a few questions. I thought one of the two windows in Virtualdub showing the video being processed is supposed to show the source video (with grain etc), and the second window is supposed to show the processed video (with little or no grain etc)? Problem is, as far as I can tell, both windows seem to show the same video. I think this video appears to be just the processed/target video with little grain showing, but I'm not certain of this. As Virtualdub seems to show the same video (EITHER the source video, OR the processed video) in both windows, a comparison between the source and target video can't be made? Why? Judging by videos seen on Virtualdub, I'm not certain the video has been "degrained" (properly)? After the processing has finished, the video file should presumably be saved back to VOB format, and then the VOB files recombined to make another DVD. What is the procedure for doing all of this?? Frankly, and despite viewing several online guides, I'm finding AVISynth difficult to use, with it's scripting requirements which can be tricky/difficult to write and to debug. By the way, is/are there any easier ways to process/filter (VOB) video files using other (preferably with GUI) video editors? |
20th September 2015, 10:36 | #2 | Link | |||||
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
Quote:
A=MPEG2Source("Movie.d2v") B=A. (Filter here) StackHorizontal(A,B) When opened in VDub that will show the two videos side-by-side, the one on the left unfiltered, the one on the right filtered. Both in the same window. The closest to a GUI where you can easily see 'before' and 'after' might be AvsPMod. It's a little tricky to use and while lots do use it, I don't bother. Quote:
Quote:
Quote:
|
|||||
20th September 2015, 11:53 | #3 | Link |
Registered User
Join Date: Sep 2015
Posts: 20
|
Thanks for the prompt and detailed response!
The AVS script once 'opened' in Virtualdub doesn't appear to actually run or do anything (as far as I know). That is why I press the 'Play' button, then the video is played and a note appears that a dub is in progress (which to me suggests the AVS script is running). Should the AVS script automatically run once loaded into Virtualdub? If not run automatically then how do you get the script to run? The AVS script being loaded and (attempted to) run is - Code:
MPEG2Source("c:\users\administrator\my documents\the_professionals_disc1\video_ts\VTS_03_1.d2v") degrainmedian(limitY=5,limitUV=5,mode=3) degrainmedian(limitY=5,limitUV=5,mode=3) |
20th September 2015, 20:20 | #4 | Link | |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
To make it encode you choose and configure a codec and File->Save AVI. Like I said, I can't help with your denoiser as I've never used it. |
|
25th September 2015, 05:01 | #5 | Link | |
Registered User
Join Date: Nov 2007
Posts: 185
|
Quote:
Code:
vid1=MPEG2Source("c:\users\administrator\my documents\the_professionals_disc1\video_ts\VTS_03_1.d2v") vid2=degrainmedian(vid1,limitY=5,limitUV=5,mode=3) vid2=degrainmedian(vid2,limitY=5,limitUV=5,mode=3) stackhorizontal (vid1,vid2) You were originally working with the default clip. Problem with the default clip is "There can be only one". Avisynth can work with multiple clips. You just name them. but that does make the script a little more complicated. First line: The original video clip is named "vid1". That is the raw, unprocessed video. Second line: Degrainmedian creates a second clip named "vid2". Notice I added a new parameter in front of the others. the filter will by default act on the default clip - and there isn't a default clip. So the first parameter is the name of the clip to be processed. vid1 is unchanged. Third line: Same as the second line, except you don't process vid1 again - you want to process vid2 again. So far, the script's functionality is unchanged. But now comes line 4: Stackhorizontal taakes the two clips, vid1 (raw unprocessed) and vid2 (degrained twice) and joins them together side-by-side to make a new double-wide clip. To virtualdub, this will be a single clip. Now you can do a "before-and-after" comparison. Note: An Avisynth script doesn't "run", it "loads", just as a true video clip would. It sets up in the player or editor for source (mpeg2source is a source filter) and processing (degrainmedian is a processing filter). What happens then is what the player/editor normally does. Try loading the script into your favorite player. It'll probably play just as a video would. To just about all programs, an Avisynth script is a video. Virtualdib is pretty much obsolete for it's original purpose - editing and creating .AVI files. Nobody uses avi any more. But as far as I'm concerned, Virtualdub is the gold standard for testing scripts. If the script is good, it'll load. If it contains errors you'll get a message box reporting the first error. "First" because Avisynth stops on the first error. Hope this helps. |
|
1st October 2015, 02:44 | #6 | Link |
Registered User
Join Date: Sep 2015
Posts: 20
|
Thanks for the help! I've got VirtualDub displaying before and after videos simultaneously.
This is what I understand so far for the video editing procedure. 1) Copy contents from DVD disc to HDD (using decrypter also if required). Contents include VOB and associated files. 2) Convert/extract the video and audio contents of VOB files using DGIndex to d2v video and ac3 (or other) audio files. This step is done in order to allow Virtual to read/process the files. 3) Using VirtualDub, load AVS video/audio processing script(s) in order to get AviSynth to run and process video and audio as per AVS script commands. 4) After processing, the video and audio is saved as lossless and compressed AVI format via Lagarith (or similar codec) previously installed in VirtualDub plugins directory or installed elsewhere in the computer system. This step is required to allow re-encoding of video/audio. Now what, in detail please, is the easiest/fastest way to re-encode the video/audio? Are there easier/faster ways of doing the editing procedure different from the above? If so, what is the detailed procedure please? |
1st October 2015, 04:51 | #7 | Link |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
You can open your AviSynth script in your encoder and go directly to the final format. However, if there's some slow filter(s), it's often better and faster to make the Lagarith AVI in VDub followed by another AviSynth script using AVISource to encode to the final format.
|
2nd October 2015, 18:50 | #8 | Link | |
Registered User
Join Date: Nov 2007
Posts: 185
|
Quote:
Code:
MPEG2Source ("H:\2010- Personal\VIDEO_TS\Demo.d2v") LanczosResize (852, 480) AutoCrop (Mode = 1, wmultof = 4, hmultof = 4) Resize to what? Here's how to determine: I know my video is 16:9 because the decrypter told me. Alternatively, get MediaInfo, the GUI version. It's free, and a vital tool. Right click on a .VOB file and your context menu, and MediaInfo will tell you more than you'd ever want to know about it. Say it's 16:9, as in my case. Divide 16 by 9, then multiply by height, in my case, 480. Or, 16/9 x 480 = 853.333... There's already a problem with that. For the process I'm describing, the video dimensions, width and height, must be modulo 4. meaning evenly divisible by 4. 853.333 is not mod4. The nearest mod4 width is 852. Therefore, 852x480 is darn close. Avisynth has a bunch of different resizers. read the docs, try them all, and use the one you like. autocrop is a plugin you'll need to download. It'll eliminate the black letterbox bars at the top and bottom of the video. Mode 1 is the test mode. It doesn't crop anything, it draws lines where it would crop for evaluation purposes. The wmultof and hmultof simply ensure the mod4 ratio is maintained. If the cropping isn't right, there's a "threshold" parameter you can tweak. Once the "cropping" is right, change the mode to 0. Now the cropping is for real. The output of the script above is 848x352. OK, next I do the encode with X264. That is a command line encoder, but there are GUIs available for it. I can't recommend one because I don't use one. Here's my command line for the above script: Code:
"C:\Tools\x264Prog\x264.exe" --profile high --tune film --preset medium --bitrate 1000 -o "H:\2010- Personal\VIDEO_TS\Demo.264" "H:\2010- Personal\VIDEO_TS\Demo.Avs" When the encode ends, you have a file with a ".264" extension. That is a video stream. The accompanying .ac3 files are audio streams. All x264 did was create the video stream. Your decrypter gave you the audio streams. Now I open MKVToolnix GUI, and put in the video stream, then I add the desired audio stream or streams, maybe subtitles, chapters... I like the MKV container because you can put anything in MKV (except maybe a big-block V-8). The sample above, long-winded as it was, is what I do. 1 rip 2 index with DGindex 3 create script, testing with virtualdub 4 encode with x264 5 mux with MKVToolnix Done! If you want MP4 files, get My MP4Box GUI. It works, and it's newbie-friendly. But - what do you need the video for? There are 1001 different ways to do what you want, no matter what you want. |
|
2nd October 2015, 22:49 | #9 | Link |
Registered User
Join Date: Sep 2015
Posts: 20
|
Thanks for the (detailed) responses!
Basically what I want to do is to clean up/filter DVD video's (remove or minimize grain) and then recreate/re-author DVD's for playing back on stand alone DVD players. What is the easiest way of creating sample/test clips? And in what format should the clips be saved? |
3rd October 2015, 07:08 | #10 | Link | |
Registered User
Join Date: Nov 2007
Posts: 185
|
Quote:
Do your cleanup in your script, testing in Virtualdub. Once you're happy, load your script into HCgui, do a basic file setup, click the appropriate radio button for aspect ratio, ant either enter your desired bitrate (which controls output file size), or enter in your desired file size, and let HCgui calculate the bitrate. Now comes the biggie - click the button labeled "Make DVD compliant". That'll handle the other settings for you. Warning: some DVD authoring programs will cough blood and die of the GOPs aren't closed, and "Make DVD compliant" doesn't check that box. Also, there is a frame identified as "profile". in it are three radio buttons labeled as fast; normal; and best. That is a speed/quality selection. There's one more thing to explain, but I won't unless I need to. So, do you live in North America or Japan, or processing NTSC discs? The subject will be "telecine" and how to handle it. As far as short test clips are concerned, just rip one of the trailers or the studio intro. Alternatively, Avisynth has an internal function called "trim". Put this at the end of your script: Code:
trim (0, 4315) |
|
4th October 2015, 04:05 | #11 | Link |
Registered User
Join Date: Sep 2015
Posts: 20
|
Thank you for the helpful reply!
Actually the DVD videos are in PAL format, 4:3 aspect ratio, sized at 720 x 576 pixels, and run at 25 frames per second; according to "MediaInfo". Speaking of cropping and resizing. I have seen some scripts around that start with Crop(four numbers to define crop limits) followed by BilinearResize(640,480). Just a bit puzzled by this, as I don't think the videos are being converted (PAL to NTSC, or vice versa). And the script following the Crop and BilinerResize commands are often just some filters to remove grain/noise and/or correct other video issues. So I don't understand why the Crop and BilinearResize commands are needed if the video is not being changed in size? |
4th October 2015, 07:46 | #12 | Link | |
Registered User
Join Date: Nov 2007
Posts: 185
|
Quote:
The script lines above are obviously from someone who wants to watch the movie on his computer or smartphone. Look at the full script I posted a couple of posts ago. It has two equivalent steps. I used autocrop instead of crop. (people who crop manually probably roll their own cigarettes too) and I used a different resizer, but I did the exact same thing. A PAL DVD source must be 720x576. It's that simple. There are exceptions to that, but now we're talking advanced stuff that'll also be of lower quality. You used the word "simple". Your only remaining steps will be to author your newly created .M2V file that HCenc created and the .AC3 audio files that DGindex gave you back into DVD format. Then burn your new DVD structured files to a disk. ImgBurn is ideal for that, as ImgBurn already knows all about DVDs, and as soon as Imgburn figures out what you're trying to do, it'll configure itself for the job and offer advice. Warning: Imgburn can be politely sarcastic and smart-aleck. I hope you don't mind a program written by someone with a sense of humor. If your decrypter is DVDDecrypter (once king of the hill), ImgBurn will be very familiar. (Lightning UK! wrote both). As to DVD authoring, I left this for last even though it's not the last step because that's where I can help you the least. That's because although I've authored plenty of DVDs, even two or three professionally, I've never used free authoring tools. So read this for guidance. That being said, DVDStyler will probably be your best bet. EDIT: I retract my recommendation for DVDStyler. DVDStyler is hosted on SourceForge, which was once a highly respected place to download open source software. It is now malware central. When I went to the DVDStyler website to download it, I found I was about to download the "SourceForge Installer". No thank you. When I tried to go to the SourceForge page directly, my anti-virus blocked me. Caveat emptor! Last edited by minaust; 4th October 2015 at 19:23. |
|
8th October 2015, 23:43 | #13 | Link |
Registered User
Join Date: Sep 2015
Posts: 20
|
Thanks for the detailed comments!
Actually I've been having difficulty in downloading any programs from SourceForge over the past month or so. Previously there were no issues with downloading from there. So something is not quite right there now(?) I managed to download DVDStyler from another link, and I'm having to download other programs from alternative links also. For basic DVD duplication and minimal editing (cut, copy, paste), the freeware programs found so far seem to be adequate. But for more advanced editing, I've been (trying to) research which are best DVD video editing programs. But it is still not clear which are really suitable or the best in producing good/high quality results. So far, from personal testing and from online comments elsewhere, it appears there are limitations with freeware programs, particularly when trying to use filters to clear up issues such as grain, noise, color shift, low frequency (brightness) flickering . . The freeware programs do not seem to do a particularly good job in clearing up (some) video issues in some cases. Are there any recommended alternative commercial software (such as Adobe Premiere Pro, Adobe After Effects, Magix Movie Edit Pro, Cyberlink PowerDirector, or . .?) which are good at removing video artefacts/issues, please? |
11th October 2015, 09:34 | #14 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
DVDStyler is on par with commercial programs, or at least the older versions I've used. Aside from that, MovieFactory, Encore, and Vegas/Architect are quite good, as well as iLife if you have a Mac. I would try out the demos before purchasing, because even compared to DVDStyler it's usually a difficult trade-off.
DVDStyler can't do HD, though, whereas the commercial ones can. When it comes to simple editing, Premiere Elements is good but difficult to learn (and dovetails well with Audition), Vegas is very good, iLife and Final Cut Pro are great on a Mac, VideoStudio and Pinnacle are both perfectly good but I haven't used them much. You can also stick to free with Lightworks or ShotCut, both full NLEs, or AviDemux or Avisynth+AvspMod, which are more script-based. I mostly use Vegas or scripts myself. Last edited by foxyshadis; 11th October 2015 at 09:44. |
Thread Tools | Search this Thread |
Display Modes | |
|
|