GUIDE: New Bad-ass DivX Techniques...

This forum is for discussion pertaining to homebrew and indie software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
Post Reply
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

GUIDE: New Bad-ass DivX Techniques...

Post by fatheadpi » Fri Dec 27, 2002 2:13 pm

As some of you (RE: Az and reaper) saw in my one year anniversary thread in OT (which got closed, by the way), I have been experimenting with MP3PRO audio in Divx 5 avi's. Well, guess what?

It works under DCDivx, and quite well.

Here is the test example, more / bigger tests coming soon.

Source: SOFDEC VIDEO RIPPED BY ME FROM ORIGINAL GD-ROM
Video: MPEG-1, 320x240, 3600 CBR kbps, 30fps, Full Frame
Audio: CRI ADX, 44.1khz, 16 bit, stereo, 396 CBR kbps
Description: The intro video for Tonk Hawk's Pro Skater. Quick scene changes and constant motion. 00:01:06 length.

Output: Divx AVI HYBRID
Video: Divx 5.0.2 Pro, 320x240, 1000kbps, 1-pass mode, Biderectional Encoding used, slowest/highest quality mode, 30fps, Full Frame
Audio: MP3PRO (SEE NOTES FOR ENCODING INFO), 44.1khz, 16-bit stereo, 64 CBR kbps
Approx. 8.5 megs in size.
RESULT

The video played full speed. No frames were dropped, except for a few at the very beginning (first 2 seconds) of the movies, as it started, but this happens to most divx movies on Dreamcast anyways. The quality was true to the source, and outperformed all other tests witnessed by me to date. Performance was identical to videos with identical video streams and conventional MP3 audio streams @ 32khz, and better than videos produced in 2-pass mode. I would estimate 90 minutes of video could be put onto a disc using this setting. Note that the files was 200k smaller than its 2-pass counterparts.

The audio was as good as DCDivx could render it. It was a definite 44.1 khz signal, and any aritfacts were present in other MP3 streams as well. This is mostly due to the average-at-best quality of DCDivx's MPEG audio decoder. Dropping the audio bitrate had some effect on audio quality, and little on video performance and file size, so I would reccomend sticking with 64 kbps.

There were no sync errors.

One thing that i changed in this setup, and will now discuss, is the use of S-video. Prior to this test, the video had always reached the dc inthis manner:

Dreamcast Yellow Video Composite--> 3-way a/v switch box --> VCR Aux in --> VCR Coax out --> TV antannae in

Now it goes like this:

Dreamcast Naki VGA box S-Video out --> 4-wav RF modulator box --> coax out to TV.

The improvement is immediately noticeable. Pictures are clearer, and there are no more 60 hertz jitters. If you are using a TV like mine with only standard coaxial antannae cable input, you may want to consider this, and if S-Video is an option for you, I highly encourage it's use. It makes videos on my relatively poor quality Zenith look slightly better than a great VHS.

MP3PRO ENCODING NOTES:

MP3PRO is a copyrighted format. It is basically the extension of the MPEG layer 3 audio format, but with double the compression abilities. 64 Kbps is defined as CD quality (enough bandwidth to properly reproduce a 44.1khz 16 bit stereo audio stream). I do not know of any free PRO audio encoders. I own a registered copy of MusicMatch Jukebox plus, which contains an MP3PRO encoder option. I do not know if the free versions contain the layer 3 pro option or not, but it is well worth a 25 dollar invesment. MusicMatch is a great piece of software. Also, I think some newer versions of Nero have an MP3PRO option where you encode MP3's.

The MP3's were externally encoded using MusicMatch, and streamed in using VirtualDubMod, an extension of VirtualDub. i will be discussing this more and more, as it is far more suited to our purposes than the conventional VDub builds by Avery Lee alone.

More soon, post questions / comments in here.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Fri Dec 27, 2002 3:38 pm

Great news! I'm gonna start trying this out RIGHT now! As for other MP3Pro encoders, Nero Plugins has one quite cheaply - it works wuite well too.

One little note - how about trying to lower the video bitrate and raise the resolution instead? DO you reckon this could give better results?
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Fri Dec 27, 2002 4:22 pm

Okay, one problem - when I encode my MP3s using 44000Hz, they show up as 22000Hz in WinAMP. Is that normal? My source was a 48000Hz WAV file, so I converted it to 44000Hz with Windows Sound Recorder first, but that didn't change anything. Is it just because it's an unusual codec, or what?

Well anway, it sounds beautiful so I'm happy either way. I'm off to burn my 5 minute clip of Lee Evans (a true comic genius) and I'll share the results in a few minutes (hopefully).
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Fri Dec 27, 2002 4:34 pm

Well, I've hit another problem. I've got the MP3 encoded, and it plays fine but when I combine it with the video by selecting 'Audio --> WAV Audio' in VirtualDub I just get no sound. I've tried setting it to 'Direct Processing Mode' and Full Processing Mode but to no avail. Any help you can offer? Am I doing it wrong?
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Fri Dec 27, 2002 7:44 pm

Stuff liek this is why we need a better virtualdub.

BEHOLD!!!

https://sourceforge.net/project/showfil ... p_id=65889

Under audio, select CBR MP3 as the source, and pick your pre encoded MP3Pro file.

I'm going to begin prepping new, longer, higher res and bitrate vids. I'd like to hit at least 400x300, 1150kbps full frame ntsc, and I want to try it with a 48 khz audio stream instead of downsampling to 44.1k. Maybe boost the audio up to 80 kbps, although 72 kbps is mathematically enough (an extra 12.5% to cover the 12.5% of extra bandwidth from the 7 extra khz).
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Sat Dec 28, 2002 7:29 am

fatheadpi wrote:Stuff liek this is why we need a better virtualdub.

BEHOLD!!!

https://sourceforge.net/project/showfil ... p_id=65889

Under audio, select CBR MP3 as the source, and pick your pre encoded MP3Pro file.

I'm going to begin prepping new, longer, higher res and bitrate vids. I'd like to hit at least 400x300, 1150kbps full frame ntsc, and I want to try it with a 48 khz audio stream instead of downsampling to 44.1k. Maybe boost the audio up to 80 kbps, although 72 kbps is mathematically enough (an extra 12.5% to cover the 12.5% of extra bandwidth from the 7 extra khz).
Thanks for that - I had some hacked versions of VirtualDub before, but none of them allowed for external MP3 audio.

As for that dream setting, it's very ambitious to say the least :o . Once we (by which I mean you) find a setting that meets your satisfaction, I'll create a new guide on how to create the ultimate DivX disc.
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Sat Dec 28, 2002 8:19 am

Well, after eventually converting the short 5 minute clip I mentioned earlier, I burnt it and popped it in the Dreamcast. I was at first dissappointed - the video and audio lagged and skipped/jumped so much you couldn't tell what was going on. It froze a few times, but after fast-fowarding a littleplayback became as smoothe as the original DVD. Faultless, absolutely faultless. It easilt matched VCD quality, or at least it would have if I had a decent enough NTSC-compatible TV to test it on, rather than a crappy old portable that doesn't even have a scart lead.

The only setting that was different was that the audio seemed to be 22000Hz due to an unknown problem, and that my final video had 25FPS instead of 30FPS, seeing as though it was PAL.

Very good. Although at the current version of DCDivX I don't think you'll be able to squeeze much more out of it, especially not your dream seeting mentioned above. But then I wouldn't have though 1000kbps would have been possible a while back, so you never know...
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Sat Dec 28, 2002 3:31 pm

I'm still getting the kinks worked out. I'm using a dvd source (Chapter 16 from the big lebowski). I'm going to use full frame and not inverse telecline it so I end up with a full frame 30fps output from a higher quality source than a sofdec file.

Most recent test was 480x360, 1150kbps. About 17 frames got rendered, then the renderer froze up. This was just piggybacked onto a new DemoMenu compilation, a real set of tests is coming soon.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
polochon
DCEmu Respected
DCEmu Respected
Posts: 221
Joined: Sun Feb 03, 2002 3:52 pm
Location: France
Has liked: 0
Been liked: 0
Contact:

Post by polochon » Sat Dec 28, 2002 4:09 pm

I didn't understand why did you use a codec (mp3 pro) wich is not supported by dcdivx ? If you encode an audio file in 44khz, dcdivx and winamp (if the mp3 pro plugin isn't installed) will decode it at 22khz so that's pretty like a basic lame mp3 sample .
Le site sur l'?mulation dreamcast en fran?ais c'est http://www.dcreload.fr.st

oggy aka polochon ;)
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Sun Dec 29, 2002 12:48 am

I don't know about the whole plugin thing, but I'm telling you, this works, and it works very, very, very well. I ran it side by side with videos encoded at 32 and 41 encoded using the radium codec, and this thing kicked their asses off the face of the planet.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
karsten
Mental DCEmu
Mental DCEmu
Posts: 463
Joined: Sat Dec 07, 2002 3:19 pm
Location: ITALY!
Has liked: 0
Been liked: 0
Contact:

Post by karsten » Sun Dec 29, 2002 4:14 am

Just a lame question:
What is the resolution and bitrate of the softdec encoded files? They seems to be great!
Is there a way to encode in softdec and then play again in the DC?
The results would be worst the gypplay and divx or better?

Thanx, Karsten
I'll create a monument to non-existance! -Kefka, FFVI
Image
http://www.auritech.com
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Sun Dec 29, 2002 11:40 am

Okay, after trying out some more stuff I've realised that if you use the generally more compatible DCDivX 3 instead of 4 to play your movie, you will experience no jumping.

If you want to get quality equal to 1150kbps, couldn't you just decimate the framerate by 1.15? Or maybe go further down to something like 16FPS, which is two thirds of PAL and NTSCFilm, then you could really crank up the resolution and/or bitrate without losing much in the way of smoothness - DCDivX doesn't ever seem to render every single frame anyway, so removing a few would only have advantages.

And do you have a solution to my MP3 problem, or would it not make a difference like polochon said?
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Sun Dec 29, 2002 12:33 pm

DOn't kno what to tell you about your problem. I just used MMatch to convert the wav file source, then used VDub mod to direct stream it in, and it worked.

As for the whole frame decimation thing, my idea here is to see how far we can push a 30 fps full frame movie. Frame decimation would likely help out, but I'm tired of having to do things like that. I want to see what DCDivx can really do. Once we know how it can react to a 30 fps full frame, we'll know we can sure as hell pull it off with something teleclined or frame decimated.

BTW, I'm experienceing 0 frame droppage right now.

SOFDEC looks better than Gypplay, and can look better than divx, but there are two serious drawbacks:

1. Legality. Creation requires the use of certain Katana Devkit freebies.

2. It's a bit harder to pull off. I'll write a guide on sofdec encoding when I get bored with Divx.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Sun Dec 29, 2002 12:47 pm

Okay, I see where you're going with the whole full-frame thing. But could you explain to me a little about what Telecline actually does? Sorry to be the baby that has to have everything spoon-fed to him, but I've only been using DivX for a few months, and still haven't worked out all of it's little quirks and features.
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
IceBreaker
Insane DCEmu
Insane DCEmu
Posts: 270
Joined: Sat Mar 09, 2002 10:19 pm
Has liked: 0
Been liked: 0

Post by IceBreaker » Sun Dec 29, 2002 10:01 pm

All of this sounds good. Keep us posted :)
Image

Is it me, or am I the man? 8)
Warmachine
DCEmu Veteran
DCEmu Veteran
Posts: 4306
Joined: Sat Nov 30, 2002 7:01 pm
Location: San Jose
Has liked: 0
Been liked: 0
Contact:

Post by Warmachine » Mon Dec 30, 2002 1:15 am

How do you fast forward and rewind??
:headbang: Dreamcast :headbang:
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Mon Dec 30, 2002 1:44 am

There is no rewind, and the fast foward feature is engaged by pushing foward on the d-pad. it is buggy as hell, tho, and don't ever try to use it twice during the same movie. 99.99% chance of a crash, 45% just using it.

Az, I mean inverse telecline. It applies to dvd rips of cinema movies mainly. Long story short, movies are shot at 24 fps, and then have extra frames added to get them up to the 30fps DVD standard. Inverse telecling takes out those extra frames. This reduces the amount of frames to be encoded by 20%, so you get noticiabl better picture quality. This is why DVD rip settings were usually about 300 kbps higher than standard suggestions. However, DCDivx doesn't respond very well to methods like this, so I'll mess with that at a later date.

I'm willing to bet that you could get a dvd ripped at 1150kbps if you inverse teleclined it, and if it was widescreen, you could push the res into the 400's.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
User avatar
|darc|
DCEmu Webmaster
DCEmu Webmaster
Posts: 16219
Joined: Wed Mar 14, 2001 6:00 pm
Location: New Orleans, LA
Has liked: 34 times
Been liked: 15 times
Contact:

Post by |darc| » Mon Dec 30, 2002 2:03 am

so hows about a tutorial? ;)
It's thinking...
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has liked: 0
Been liked: 0
Contact:

Post by az_bont » Mon Dec 30, 2002 3:24 pm

|darc| wrote:so hows about a tutorial? ;)
You pretty much need to follow mine, just with a few changes:

1. Alter the bitrate settings to match fatheadpi's

2. Use a seperate audio encoder that supports MP3Pro

3. Use the hacked VirtualDub to add your audio back in

The problem with using MP3Pro is that it's not freeware, so a guide for that would be useless because everyone (who bought it) would be using different software. But you CAN use standard MP3 at the same bitrate - it will just sound a lot worse. No terrible, but pretty poor.
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
fatheadpi
First Class Dick
First Class Dick
Posts: 2607
Joined: Fri Dec 21, 2001 4:45 am
Location: Colorado
Has liked: 0
Been liked: 0
Contact:

Post by fatheadpi » Tue Dec 31, 2002 1:41 am

Yeah that's why I seriously dig MP3Pro, we can finally get good sound quality at our bitrates, especially since ogg isn't supported as a video format yet.
Need a Treamcast, Dreamcast modchip, HUGE DC memory card, ASCII-like DC fighter pad, or Saturn Gameshark with tons of backup memory? PM me.
Post Reply