digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Replacing DVD Rebuilder's encode phase with manual encoding? (http://www.digitalfaq.com/archives/encode/11068-replacing-dvd-rebuilders.html)

SansGrip 07-27-2004 12:49 PM

Well, I've made some progress. I have Perl code that produces a correct AVS for file size prediction, and have started the C++ version. Right now it reads in the REBUILDER.INF and REBUILDER.ECL files, and am about to make it generate an AVS and ECL for file size prediction. Then it'll fire up CCE to do the encode, and then I'll write the Newton method search to find the best Q factor. Eventually it'll then rewrite the REBUILDER.INF and REBUILDER.ECL files with the correct settings so that DVD-RB's encode phase can be run.

Hopefully I'll get a decent amount of code written today. It's just a command line tool at the moment. The GUI will probably be the last thing I do.

SansGrip 07-27-2004 02:25 PM

I asked a couple of questions regarding REBUILDER.INF in the DVD-RB Doom9 forum, and got a response from robot1, the author of RB-Opt. It's ended up with him emailing me the source for RB-Opt, because it would probably be a lot simpler to add OPV prediction to that rather than recode the entire thing myself...

I'll keep you updated :).

SansGrip 07-27-2004 06:45 PM

Okay, I have the RB-Opt source code and I'm busily adding OPV prediction to it...

Obviously it'll be a little slow-going because I'm trying to figure out the existing code as well as write my own, but I'm hoping to have something together within the next couple of days.

Dialhot 07-27-2004 07:08 PM

I think we can wait :-P.
That's true that RB-OPT with OPV... the idea is freaking.

SansGrip 07-27-2004 08:20 PM

Yes, it should be pretty nifty :mrgreen:.

Zyphon 07-28-2004 04:05 PM

Quote:

Originally Posted by SansGrip
Okay, I have the RB-Opt source code and I'm busily adding OPV prediction to it...

Obviously it'll be a little slow-going because I'm trying to figure out the existing code as well as write my own, but I'm hoping to have something together within the next couple of days.

This is great news SansGrip and very nice of Robot1 to give the source of his code for you to play around with.

Good luck with your tests and coding buddy I and many cannot wait to see the fruits of your labour. :D

SansGrip 07-28-2004 07:00 PM

Here's a little something to whet your appetite...

http://www.digitalfaq.com/archives/error.gif

Dialhot 07-28-2004 07:14 PM

Amazing !

Can you please add a "Starting Q value to use" somewhere? I generally encode at 20/25 and find anything above 30 to bad. So I don't see the reason to start the test with 32...

IMHO...

SansGrip 07-28-2004 07:19 PM

Quote:

Originally Posted by Dialhot
Can you please add a "Starting Q value to use" somewhere? I generally encode at 20/25 and find anything above 30 to bad. So I don't see the reason to start the test with 32...

It guesses the start value based on frame count and target size -- this sample was with 3h10m of 720x480 video (no black bars at all) plus full-size two-channel AC3 and subs in two languages...

The formula for guessing a good start value is pretty darn accurate, in my experience. But when using the Newton method it really doesn't matter what you pick to start, it could be 1, it could be 99. It'll (almost) always find the right Q within 2 or 3 passes no matter what the start value.

Dialhot 07-28-2004 07:20 PM

Okay !
(Mathilda - The professional)

SansGrip 07-28-2004 07:22 PM

Though, that said, I could certainly add a "Start Q" box if the guessing algorithm turns out to be inaccurate :).

I'd rather spend tonight tracking down stray bugs, because it's more or less "finished" and the sooner I can get the source back to robot1 the sooner he can release it and we can start testing :mrgreen:.

Zyphon 07-29-2004 02:02 PM

Your right SansGrip this does certainly wet my appetite, im looking forward to seeing the further developments.

SansGrip 07-29-2004 03:07 PM

The "new" source (i.e. including the OPV prediction stuff) has been sent back to robot1. There is a small complication in that he uses VC++6 and I use version 7, but I think I made the changes in such a way that he'll be able to compile it too without upgrading his compiler.

Hopefully all will be well and he'll make a release in the next couple of days...

:mrgreen:

vmesquita 07-30-2004 07:27 AM

Dialhot,

I just tested the subtitle stuff. It turns out that spumux can't mux .sub anymore but... There's submux-dvd (http://ip51cf87c4.direct-adsl.nl/panteltje/dvd/) which can. submux-dvd also comes with a nice subtitle extractor (vob2sub), which grabs subtitles directly in winsubmux format.
I am currently using with a DVD I wanted to add an extra subtitle track, so I'll mux the original subtitle track with submux-dvd, then I'll mux the new subtitle track (srt) with spumux, author with dvdauthor and import in dvd-lab. I'll let you know the results.

EDIT: The old subttile did not show up in the authored DVD (by dvdauthor). It's enabled but did not show up for some reason. I tried to import the pallete and it didn't help (just messed the colors of the new subs)

Dialhot 07-30-2004 08:29 AM

Quote:

Originally Posted by vmesquita
EDIT: The old subttile did not show up in the authored DVD (by dvdauthor). It's enabled but did not show up for some reason. I tried to import the pallete and it didn't help (just messed the colors of the new subs)

A way to definitely finish with subtile colormap headache : subremap !
Try it, you won't regret it :-)

Just do a "load ifo" then "default" then "save ifo". That's it :-P

SansGrip 07-30-2004 11:20 AM

First beta release
 
So I talked to robot1 and he agreed to let you guys give this thing a workout. Remember, this is the very first version of OPV prediction and it might not work all that well (results have varied from 4% off to bang on target). Still, I'd appreciate your testing. No-one is as dedicated as you guys when it comes to testing software :).

It's here.

(There was a bug regarding temporary directory creation. I don't know if this executable has the fix in it or not, and can't just recompile the latest source because last night Windows decided to corrupt my registry beyond repair, so I'm currently reinstalling everything. If you get a message about not being able to enumerate a particular directory, that's because it doesn't exist yet. Just create the directory it's complaining about and all should be well.)

Basically you run the DVD-RB Prepare phase, then (without exiting DVD-RB) load RB-Opt. Hit the button to load in the correct REBUILDER.INF, then change whatever settings you like (AVS, CCE, etc.). I always set DC precision to 8, GOP length to 15, and choose the Notch matrix.

Then hit the OPV Prediction button. You'll see a dialog similar to the one I posted a screenshot of earlier. Here's a rundown of the parameters:

Min/max bitrate: You don't need me to explain this one ;)
GOPs per range: The number of GOPs in each "piece" of the sample
Sample size: The percentage of the movie to run for a sample
Safety margin: The calculated target size will be reduced by this percentage before running prediction
Error margin: How close the prediction has to get to perfect before it stops trying. I usually set this to zero and it stops when the "new Q" is the same as the old one. This parameter will probably be removed for the next version.

Then hit "Go" and it'll ask you for the path to your CCE (or EclCCE) executable. It remembers this path so you won't have to tell it again. Then it does its calculations, fires up CCE a few times, and ends up rewriting the DVD-RB files with the correct info.

Close RB-Opt and run the Encode phase in DVD-RB. Wait. Run Rebuild phase in DVD-RB. Check resulting size. Gasp with astonishment.

(Last step optional.)

;)

I obtained a perfectly sized result by using:

Min: 0 Max: 9000 GOPs: 1 Sample: 1 Safety: 2 Error: 0

But, as usual, YMMV. I'd really appreciate as much input as possible. Try it even if you've never used DVD-RB. You might just like it :mrgreen:.

In a while I shall post details of the prediction algorithm (it's not really very complicated) and we'll have a go at refining it, maybe. You guys know a lot more than me about file size prediction now...

incredible 07-30-2004 12:19 PM

Quote:

Try it even if you've never used DVD-RB. You might just like it
Participating testings is one of my favorite deeds :lol:
But Im horrible working in my Job now and so :arrow: Uääääää :x

Im shure Ill like that DVD-rb

bazzy2004 07-30-2004 12:51 PM

gr8... but 1 questions, just asking... this u can fit 1 movie, on 1 dvd, ace quality.. but is there a way for more then 1??

love to have more then 1 movie on a dvd, n with all the extras and stuff on it

thanx in advance :D

Bazzy

SansGrip 07-30-2004 01:48 PM

It should be possible to do that in an authoring program. Just use RB-Opt's "global options" to change the target size to 2000mb (or whatever) instead of 4000mb (or whatever). Then encode and rebuild as normal. Do this for both movies.

You'll then need to find an authoring program that can import actual VOBs instead of just separate video/audio/sub streams (I believe there are some that can do it). In the authoring program you can make a VMG menu to choose between the two.

That's all theory. I've not tried it :).

SansGrip 07-30-2004 01:50 PM

By the way, please don't distribute this release or the link to it. This is a prerelease version and definitely will change (we're going to implement OPV on a VOB ID basis rather than doing entire title sets, for example).


All times are GMT -5. The time now is 08:50 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.