Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!
vintage erotica forum vintage erotica forum vintage erotica forum
vintage erotica forum

Go Back   Vintage Erotica Forums > Information & Help Forum > Help Section > Tutorials

Follow Vintage Erotica Forum on Twitter
Best Porn Sites Meet Our Girls Register FAQ Members List Calendar Mark Forums Read

Notices
Tutorials Step by step Guides and How to's with screengrabs.


Reply
 
Thread Tools Display Modes
Old 01-02-2010, 03:49 AM   #1
Denaniel
Anti-fascist Moderator
 
Denaniel's Avatar
 
Join Date: Dec 2006
Location: Toppling a statue
Posts: 8,689
Thanks: 61,163
Thanked 237,838 Times in 8,391 Posts
Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+
Default Encoding DVD to x264 [Updated: 06-12-2010]

Note: I have updated this tutorial to reflect recent changes in MeGUI and x264. Important changes are marked in dark red type.

Links to other posts in this thread:

Custom bluray profiles for MeGUI

How to use the bitrate calculator
(scroll down to the section "Using the bitrate calculator")

How to extract and remux MP4 files
(including how to mux video and audio to create MP4 files)

How to correct faulty aspect ratio

How to encode audio to AAC


I used to encode with XviD. It worked great for me and I had very good results for several years, while constantly tweaking the settings and playing around with the filesize vs. quality balance. I had heard about H.264/x264 but I resisted trying it for a long time because I wanted my rips to be playable on standalone players as well as PC's and Macs. I finally made the switch when I learned about bluray compatible settings in x264, and now I'm a total convert.

There are many free programs available for converting from DVD or Blu-ray to mp4/mkv with x264. You can find a list here:

http://forum.doom9.org/showthread.php?t=129748

I recommend MeGUI for encoding. It is not the simplest option available, but it is fairly easy to use, and works well for beginners and advanced users. You'll find a tutorial and more info here:

http://mewiki.project357.com/wiki/Guides/Basic_Guide
http://forum.doom9.org/showthread.php?t=96032
http://sourceforge.net/projects/megui/

[IMG]http://i50.*******.com/2h6wnco.jpg[/IMG]

This post is not a tutorial on MeGUI -- that has already been done, and the link is above. This is about how to use MeGUI (or any other GUI) to make vids that can be played on standalone Blu-ray players.


How to make your vids bluray compliant

If you are using MeGUI, the latest version comes with a recent patched build of x264, which allows bluray settings that are not available with the regular builds.

If you are going to use MeGUI, then read the next post (#2), and skip the rest of this post.


If you don't use MeGUI...

If you use another GUI to do your encoding, and you want your vids to be bluray compatible, so they will play on the new standalone bluray players, you need to grab a build of x264 that is "patched" with the proper features, and you need to use some very specific settings that are not part of the standard profiles.

You can get the latest patched version of x264 here:

http://x264.fushizen.eu/

Be sure to avoid the "unpatched build" and choose either 32 bit or 64 bit depending on your OS.

You need to put the x264.exe file in whatever folder your GUI places it by default. If you can't find that folder, then do a search for x264.exe and find the original version that came with your GUI. You may need to find the configuration or options menu in your GUI and point the program to wherever you put x264.exe.


Command line options

You need to include the following in your command line, or figure out how to get whatever GUI you are using to include the following settings in the x264 command line:

--level 4.1 --bframes 3 --ref 4 --slices 4 --keyint 24 --min-keyint 2 --vbv-bufsize 30000 --vbv-maxrate 40000 --aud --nal-hrd

Notes:

1. --ref 4 is for 1080p; if your source is 720p or SD (720x576 or smaller), use --ref 6

2. --keyint should be between 24 and 30 if the maximum bitrate is over 1.5 Mbit/sec; set it to equal the framerate. If max bitrate is less than or equal to 1.5 Mbit, you can set --keyint to twice the framerate (48 to 60).

3. if you are using SD material, you can set the level to 4.0 instead of 4.1, and avoid slices. This will improve the quality. But you also have to lower the vbv-maxrate. Here is the new command line for standard def:

--level 4.0 --bframes 3 --ref 6 --keyint 48 --min-keyint 2 --vbv-maxrate 15000 --aud --nal-hrd
[Note: no need to set vbv-bufsize for SD material]

(--keyint 50 for PAL, --keyint 60 for NTSC without decimation; --keyint 48 is for 24 fps film)


About using presets

If you want bluray compatibility, then the slowest preset that really makes sense IMHO is "slower". Because of bluray's requirement of maximum 3 bframes, the benefits of the other settings in "very slow" and "placebo" (without also increasing bframes) are negligible and they will only slow down your encodes for naught.

If you are using one of the faster presets, (medium, fast, faster), then a few of bluray's custom command line settings will overrule the preset needlessly. For example, in the fast preset, the number of reference frames is 2. If you include --ref 6 in the command line, this will slow down the encode dramatically. The --ref 6 is a maximum, which is needed if your preset is "slower", which normally sets --ref 8. But you don't need --ref 6 for "slow" (= --ref 5) or anything faster.

Likewise, --bframes 3 is a maximum that is not needed for "medium" or anything faster.
__________________
My FileFactory links are all dead (account closed)
and I have replaced most of them
but if you find any, please
send me a PM with a link to the post(s)


Please PM me if any of my other links are dead.

Don't post your thanks, hit the "Thanks" button!



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Denaniel; 06-13-2010 at 02:02 AM.. Reason: added two new posts and links in first post
Denaniel is online now   Reply With Quote


Old 01-03-2010, 02:14 AM   #2
Denaniel
Anti-fascist Moderator
 
Denaniel's Avatar
 
Join Date: Dec 2006
Location: Toppling a statue
Posts: 8,689
Thanks: 61,163
Thanked 237,838 Times in 8,391 Posts
Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+
Default Custom bluray profiles for MeGUI [Updated: 06-07-2010]

To make your life much easier, I created custom profiles with bluray compatible settings and exported them in a format you can use in your own copy of MeGUI.

Here is the download link:
(Note: these are new profles, updated for the latest version of MeGUI)

http://rapidshare.com/files/39641692...2010-06-07.rar

UnRAR into an empty folder, and you should have 26 .xml files (each .xml file is a different profile). Then copy the files into this folder:

megui\allprofiles\x264

When asked if you want to overwrite files with the same names, choose "Yes".

[IMG]http://i48.*******.com/nxl4b8.jpg[/IMG]

Next time you open MeGUI, you will see 26 new choices in the dropdown list of profiles (aka presets).


Update: When I first wrote this tutorial, there were no bluray profiles among the many that came with MeGUI, so I made up my own. Recent versions of MeGUI do include bluray profiles, but they are not very good IMHO. They are the ones that look like this:

Bluray - 2pass
Bluray - Balanced
Bluray - High Quality
etc.

These profiles are designed for HD (high definition) sources, and they don't allow for the flexibility available to improve encoding quality when using SD (standard definition, e.g. DVD) sources. Another reason they are not very good, is that the only setting that changes between the lowest- and highest-quality profiles is the crf (constant rate factor). It is better to also tweak some of the other settings to improve quality -- e.g. me, subme, trellis -- similar to the way the fast, medium, and slow presets tweak these settings. I have adapted these standard bluray profiles that come with MeGUI so that they make more sense, and give you a better spectrum of choices (quality vs. speed) when encoding HD sources.

The HD profiles, listed in order from highest to lowest quality:

Insane > Very High Quality > High Quality > Balanced > Standard

[see note below re: Bluray - 2pass profile]



SD profiles

The other custom bluray profiles, which I created for SD material from film sources, look like this:

bluraySD-NTSC-16-9-faster-film
bluraySD-PAL-slow-film
etc.

The first one above is a profile for bluray compliance, standard def (SD), NTSC source, 16:9 anamorphic, faster preset (i.e. lower quality than slow preset), and from a film source.

The second one is also for bluray compliance, standard def, and from film, but PAL instead of NTSC, 4:3 instead of 16:9, and slow preset instead of faster preset (i.e. better quality but takes longer to encode).

The "faster" profiles will produce lower quality than the "slower" ones, but I suggest you experiment with some short clips and decide for yourself where to draw the line regarding quality vs. speed.

All of these profiles assume that you are not resizing after cropping (if any cropping is used), that your source is mod4 (width and height are multiples of the number 4), and so they will adjust the SAR (source aspect ratio) accordingly.

With x264 it is generally unnecessary to resize (which can degrade the quality) so long as you use an adequate bitrate (about 50-65% of XviD). If you do use resizing to get the proper aspect ratio, then you will need to remove "--sar xx:yy" from the custom command line. In the example below, you would simply delete the --sar 40:33 from the box under "Custom Command Line", and that line would become blank:

[IMG]http://i50.*******.com/osbe52.jpg[/IMG]

If your source is not from film (or a DVD/video that was mastered from a film source), then you can adjust three of the settings manually, but the changes are optional. See sections in next post that begin with "If your source is film..."


Saving your own custom profiles

If you want to adapt my profiles, alter any of the profiles that come with MeGUI, or just create your own from scratch (better know what you're doing though), you can. Maybe you want a profile for TV captures, or one for anime, or maybe you don't care about bluray compliance and want to create your own "unrestricted" profile. Whatever your reasons, here's how to do it

Once you have the settings you want, click on the "New" button, give your new preset a name, and then click OK. That's it.

BTW, as if things weren't confusing enough, there are two types of "presets". First, there are the internal presets built into x264 (fast, medium, slow, etc.) Then there are presets that come with MeGUI (also called "profiles", but the GUI still says "presets") and that you can invent on your own (iPod, PSP, AppleTV, etc.)

Next time you load a vid in MeGUI, you can choose the profile/preset that you invented, and you'll get the exact same settings without all the hard work. If you tweak the settings a bit for some reason, but don't want to save the new version, MeGUI will save the new settings to the scratchpad, and it will load the scratchpad settings next time you open the program.


Bluray - 2pass profile

If you are targeting a particular file size, you can use a bitrate calculator (there is one included in MeGUI) to determine the bitrate needed to give you the size you want (based on the running time, framerate, size of the audio, and any subtitles or other extras.)

When targeting a specific bitrate, you normally use 2pass mode. The first pass gathers information about which frames or sections are more complex and need higher bitrates, and the second pass uses that information to calculate the best bitrate for each frame while the vid is encoded.

The "Bluray - 2pass" profile has an arbitrary bitrate of 8000 selected as a target. This is designed for 1080p HD material, but is too high for 720p and SD material. You can adjust the bitrate to meet the target suggested by a bitrate calculator, or you can choose based on your own preferences. If you want to match the Bluray - 2pass profile's target of 8000 kbps with non-1080p material, here are the equivalent bitrates:

1080p -> 8000 kbps
720p -> 3000
PAL -> 1350
NTSC -> 1125
640x480 -> 1000
etc.
__________________
My FileFactory links are all dead (account closed)
and I have replaced most of them
but if you find any, please
send me a PM with a link to the post(s)


Please PM me if any of my other links are dead.

Don't post your thanks, hit the "Thanks" button!



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Denaniel; 06-08-2010 at 02:00 AM.. Reason: updated info
Denaniel is online now   Reply With Quote
The Following 16 Users Say Thank You to Denaniel For This Useful Post:
Old 01-03-2010, 02:16 AM   #3
Denaniel
Anti-fascist Moderator
 
Denaniel's Avatar
 
Join Date: Dec 2006
Location: Toppling a statue
Posts: 8,689
Thanks: 61,163
Thanked 237,838 Times in 8,391 Posts
Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+
Default Instead of importing profiles...

Edit: this post is now out of date. The latest version of MeGUI has many new options and different standard settings and profiles than the older version that was available at the time I wrote this.

I will update this post when I get a chance, but for now it will probably only confuse you.

The final section titled "Using the bitrate calculator" is still useful, however.



If you want to manually tweak the settings yourself to get the best quality (without sacrificing a lot of speed for very little gain), here is a step by step guide. This will show you how to create the "slower" profiles from scratch, and you can learn a little about the MeGUI interface at the same time.

Another thing I've learned since I wrote the first post, is that if your source is standard def (SD), e.g. from a DVD or VHS source, you can lower the Level (from 4.1 to 4.0) and thus avoid using slices, and you can also raise the Max GOP Size. Both of these changes will increase the quality of your encodes.


Setting up Config the 1st time

I'm going to show you how to set up MeGUI to make the highest quality encodes using x264 if your source is standard def, i.e. SD not HD, and you want Blu-ray compliance.

After opening* MeGUI, click on Config to get to the x264 configuration dialog.
(if it opens too slowly, see tip at the bottom of this post)

At bottom left, under Presets, choose "p6 - Slower"

Click box next to "Advanced Settings"

You should now see this:

[IMG]http://i47.*******.com/5fka3n.jpg[/IMG]
We will come back to the Main tab after tweaking the settings on the other tabs. The command line settings in this pic are not what we want; notice how they change each time we switch to a new tab.

Misc tab

Under "Adjustments" click on the button "Preset Settings"

Under "Custom Command Line" type in (or paste) the following:

--aud --nal-hrd

[IMG]http://i48.*******.com/2il0mrm.jpg[/IMG]
Notice that --aud --nal-hrd now appears near the end of the command line, and that many of the other command line settings have changed.

Optional: If you want, you can also enter an adjustment for the aspect ratio. Instead of resizing your 720x576 or 720x480 DVD resolution (or a smaller cropped resolution), you can use any mod 4 resolution (width and height both must be a multiple of the number 4) without resizing if you adjust the "source aspect ratio" (SAR). Here is a chart with the proper setting depending on your source:

PAL 4:3 --sar 12:11
PAL 16:9 --sar 16:11
NTSC 4:3 --sar 10:11
NTSC 16:9 --sar 40:33

Note2: if you are using my profiles and you decide to resize to the proper aspect ratio, then you can simply remove the "--sar xx:yy" (xx and yy are numbers) from the custom command line.


Analysis tab

All of the settings are as they should be.

Optional: If your source is film (or DVD/video that was mastered from a film source, e.g. not shot on video or captured from TV), there is one change you should make on this tab:

Psy-Trellis Strength = 0.20

Otherwise, leave it at zero.

[IMG]http://i46.*******.com/10fxksx.jpg[/IMG]
Psy-Trellis Strength is set to 0.20 for film tuning only, otherwise leave it untouched.


Rate Control tab

VBV Buffer Size = 24000

Leave everything else untouched.

[IMG]http://i49.*******.com/nd2yxd.jpg[/IMG]
--vbv-bufsize 24000 is now included in the command line.

Frame-Type tab

Maximum GOP Size = 48 to 60, set to twice framerate*
Minimum GOP Size = 1
Number of Reference Frames = 6

*If your source is
NTSC (29.97 fps), set Max GOP = 60
PAL (25 fps), set Max GOP = 50
Film (24 fps), set Max GOP = 48
anthing else, set Max GOP = 2x frames per second

Optional: If your source is film (see note under Analysis tab, above) there are two more changes:

Deblocking Strength = -1
Deblocking Threshold = -1

[IMG]http://i47.*******.com/ets36x.jpg[/IMG]
Deblocking Strength and Threshold are set to -1 for film tuning only, otherwise leave them untouched.


Back to Main tab

AVC Level = Level 4

MeGUI won't let you make this Level setting until you set the VBV Max Bitrate to 15000 (which it did automatically when you set the VBV Buffer Size), so we have to come back to the Main tab again.

While you're here, you can change the crf (Const. Quality) setting, or you can elect to do a 2 pass or 3 pass encode.

The default setting is --crf 23, which is fine for some sources, and will probably give you relatively small file sizes. Best quality is --crf 18 (lower number equals higher quality plus larger filesize), but 18 will produce about 2.5 times the file size of 23. Personally, I like --crf 21, which is about 50% larger than 23, but also noticeably better quality in many cases. You can play around with encoding short clips and make your own decision.


Using the bitrate calculator

[IMG]http://i45.*******.com/292qm54.jpg[/IMG]
You set the framerate, the audio type and audio bitrate you want, the container (mkv or mp4), and the file size -- the calculator will then tell you what the average video bitrate should be.

You can use the bitrate calculator (in Tools menu) if you want to target a specific file size (700 MB or 1 GB, for example), and MeGUI will automatically enter the proper bitrate in the command line. The default option in this case is ABR (average bitrate), but I recommend selecting "Automated 2pass" instead, and then click the box marked "Turbo" to speed up the first pass.

[IMG]http://i48.*******.com/2re358n.jpg[/IMG]

It really isn't necessary to do a full quality first pass, because the idea of the first pass is just to get statistics that help the codec to calculate the bitrate distribution during the second pass. The Turbo option changes some of the settings during the first pass to speed it up a lot, but the second pass settings will stay as you set them.


*Tip: if you find that it takes a long time for your script to open in MeGui, you can speed this up by preventing the preview window from opening automatically each time you open a new script (it can always be opened afterward if you like).

You will find this under Options->Settings->Main then deselect “Open preview after AviSynth script selection". (Thanks, Porsche_fan.)
__________________
My FileFactory links are all dead (account closed)
and I have replaced most of them
but if you find any, please
send me a PM with a link to the post(s)


Please PM me if any of my other links are dead.

Don't post your thanks, hit the "Thanks" button!



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Denaniel; 01-12-2010 at 02:32 AM..
Denaniel is online now   Reply With Quote
The Following 15 Users Say Thank You to Denaniel For This Useful Post:
Old 01-06-2010, 11:16 PM   #4
melvin
Veteran Member
 
melvin's Avatar
 
Join Date: Jan 2007
Posts: 1,295
Thanks: 2,071
Thanked 38,513 Times in 1,280 Posts
melvin 175000+melvin 175000+melvin 175000+melvin 175000+melvin 175000+melvin 175000+melvin 175000+melvin 175000+melvin 175000+melvin 175000+melvin 175000+
Default

This codec is real magic. Im just about to restore and resize some old movies and the results are stunning.
However, it needs a lot of calculation time unless you have a very fast machine...
melvin is offline   Reply With Quote
The Following 3 Users Say Thank You to melvin For This Useful Post:
Old 01-07-2010, 04:29 PM   #5
louiscar
Senior Member
 
louiscar's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 281
Thanks: 605
Thanked 7,398 Times in 288 Posts
louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+
Default

Just a question about your own choices. Any reason why you choose MP4.

Personally I find mp4 files a pain when it comes to editing or cutting. Vdub for instance won't look at them and I presume by the error message it's nothing to do with a codec not being present, (could be wrong). I think it's the mp4 format it doesn't recognise.

Gom player and kmplayer also don't seek smoothly through the video. A number of other problems compared to the avi wrapper.

Just interested if there are issues that I've not understood that make an mp4 wraooer better than avi.
__________________
A man without Lysa is only half a man!!

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
louiscar is offline   Reply With Quote
The Following User Says Thank You to louiscar For This Useful Post:
Old 01-07-2010, 07:02 PM   #6
Porsche_fan
Senior Member
 
Join Date: Nov 2008
Posts: 142
Thanks: 66
Thanked 596 Times in 123 Posts
Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+Porsche_fan 2500+
Default

I'll let Denaniel answer from his prospective but I can address the question from my limited prospective. As I mentioned earlier, the advantage of mp4 is the use of the more effective h.264 codec's (x.264 is the free version) compressibility.

The bit rate require to achieve the same image quality is greatly reduced...Denaniel mentioned in the tutorial it is about "about 50-65% of XviD". The result is that the video quality on a mp4 file, done correctly, is visibly better than one with Xvid. This is even true for extremely high 4,500+ kbps bitrate files in HD.

Personally, I think the advantage is more than just bitrate related, as to me h.264 more correctly represents the original image than Xvid. It is also much easier to obtain the optimal configuration compared to Xvid as a result of the new x.264 presets...slower, slow ect.

There are several downsides to h.264. First, because it is highly compressed it requires more CPU to decode, especially if the codec's internal deblocking is utilized. Ffdshow allows the user to select different levels of activating the internal deblocking architecture, which reduces CPU cycles.

The second downside is the lack of easy to use editing software. There are a couple of solutions to this problem. First, you can frameserve the file to VirtualDubMod using directshowsource...you need to have a codec like ffdshow installed. Also be aware that any settings that are selected on ffdshow such as resize or sharpeners will show up in the video you are frameserving to VDM. My personal experience is that VDM doesn't handle this too well and outputs as an uncompressed file. Sometimes I have to also use "converttoRGB()" to correct the image.

An alternative is to use avidemux. I personally haven't used it but it handles a variety of containers (avi, mp4, ASF & mkv) and has features similar to VirtualDub such as a nice preview window.

As to the player compatibility issue with mp4, I personally have had fewer issues with wrapping in the mkv container. So if you find player compatibility issues, try rewrapping the mp4 file in mkv...it is extremely easy and takes a few seconds. I'd recommend mkvmerge GUI. It is user friendly and has a number of nice features.

The mkv container is superior to avi btw, allowing smaller file sizes through reducing overhead. You are probably aware of this but you can place Xvid files in a mkv container and shrink the file size. Mkv also handles VBR better than avi and allows to wrap subtitles within the container instead of having them as separate files.

MeGui also allows output as a mkv file as opposed to a mp4 file...so you don't have to go through that extra step. Personally, I think Denaniel's choice of mp4 is the right one as it is much easier, with the tools available, to change from mp4 to mkv than the other way around.

Last edited by Porsche_fan; 01-07-2010 at 07:53 PM.. Reason: One more thought. lol
Porsche_fan is offline   Reply With Quote
The Following 4 Users Say Thank You to Porsche_fan For This Useful Post:
Old 01-07-2010, 08:23 PM   #7
louiscar
Senior Member
 
louiscar's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 281
Thanks: 605
Thanked 7,398 Times in 288 Posts
louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+
Default

Thanks Porsche fan,

Editing H264/mp4:

I liked the frameserve suggestion although it appears that I'd need to re-encode rather than use direct stream copy this way. I end up with uncompressed video (gspot reports : IYUV w/ U & V switched) and the file is massive. A test of a few mins gave me 1.3G. :-). I'm sure I can get good results but it's a shame to degrade the original quality, there is always a downside to re-encoding.

I'll have a look at avidemux although I feel another steep learning curve coming on. :-)

Creating H264/mp4:

I tried my first test on meGUI today but it's not going too well. I see that when selecting h264, it only allows mp4 mkv or raw, so at least I can see why avi is not even an option here. However, any attempt to encode mp4 crashes x264.exe regardless of whether I create a d2v file separately or via the interface. I prefer doing it manually because I've got my avs templates set up but one thing that does cause a problem is that I convert ac3 to wav with dgindex. This is gives me another problem as meGUI won't deal with uncompressed WAV format.
As for the crash I have to assume that I have a faulty patched file. I was only able to get something output selecting the raw option. Xvid errors as well but that's more than likely because I've not installed the required file.

As for mkv, I had a file the other day that I had problems with and it appears the same, I really only wanted one scene from this file and couldn't cut it with vdub. I can play it with Gom or Vlc but the problem might be that I need a matroska codec. Not that familiar with mkv yet.

anyway thanks for your explanation.

EDIT: x264 - tried another patch version and that crashes even when using from the command line.
I finally found a version that works but I'm not sure it's a patched version so -nal-hrd params are not supported however, if anyone else is experiencing problems try here:

http://x264.nl/
__________________
A man without Lysa is only half a man!!

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by louiscar; 01-07-2010 at 10:04 PM..
louiscar is offline   Reply With Quote
The Following 3 Users Say Thank You to louiscar For This Useful Post:
Old 01-08-2010, 02:59 PM   #8
Denaniel
Anti-fascist Moderator
 
Denaniel's Avatar
 
Join Date: Dec 2006
Location: Toppling a statue
Posts: 8,689
Thanks: 61,163
Thanked 237,838 Times in 8,391 Posts
Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+
Default

Louiscar, I will address some of your points in my next post, but I have to get this other thing dealt with right away, because it affects a bunch of people who downloaded one of my latest vids.


How to extract and remux MP4 files

I recently posted a new rip of Laura's Toys (post is here) and after posting I found out that the 2nd audio track (director's commentary) was somehow cut short by 32 minutes. So I re-ripped the audio track from the DVD, converted it to AAC audio, and remuxed it with the original video and 1st audio track (original soundtrack) to create a new MP4 file. Problem is, a lot of people already downloaded the original file, which plays and sounds fine, except that the commentary is incomplete. There's no reason they should have to redownload the entire vid (1.22 GB) just for an optional 48 MB audio track.

So I'm going to use this opportunity to explain how to extract the video and audio streams from my original LaurasToys.mp4 and then remux the video and 1st audio track with the newly ripped commentary audio. This same method can be used to add additional language tracks, subtitles, chapters and other media files to MP4 files.

Download Yamb

We'll use a cool little piece of freeware called Yamb, which is a GUI for mp4box, the versatile tool for making, editing and extracting mp4 files. The program is free and only 6.8 MB (checked clean for viruses and malware). The download page and direct download link are here:

http://yamb.unite-video.com/download.html
http://yamb.unite-video.com/Yamb-2.1...eta2_setup.exe


Extracting the video and audio streams

On the left side of Yamb, click on Editing, then double click "Click to extract streams from AVI/MP4/MOV/TS files"



Under Input, navigate to LaurasToys.mp4

Under Content you should now see three files listed, one video (AVC) and two audio (AAC). Tick the radio button "Extract all streams to raw format"

The Output location by default is the same folder that LaurasToys.mp4 is already in.

Click Next



Wait a few minutes while the tracks are extracted





When extraction is complete, click the Back button twice to get back to the Main window


Muxing audio and video files

On left side, click on Creation

Double click "Click to create an MP4 file with multiple audio, video, subtitle and chapters steams"



Click Add, and choose LaurasToys_track1.h264 [this is the video track]

Click Add again, and choose LaurasToys_track2.aac [this is the main audio track]

Click Add again, and choose commentary.mp4 [this is the commentary audio track]

The first two files were created by Yamb and should be in the same folder where LaurasToys.mp4 is located. The third, commentary.mp4, you should have downloaded from rapidshare -- the link is in my original thread here

In the Output box, give the new file a different name, e.g. LaurasToys_remux.mp4



Optional: If you want to specify the language and title of the two audio tracks, here's how.

Click on LaurasToys_track2.aac to highlight it, then click Properties

In the Properties dialog, click the Language dropdown box and select English

In the Track Name box, you can type in whatever you want, e.g. Original Soundtrack (just to distinguish this track from the commentary track)

Click Ok



Do the same for the Commentary track, but Track Name = Commentary

Click Next



It might take awhile before you see any progress, so be patient. Notice in the sample above it took three minutes to "begin importing" the first stream. It seems to take mp4box a few minutes to prepare the files. Eventually, you'll see "Importing AVC Stream..." in the list of Events, and the green progress bar will start to move.



This muxing took six and a half minutes to complete. Yours might be more or less, depending on your processor, etc.

The new file has the original video and 1st audio tracks, plus the new secondary audio (commentary) which is now complete.

My copy of Yamb always gets stuck at 99% and won't finish, but the files are complete regardless. I have to use Task Manager to "End Task" because Yamb won't finish and it won't close on its own. Minor hassle but the program works fine otherwise.
__________________
My FileFactory links are all dead (account closed)
and I have replaced most of them
but if you find any, please
send me a PM with a link to the post(s)


Please PM me if any of my other links are dead.

Don't post your thanks, hit the "Thanks" button!



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Denaniel; 01-08-2010 at 03:07 PM..
Denaniel is online now   Reply With Quote
The Following 13 Users Say Thank You to Denaniel For This Useful Post:
Old 01-08-2010, 03:50 PM   #9
louiscar
Senior Member
 
louiscar's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 281
Thanks: 605
Thanked 7,398 Times in 288 Posts
louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+
Default

Quote:
Originally Posted by Denaniel View Post
Louiscar, I will address some of your points in my next post, but I have to get this other thing dealt with right away...
No problem and this post is also of interest because I wa about to ask about adding more than one track.

Just to update my own situation, I've downloaded the latest Virtualdub 1.9.8. There are now plugins for mp4 and quicktime which I wasn't able to get to work (might be something to do with my codec choked machine). With this it loads rather than complains but it sees no audio and the preview is blank.

I did manage to load though forcing directshow.vdplugin to be used and now can see and edit the movie but curiously (which brings me to the question of multiple streams) it sees only one track, luckily the english one.

The downside is that the directshow plugin is no good for direct stream copy so re-encoding is still necessary if one needs to cut scenes.

Back to creation - I hadn't realised that audio needed to be muxed in meGUI, rather hoping that it would accept a complete avisynth offering and do the whole thing. Now I understand it's a separate step but will accept a separate avisynth file for audio (if I can figure out how to alter the script just for audio only) - this means that I can probably serve it my uncompressed wav file in some way and get it to encode that. I still need to get the muxing and other tools for meGUI but I spent a rather frustrating day on all this so taking a break.

My experience has been that I have had less sync problems if I start with an uncompressed file and using vdub code it with the audio. Muxing after encoding is a new method for me so now I'll read your post in detail to see how this is done.
__________________
A man without Lysa is only half a man!!

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
louiscar is offline   Reply With Quote
The Following 3 Users Say Thank You to louiscar For This Useful Post:
Old 01-08-2010, 04:33 PM   #10
louiscar
Senior Member
 
louiscar's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 281
Thanks: 605
Thanked 7,398 Times in 288 Posts
louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+louiscar 25000+
Default

Quote:
Originally Posted by Denaniel View Post
This muxing took six and a half minutes to complete. Yours might be more or less, depending on your processor, etc.
As an exercise I've done this with Lingerie Intimes. Extracted to raw and muxed just one track back. It worked however I end up with a 2GB file rather than the orginal 700MB. This is odd because the .264 raw file is only 655MB and audio 30Mb.

Bitrate has gone from 1450 on the original vid to 4800 on the final so I guess it's uncompressed it in the process.

Is there something I've missed?

EDIT: LOL! Ok Yamb was having a strange moment. I tried it with both tracks and could see that once muxed I get the right size but it keeps doing it over and over again. 4 times in all. If I aborted the first file it produces is valid. I then killed it and restarted, did the first test, ie. single track and it stopped after one pass. I think something got confused somewhere. I think I may have found a possible bug but need to replicate it to be sure. The only difference is that I didn't close it after demuxing the first time around.
__________________
A man without Lysa is only half a man!!

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by louiscar; 01-08-2010 at 04:56 PM..
louiscar is offline   Reply With Quote
The Following 3 Users Say Thank You to louiscar For This Useful Post:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT. The time now is 08:01 AM.






vBulletin Optimisation provided by vB Optimise v2.6.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.