View Full Version : GPL command line M2V transcoder


RB
6th October 2003, 23:23
Hi,

recently, Metakine (http://www.metakine.com/) released a DVD transcoder similar to DVD2One etc. for Mac OS X. Their transcoder engine is based on the GPL'd mpeg2enc and libmpeg2 libraries and consequently, they provide the source code (http://www.metakine.com/files/M2VRequantizer.tgz) to their engine under GPL. You can read more about this (in German) at heise.de (http://www.heise.de/newsticker/data/vza-25.09.03-000/).

I've taken the liberty to port this to Win32 so it can be compiled with MSVC++ and does not require the ugly Cygwin environment. Will run on Win9x/ME/NT/2K/XP/2003. I really don't deserve much praise for this as the port was fairly easy :)

Download the port (source included] from http://home.t-online.de/home/340044300675/requant.zip

It's a command line program and takes as input an quantization factor and an input and output M2V file (MPEG2 elementary stream). For example:
requant 2.0 input.m2v output.m2v
This would transcode input.m2v to output.m2v, reducing average bitrate by a factor of 2.0 (note the factor is a floating point value). Quality is pretty good to my eyes, even at factor 2.0, speed is similar to DVD2One.

This post is only meant to put the ball in the game, please don't request any additional features/improvements from me :). Anybody with enough spare time and programming skills please just take the source, obey to the GPL and take it to the next level(s). I'll post a note on this in the Development forum. Have fun!

mrbass
7th October 2003, 00:00
thanks for the port to win32 RB.
So is int 21h Jan 2003 proposal now a reality?
http://forum.doom9.org/showthread.php?&threadid=44321

int 21h
7th October 2003, 00:08
I browsed that article a few days ago, but since I didn't know german, and the translation was bad.. I couldn't make heads or tails of it... I'll take a look at this now :)

atreides93
7th October 2003, 00:51
I am in awe.

This 100k program transcodes mepg2 files??

CropsyX
7th October 2003, 05:51
I've only done a quick test but this looks extremely good so far. It's great to have a program that can work on plain mpeg2 video files. I do quite a bit of work with Digital TV captures and sometimes they're just a bit too big to fit on a DVD, this will be perfect for solving that problem.

Thanks!

RB
7th October 2003, 07:33
Originally posted by atreides93
I am in awe.

This 100k program transcodes mepg2 files??

Sure :). With a few compiler optimizations, you can get it down to 17k.

int 21h
7th October 2003, 17:29
I think I am going to work on making this oO C++, and perhaps making a shiny GUI for it...

First I have to finish a simple DCT compression project for work though.. I'll post progress as I make it.

DVDRFreak
7th October 2003, 22:41
Tested this little proggie on my favorite test subject NARC.

Wanted to decrease with the same value as recode and shrink so calculated 71% - factor 1.41.

Speed: 10 and 23 seconds to transcode (3.5x as fast as shrink or recode).

Compliancy of MPEG2 stream is no problem. Could author it without any problem at all.

Used PowerDVD to watch the resulting DVD. I mus say the quality is for this movie very good (read much better the recode or shrink).

The first scene is amazing. Recode and Shrink would cause a lot of macro blocking (even visible when just watching the scene)) because of the high motion. This little tool causes almost no macro blocking at all (even when freezing the picture I could not detects any aditional macro blocks).

Will do some further testing on other movies but until now I am impressed with the speed and the quality.

Thanks a lot RB for porting this little proggie.

Rombaldi
7th October 2003, 23:58
Thank GOODNESS! I've been hoping someone would do this!

Must give it a whirl...

Guest
8th October 2003, 01:13
What do you people use to demux M2V from VOBs?

int 21h
8th October 2003, 01:16
DVDDecrypter if its on DVD...

RB
8th October 2003, 07:01
If the VOBs are already on your hard disk, use Vobedit or vStrip.

zyzzle77
8th October 2003, 10:19
@RB:

What compiler optimizations did you make to get it down to a paltry 17 kbyte? Can you make this version available to download? Would be much appreciated.

-z

RB
8th October 2003, 11:21
I only have MSVC++ Standard Edition which does not allow for any optimizations, but I also have the Windows DDK which comes with an own compiler that has several optimizations on by default. So I simply compiled it in the DDK build environment (yes, it can build user mode apps) and it came out at 17.5 kb. I'm attaching the executable to this message. This may probably not run on Win9x/ME.

DVDRFreak
8th October 2003, 17:47
Recompiled the source using VC6 enterprice edition at work. Used optimalization setting for speed and code generation set to pentium pro.

Testing new exe on AthlonXP 1900+ 1GB memory

Did some more testing:

Movie: Gangs of new york
Compression: 1.492538 (67%)
Transcode time RB exe: 15:17 min
Transcode time optimized VC6 for speed: 11:00 min
Quality: Very Good

Shrink and recode caused a jumping pixel effect in the last scene where the two guys are fighting. This little proggie did not.

zyzzle77
9th October 2003, 02:11
What an excellent piece of work. In some cases, this even beats out Shrink in quality (eg, on R1 FIGHT CLUB and WEIRD SCIENCE. Elegant in utility yet very small code footprint...

RB: I couldn't download your 17.5 kb binary compile. Am I missing something, or did you upload it to another server or forget to include it as an attachment?

DVDRFreak:

Very interesting and promising results. Compiling with VC Enterprise edition & optimized for speed & P6 results in a 25% boost in speed! As I don't have Enterprise edition, could you also somehow make your optimized binary available for download?

Thank you both for such positive insight and promising results.

Rombaldi
9th October 2003, 21:09
This is quite an AMAZING piece of work, I've been trying it out and not only is the quality quite execellent, but the speed is great. I had been archiving TV episodes that were 'just a little too big' to fit three on a disc, so I ended up authoring them and then Shrink/IC'ing them ... I swear that it seems to cut the process in half by shrinking them BEFORE authoring..

Should someone GUI'ify this.. I can think of two features that would be a blessing..

1) be able to specify the 'shrinkage' either in a percentage (that way you don't have to find a calculator all the time) and/or as a 'target file size' (let's say the file is 1546mb, you want a target file of 1400mb, let it calculate the proper shrink percentage).

2) what else... BATCH MODE! I've got a pile of files stacked up that I'll need to run thru this.. would be lovely to set an input/output/percentage (ie. an 'add to batch' button above) for a pile of files and then let it process them all...

no matter if anyone does or not... GREAT STUFF!!!!

DVDRFreak
9th October 2003, 23:20
Originally posted by Rombaldi
1) be able to specify the 'shrinkage' either in a percentage (that way you don't have to find a calculator all the time) and/or as a 'target file size' (let's say the file is 1546mb, you want a target file of 1400mb, let it calculate the proper shrink percentage).


I modified my version so it will except a percentage as parameter. Works great and the speed/quality is also awsome. I have a new favorite tool to do movie only backups.

Just 64KB big and it compressed the matrix_reloaded i just did buy in 8:42 min.

Quality is asome. I do not see the difference between the original and the compressed version when playing. If I freeze frame I can find one or two macro blocks in the title scene.

imho better then recode or shrink for speed and aslo for quality.

Rombaldi
9th October 2003, 23:30
DVDRFreak...

how about letting us peons without programming skill at your modified version????

DVDRFreak
9th October 2003, 23:37
Originally posted by Rombaldi
DVDRFreak...

how about letting us peons without programming skill at your modified version????

I do not have a FTP server to upload it to.

zyzzle77
9th October 2003, 23:47
DVDRFreak,

Since you don't have an FTP server, could you possibly E-mail me your optimized version. Here is my email address:

zyzzle77 *at* yahoo dot com.

Looks like this tool is now the best solution to movie-only backup. Quality continues surpass even Shrink's output.

-z

Rombaldi
9th October 2003, 23:55
DVDRFreak

check your PM's

DVDRFreak
10th October 2003, 00:37
I just received an offer from MrBass to host my version. I just send him a mail including the optimized exe and modified source files.

I hope he will post a link here soon.

mrbass
10th October 2003, 01:03
http://www.mrbass.org/M2VRequant.rar

mrbass
10th October 2003, 01:06
http://www.metakine.com/products/dvdremaster/
M2VRequantizer:
A module which simply requantizes the video leaving the motion vectors unchanged. This module is very fast and provides relatively good quality.

M2VDownsizer:
A modules which recompresses the video stream completely (including motion vectors). This will usually yield slightly better quality, at the cost of time.

what about the M2VDownsizer: better quality?

here's that article (http://translate.google.com/translate?u=http%3A%2F%2Fwww.heise.de%2Fnewsticker%2Fdata%2Fvza-25.09.03-000%2F&langpair=de%7Cen&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools) translated from German to English by Google.

int 21h
10th October 2003, 03:46
To port that second one to Win32, it looks like you have to port libmpeg and mpeg2enc... however, I seem to remember that Nic ported these both awhile back? Perhaps he can supply us with the needed code fragments, because porting pthreads would not be fun, (to me anyways).

Nic
10th October 2003, 10:20
Excellent news (Thanks for pointing this out to me Int21h). I'm crazy busy right now with work, but this deserves my attention :) Ill try and port M2VDownsizer now.

-Nic

ps
Edit: Well, already got it compiling, now just got to get all the 24 unresolved errors removed. I haven't put in the MMX code or anything yet, expect the first release to be slow as hell.
Edit2: Although it might not help a jot, i did build a ICL 7.1 compiled Requant http://nic.dnsalias.com/Requant.zip
Edit3: Got it compiled as an exe, now gotta work out how to use it ;)
Edit4: Uggh, it's one of these apps that uses stdin and stdout for the input/output...that's just wrong, im on windows afterall ;) soon change that.
Edit5: Well it's running, using 99% cpu so I suppose it's going ok. If I can't get it working then Ill at least release the source code, got to get back to work now. It's all done in VC6 using ICL 7.1.
Edit6: Well now its running correcly ;) Very very slowly making output...really need to get the mmx code in, may not put it out till then.
Edit7: Wow! It works...did my first little test. Slow as hell though.
Edit8: By the way, ill make a little GUI for Requant and make it so it can accept PS/TS/ES Streams as well (although it will only output ES)

Rombaldi
10th October 2003, 16:15
Edit8: By the way, ill make a little GUI for Requant and make it so it can accept PS/TS/ES Streams as well (although it will only output ES)

you were reading my mind.. I was about to make the suggestion that a good enhancement would be to let it accept something more than a M2V and DEMUX the output streams while it went (ie. input a MPG program stream, output being the 'requanted' M2V and the AC3/MPA stream... ready to feed into the authoring program..)

rasta21
10th October 2003, 16:25
...what we need is a standalone trancoder like rempeg for example...without all those "iwanttocopytonsofdvds" features like reading vobs, get sectors, create images.

...then you can use that trancoder standalone or in tools like numenu4u for example.

int 21h
10th October 2003, 17:50
I'd rather have the VOB reading/writing feature so that it could easily handle multi-pgc titles. After this weekend I anticipate having alot more free time to look into this project further.

Rombaldi
10th October 2003, 17:54
I see good use for both variants (M2V/MPG and VOB).

One over looked area (but the IC/DVDShrink/et.al. approaches) are the
home recorder (growing by leaps and bounds). I've had more than one instance where I might have (for ex) three episodes that won't quite fit on a disc.. yet one is just a bit bigger than the other two.. till now, I had to author the disc image, process the WHOLE image and the burn... now I can shrink down one ep a touch (or all three) and THEN author/burn... much quicker not having to process the whole disc.

jdobbs
11th October 2003, 13:17
By the way -- this is pretty exciting. The output looks very good. With VOB reading capability this could really be nice -- we would finally have a ReMPEG2 replacement that gives good quality and is fast. If it read a .VOB you could simply take the output and reintegrate into the orignal stream using IFOEDIT's remux function.

Note: The compression factor isn't very accurate -- depending upon the input I've had things that were told to be compressed at 3.0 come out to be less than 2.0.

Nic
11th October 2003, 14:22
Im just about complete on my little GUI app (ive called it ReJig for now) that lets you load in all types of MPEG-2 file(s), see all the streams (demux if wanted) and then re-encode to m2v. After I've finished that i'll look on making the compression a bit more accurate :)

Looking through the code, it's real simple, should have pulled my finger out ages ago and done it myself :rolleyes:

I'll post back later :)

-Nic

mikegun
11th October 2003, 14:45
Originally posted by jdobbs
By the way -- this is pretty exciting. The output looks very good. With VOB reading capability this could really be nice -- we would finally have a ReMPEG2 replacement that gives good quality and is fast. If it read a .VOB you could simply take the output and reintegrate into the orignal stream using IFOEDIT's remux function.


afai remember, it's not that easy to remux, at least it is not possible to remux using cce encodet streams.

mikegun

jdobbs
11th October 2003, 15:21
That's because CCE doesn't necessarily create an identical GOP stream (IPB, etc) -- this one does!

jdobbs
11th October 2003, 15:26
Looking through the code, it's real simple, should have pulled my finger out ages ago and done it myself

I was thinking the same thing. The quality isn't CCE -- but it's not bad either, and this is really, really fast.

Nic
11th October 2003, 17:57
So,

http://nic.dnsalias.com/ReJig.zip
(Sourcecode: http://nic.dnsalias.com/ReJig_src.zip )

It needs a little work (bit rough and ready at present), but I think any suggestions will help motivate me.

Takes Vob/M2V/TS input, shows the streams along with audio delay etc, allows you to demux the audio streams, and it uses ReQuant built-in to compress the video.

It's only a beginning, but it should be a good start (I hope :) )

-Nic

DVDRFreak
11th October 2003, 21:07
Looking great NIC. It still has the speed of the original command line util but now it has a nice GUI.

I was testing a little bit and found some strange things:
1) When I add VOB files to the left listview and press the arrow keys the files disapear.
2) When I add files to the left list view and delete them again the right listview is not updated anymore. Even when I press the refresh button.

Some suggestions:
1) A possibility to define the compression ratio per stream would be nice.
2) The percentage I enter now is a integer it would be nice if it would be a float again so I can enter something like 77.8.
3) A way to select the video stream I want to transcode from a VOB would be nice. Sometimes a VOB has more then one stream if it contains logo's and extra's in different programs.
4) Now it looks like the program transcodes the stream per VOB it would be nice if it could transcode a complete movie (maybe I did something wrong will test a little bit more what happens if I add all VOB files).
edit1:
It is worse, the program seems to combine all the streams of all the VOBS that where add in the left listview and combines the streams in random order. Ended up with a movie starting at the end scene then jumping to the beginning, etc...

edit2:
Question.
When the program detects a AC3 stream with a delay does it correct the delay so I have a stream I just can add to my authoring program without any problems?


For a first version ReJig looks prommising.

jdobbs
11th October 2003, 21:31
Wow, Nic. You must be the fastest programmer on the block! Thanks!

Nic
11th October 2003, 23:42
@DVDRFreak:

Thanks for the bugs ill fix those now.
1) Per Stream? Not quite sure what you want there.
2) Ok :)
3) Hmmm, Ok, Ill add that :)
4) Could you explain exactly what it should do? I've never authored a dvd in my life, so Im not sure what the desired effect should be. And it shouldn't have been random order, but instead the order in which the vobs were added. (ill check that)

No it doesn't correct the AC3 file, merely informs you what it should be. I suppose I could add it as a feature, not exactly sure how.

Well I'll fix that, and also I've added a reasonable amount of the MMX code to that M2VDownsizer. It works ok, but it is very very slow (MPEG2Enc from mjpegtools is a slow encoder even though heavily optimised). Ill release a commandline version of that with source tomorrow in case any one wants to take a look.

Any other feature requests welcome,

Cheers,
-Nic

DVDRFreak
12th October 2003, 00:48
Youre welcome always fun to test a new tool :)

1) What I mean is when a DVD has multiple video stream it would be nice to be able to select which video streams to transcode and define the compression per stream. Also you will need to define the output file per stream or make it so that it adds a stream numnber to the global output filename.

4) related to the first option in fact. Now it just takes the VOB'S added and combines all streams in them to one big M2V file. This is not ok when authoring a DVD you would need one big M2V containing the movie and one AC3 file for audio. For the extra's you would need the same thing again.

An example:
DVD x contains:
VIDEO_TS.VOB Menu VOB
VTS_01_0.VOB Menu VOB
VTS_01_1.VOB Main movie
VTS_01_2.VOB Main movie
VTS_01_3.VOB Main movie
VTS_02_0.VOB Menu VOB
VTS_02_1.VOB Extra's with programs so multiple streams (example 3)
VTS_02_2.VOB Extra's with programs so multiple streams (example 3)

If I would want to transcode VTS_02 I would want to see someting like a selection saying

PGC 1 77.8%
PGC 2 50.0%
PGC 3 67.0%

Resulting in 3 sperate M2V files. To do this you would proberly want/need to parse the IFO files to get the correct stream info. I know that there are other open source programs available that do this already so maybe you can get some inspiration there. Also vstrip can split per stream I think.

AC3 correction is pretty common stuff so running google with AC3fix source should do the trick ;)

ChrisBensch
12th October 2003, 05:53
All I can say is WOW, it took about 15 minutes to 'downsize' Braveheart to 70%. DIF4U -> Rejig and it looks pretty nice. If this tool could reach multipass CCE quality, the revolution that followed would be great!

Thank you to all who is helping with this and all the other tools

DVDRFreak
12th October 2003, 10:20
Hi NIC,

Another idea. Make it process a bunch of M2V files in batch. The same way DoCCE4U is doing it. If you make it possible to just read the CCEdata.txt file for the files to compress we would have a great conbination with DoItFast4U (which does all the ripping stripping demuxing already flawless.

So left listview shows a list of M2V files to process (with a menu option to import this list form the file CCEdata.txt). I can click the file and set some settings like compression ration maybe filename.

This option would make it a great (much faster) alternative replacement for DoCCE4U.

Nic
12th October 2003, 10:52
Time for me to download DoItFast4U methinks ;)

-Nic

ps
Please email me a standard CCEData.txt you would use as well :)
nic@nic.dnsalias.com

pps
Looks like ac3 delay correction isn't that common, most seem to do it with AC3 Delay Corrector. Looks like I'll port that from VB to C++, Ugh ;) (ac3fix just fixes ac3 files, doesn't add delay)

DVDRFreak
12th October 2003, 12:39
Originally posted by Nic
ps
Please email me a standard CCEData.txt you would use as well :)
nic@nic.dnsalias.com

pps
Looks like ac3 delay correction isn't that common, most seem to do it with AC3 Delay Corrector. Looks like I'll port that from VB to C++, Ugh ;) (ac3fix just fixes ac3 files, doesn't add delay) [/B]

CCEdata.txt is in the mail. With a nice little description of the structure.

Woops :o my mistake just search google and concluded to fast the source was usable.

Nic
12th October 2003, 16:07
Well I'll release this for now, and now begin looking at the CCEdata.txt for the next version.

This version does a series of Jobs, if you want to add multiple files into a single job you can select multiple files in the Open File dialog. Hopefully it will all be self expantory and I've tried to incorporate some of DVDRFreak's ideas (as I've perceived them at least :) )

http://nic.dnsalias.com/ReJig.zip
(Sourcecode: http://nic.dnsalias.com/ReJig_src.zip )

-Nic

ps
Oh, and I haven't ported the AC3 Corrector yet, so no correction yet. Haven't received that email yet, if it's easy for you to send please also post to my other address nic@everwicked.com

Exo
12th October 2003, 18:14
Hi Nic,

there seems to be a little bug in ReJig.
50 frames or more are missing at the end
of the output file.

btw, when using ReQuant on the same file this
doesn't happen.

Nic
12th October 2003, 19:03
was it an M2V or Program Stream (.vob/.mpg/etc ? )

@DVDRFreak: Ahhh, CCE uses AVS files, I forgot. Could you send me the avs files it creates...they may be simple ones that just use MPEG2Source in which case I could just grab the MPEG FileNames from there.

-Nic

DVDRFreak
12th October 2003, 19:17
Originally posted by Nic
was it an M2V or Program Stream (.vob/.mpg/etc ? )

@DVDRFreak: Ahhh, CCE uses AVS files, I forgot. Could you send me the avs files it creates...they may be simple ones that just use MPEG2Source in which case I could just grab the MPEG FileNames from there.

-Nic

You can use the filename the same as the .AVS file the M2V has the same name only the extension is different.

so "C:\MYMOVIE\1.AVS" in de CCEData.txt would translate to "C:\MYMOVIE\1.M2V" for the ReJig tool to transcode.

Nic
12th October 2003, 19:20
@Exo: Excellent work, I really didn't spot that bug. Now fixed.
ReJig v0.2c
http://nic.dnsalias.com/ReJig.zip

@DVDRFreak: Genius. Ill do that ASAP.

-Nic

vhelp
12th October 2003, 19:37
Hi guys..

sorry I'm late inside the picture here.. thanks to bb posting
this under the DV section :) ..speaking of.. ..

I just done a re-stream I mean, a nic-stream :) of a DV encode that
I had just finished (took some home footage this morning w/ my TRV22)
and after I encoded it regularly my usual way, and in 16:9 AR and also
throw in KVCD.NET tweaks and things (k-matrix), my:

* 4m:19s, 85mb .mpg file and turned it into a
* wapping 54.5mb size .m2v file :D

Note 1.. I encoded the orginal source .mpg w/out audio, however. There may
be approx +/- 10mb of "emtpy" bagage of space in this original file.
Note 2.. when I use TMPG's MPEG-TOOLS to de-mux, my .m2v final size was 75.5mb
vs. nic-stream's 54.5mb ... hope this made some sense.

I used the default 70% as my base param, inside the GUI (nice work)
though, please add in a drag-n drop feature in your next update :)

I'm liking (i mean) loving this util even more.

side note...
This is the answer to prayers for those that use CQ in their encodeing
processes. ie, that 15mb-30mb overfilled cd can now be tweaked (I think)
by a few mb's.

Well, to all.. please keep up the good work here.
-vhelp

DVDRFreak
12th October 2003, 19:43
It takes a genius to notice one :D

Anyway here come my test result from ReJig 0.2b

Bug that where fixed and features that where added that I did test and seem to be Ok.

Percentage can be added with decimals.
Arrow keys do cause list views to remove files.
Refresh button seems to work properly now.

New bugs detected:

1) When I add jobs to the left listview and the ry to delete them I get a program crash.
2) When using VOB files I cannot set the output path. This is a big problem if your files are a mounted iso image.
3) When I add multiple VOB's of the same title only one shows up in the list view this is Ok but it also transcodes only this VOB. It should in fact transcode the combination of all VOBS for that set to one M2V file.

Request:
1) Could you somehow add some shroll bars to the leftveiw. I have now the problem that I only see the first part of the complete path.
edit1:
2) Indication that a job has been processed in the LeftView would be nice to have. A white/red/green dot would be nice. Red something went wrong. Green processed ok. white new ready for processing.

Will do some more testing on the new 0.2c version.

Edit2:
p.s. forwarded the mail to the new address hope it will arive now.

vhelp
12th October 2003, 19:56
.
.

Some thoughts on this util.

I haven't done any extensive testing, but after additional viewing of
the ReJig's .m2v file, I found that the dark scenes were not effected.
I don't know if this is a Nic thing, or the design of the orig
developer, but I felt like sharing that. I did not see any blocks or
DCT's or what-have you in these dark scenes.

Perhaps when using this util for DV source projects, when the source
is home footage shoot w/ a DV cam, this util does a great job.

I have not tested "dark scenes" under other source projects ie, cable
or satellite capture (Analog and DV devices) So, perhaps there may be
a difference in how dark scenes are handled.. yet to be descovered.
.
.
Something to think about maybe :rolleyes:

-vhelp

unixfs
12th October 2003, 20:08
Hi,
Nic ReJig is excellent!

I wonder if it's possible and if it makes sense to turn it into a fast 2-pass requantizer?
Would it improve quality?

Thanks.

DVDRFreak
12th October 2003, 20:08
Originally posted by vhelp
.
.

Some thoughts on this util.

I haven't done any extensive testing, but after additional viewing of
the ReJig's .m2v file, I found that the dark scenes were not effected.
I don't know if this is a Nic thing, or the design of the orig
developer, but I felt like sharing that. I did not see any blocks or
DCT's or what-have you in these dark scenes.

Perhaps when using this util for DV source projects, when the source
is home footage shoot w/ a DV cam, this util does a great job.

I have not tested "dark scenes" under other source projects ie, cable
or satellite capture (Analog and DV devices) So, perhaps there may be
a difference in how dark scenes are handled.. yet to be descovered.
.
.
Something to think about maybe :rolleyes:

-vhelp

Nic did not change the transcoding engine yet. Only the way it reads the input file has been changed so it can also process directly VOB files.

This tool gives imho the best result of all transcoders I did test sofar (speed/quality). Almost no visible blocking or other attributes esspecially hard to encode scenes like the beginning of NARC or very DARK scenes like in the MATRIX is done without any problem or anoying quality loss.

But this is my personal opinion. You should decide for yourself of course.

Nic
12th October 2003, 20:25
@unixfs: I was thinking the same thing :) It should be quite easy, will need time to do it though (after this weekend, im gonna be busy with work & social life.. :( But ill do what I can)

@vhelp: Im not sure I quite understand. Dark scenes not being effected is a good thing?

@DVDRFreak: Here's the new version:
http://nic.dnsalias.com/ReJig.zip (0.2d)

I've only just read your email about 0.2b so I haven't fixed everything yet. CCEData.txt support should be in there. Please test and let me know (it's untested as yet)

in response to your bugs:

1) Ill check that...don't know why that is
2) Why can't you set the output path? What stops you? can you not just type in another name or use the "..." browse button?
3) How are you adding the multiple vobs in...one at a time or do you select them all in the file dialog box so it becomes one job. When you say the same title, do you mean DVD Title or filename?

Requests:
1) Already in 0.2d ;)
2) Hmmm, yup, got to remind myself of how to do that easily in MFC now :)

-Nic

m1482
12th October 2003, 20:29
Nic: After using your program, what multiplexer do you recomend to multiplex new m2v file with AC3 streams ?

DVDRFreak
12th October 2003, 20:32
Originally posted by Nic

1) Ill check that...don't know why that is
2) Why can't you set the output path? What stops you? can you not just type in another name or use the "..." browse button?
3) How are you adding the multiple vobs in...one at a time or do you select them all in the file dialog box so it becomes one job. When you say the same title, do you mean DVD Title or filename?

Requests:
1) Already in 0.2d ;)
2) Hmmm, yup, got to remind myself of how to do that easily in MFC now :)

-Nic

2) When I type a new path or select a path using the brows button it just defaults back to the old patc ( in my case the Daemon tools image drive).

3) I select them all at once in the open file windows. I mean of course DVD title if it would be file it would combine all streams in the VOB if I understand correctly.

Requests:
1) thanks !

Ok will test the CCEData.txt feature now.

vhelp
12th October 2003, 20:33
nic wrote..

@vhelp: Im not sure I quite understand. Dark scenes not being effected is a good thing?

Abolutely.., it's a great thing :)
I was on about how the util does a great job under these "dark" conditions.. as tested using home footage shot by my TRV22 cam, but
that I haven't tested it under regular source like cable or satellite
(the dark scenes) to see how they hold up to a re-streaming process.
My experience w/ DV footage was a positive one.

-vhelp

int 21h
12th October 2003, 21:08
Originally posted by m1482
Nic: After using your program, what multiplexer do you recomend to multiplex new m2v file with AC3 streams ?

IfoEdit 0.6 worked when I tested its output. If you use it, you get the bonus that you can handle Multi-PGC titles...

DVDRFreak
12th October 2003, 21:15
Hi Nic.

Tested the new version to work with the CCEdat.txt that is output by DoItFast4U.

I just can say one thing FANTASTIC ! works like a charm.:)

Some Bug's:
Concerning the bug I reported that I could not change the output path. For M2V files it works Ok but when the refresh button is pressed all data is reset to the defaults this is not Ok I think.

When adding VOB files it realy get's strange. I add a VOB set from my ISO image that I did mout in a virtual drive. I set the path and compression ratio. So far so good. Then I add a second VOB set. Then it happens. Path values are being reset to the defaults including the just entered data for the first VOB set. Also the percentage specified sometimes is not correct anymore.

When I add VOB files using the open dialog for one title set (e.g. VTS_02_* then this version will dispaly in the JOB window H:\VTS02_04.VOB+H:\VTS02_03.VOB+H:\VTS02_02.VOB+H:\VTS02_01.VOB
+H:\VTS02_05.VOB. So you see the order is not Ok. It should have been
H:\VTS02_01.VOB+H:\VTS02_02.VOB+H:\VTS02_03.VOB+H:\VTS02_04.VOB
+H:\VTS02_05.VOB. Did not try to transcode but I think this is a sequence problem.
edit3:
When trying to transcode this the program crashes.

edit2:
The percentage in this version can be bigger then 100. This is not Ok it should be < 100 i think.

Question
What is the program supposed to do when I add a VTS01* set with mutiple mpegstreams in it ? Did not test this yet but it will be my next test.

edit1:
tested this with a multiple PGC VOB. It seems to transcode just the first PGC. It should (at least I think so) transcode all video streams or even better let me select which streams to transcode and which streams not.

int 21h
12th October 2003, 23:12
I've only tested the multiple PGC idea on the original Requant program btw, not Nic's changed version.

Nic
12th October 2003, 23:48
Ahh, that makes more sense now. Must be not saving the data typed in all the right places, hence you loose your destination name, ill fix that.

With the multiple Vobs...instead of the FileDialog, ill add a dialog box like DVD2AVI has for adding in files. That way you'll be able to order them as you wish, before making them a "job".

The percentage 100 thing should be impossible...weird. MFC should be forcing that, ill force it myself.

The crash I don't understand...Hmmm. And i've already fixed the Del button problem (stupid mistake on my part, will be fixed in next version)

With multiple PGC's it will just transcode everything in there (and therefore all the PGCs at once). It doesn't work from an IFO so it can't actually tell what PGC's exist if any.

-Nic

DMagic1
13th October 2003, 04:58
So does everyone that has tested this feel its better than all the other transcoders? How close does it come to CCE in your opinion?

mrbass
13th October 2003, 05:18
Not sure about how good it is quite yet quality wise (very good though, my initial impressions). It is extremely fast though...will say that. I flipped through it, frame by frame, and this was 50% compression and it wasn't too shabby. Remember I'd never do 50% compression anyways with a transcoder but was just testing it. Also did 70% and looks pretty awesome.

DMagic1
13th October 2003, 06:51
I just had some problems with Minority Report. I did it twice at 62% and both times the resulting m2v was unplayable when finished. I did only a little and it played, but if I do the entire movie the file will not play. I'm trying again for the third time.

zeus163
13th October 2003, 07:02
This worked great for me. I had some encoded files that weren't going to fit on an authored DVD. I ran ReJig on them and dropped them all about 10%. Well, one I did about 15%. I'm wrapping up the project and it looks like this is all going to fit and I can't notice any quality drop. It was fast, efficient, and easy to use.

I did have two mishaps with it. One is the delete button that appears to be fixed in the next version and one of my files simply would not encode for me. I would load the file and nothing would happen at all. I gave up on that particular file as it wasn't that big of a deal for me.

Great work! I can't wait to see the direction this goes.

DVDRFreak
13th October 2003, 07:09
Originally posted by DMagic1
I just had some problems with Minority Report. I did it twice at 62% and both times the resulting m2v was unplayable when finished. I did only a little and it played, but if I do the entire movie the file will not play. I'm trying again for the third time.

Can you run a test with the original Requant (command line version) that is available on mrbass site to see if it is a ReJig problem or a Requant.

DVDRFreak
13th October 2003, 07:12
Originally posted by zeus163
I did have two mishaps with it. One is the delete button that appears to be fixed in the next version and one of my files simply would not encode for me. I would load the file and nothing would happen at all. I gave up on that particular file as it wasn't that big of a deal for me.

Great work! I can't wait to see the direction this goes.

The second problem I also noticed. It happens I think when the destination file you select is already there. If this happens it would be nice to see somewhere what went wrong (maybe Nic can implement a log window or file with some messages like succesfull or failed with a reason and some statistics.

zeus163
13th October 2003, 07:22
That's what I thought at first that the destination file was already in existance. But generally when I've loaded a file, I've just allowed it to default to whatever ReJig names it (the file name with a rejig added on). This one wouldn't do that. I'd load the file and no file would pop up. So, I'd navigate to where I wanted the file to go, click save, and then try it and it was still a no go.

Still, I cannot complain as it did exactly what I wanted it to do. My wife, however, simply could not understand my excitement!

DMagic1
13th October 2003, 07:29
Same problem the third time with ReJig. I'm testing with Requant now and will report back.

update*
Same problem. Strange??
I'll rerip the movie and try it again.

TheUnforgiven
13th October 2003, 08:52
nice work nic,
i tested 0.2d and it gave me very good impression in speed and quality.
-small thing, when the file name u specify for the output is already there nothing happens when u push the go button. (it should confirm the overwrite and do the job but it does not)
-is it possible to add an option to half the horizontal resolution?

DMagic1
13th October 2003, 09:08
Ok, it seems my problem is in the original m2v creation. The original m2v from dvd decrypter isnt even playing. I don't know whats wrong. I just did The World Is Not Enough right before Minority Report and didnt have these problems.:confused:

thop
13th October 2003, 18:31
DVDFREAK: I don't get your compile to work properly. It produces 25% smaller file than the compile by RB and has big macroblocks popping up in it :confused:

DVDRFreak
13th October 2003, 18:45
Originally posted by thop
DVDFREAK: I don't get your compile to work properly. It produces 25% smaller file than the compile by RB and has big macroblocks popping up in it :confused:

Mmm, could have something to do with the P6 optimize option. On my Athlon XP it produces exactly the same file as the original Requant.exe posted by RB.

thop
13th October 2003, 19:28
I got an Athlon XP 2700+. I just tried with two other DVDs, same result. I also compiled my own .exe using cygwin and it gives the same size as RB's, only yours doesn't want to play along but why when it works for everyone else? :confused:

DVDRFreak
13th October 2003, 20:54
Originally posted by thop
I got an Athlon XP 2700+. I just tried with two other DVDs, same result. I also compiled my own .exe using cygwin and it gives the same size as RB's, only yours doesn't want to play along but why when it works for everyone else? :confused:

Beats me. I just changed the source that it excepts a percentage and the recompiled it with VC7 optimized for speed and pentium pro (P6). Works for me on a AthlonXP 1900+.

You can of course use ReJig now. It accepts M2V in batch and the speed is asome.

thop
13th October 2003, 21:44
Originally posted by DVDRFreak
Beats me. I just changed the source that it excepts a percentage and the recompiled it with VC7 optimized for speed and pentium pro (P6).

I used requant.exe 2.0 a.m2v b.m2v on all tests :D That should be 50.0 on your compile then.

And does ReJig use your compiles or Nics?

Nic
13th October 2003, 22:16
ReJig has the code built in and is compiled with Intel C++ 7.1 (still the fastest normally, although differences will be tiny)

http://nic.dnsalias.com/ReJig.zip

Ok, bugs should be fixed and it's easier to add files. Also, it can take a commandline, if it does work for you well DVDRFreak with CCEData.txt maybe Eyes' only could be persuaded to add it to autorun from DoIt4U.

Let me know how you get on :)

Cheers,
-Nic

thop
13th October 2003, 22:23
I made some speed tests with my cygwin compiles and the gcc 3.3.1 i686 (P6) compile is about 5-10% faster than DVDFREAKS one. Not really worth the hassle though because of the whooping 900kb cygwin1.dll that accompanies the exe :p

DVDRFreak
13th October 2003, 23:35
Originally posted by Nic
Let me know how you get on :)

Cheers,
-Nic

Wanted to go to bed and then I saw a new version couldn't help myself I had to do some quick tests.:D

Results old bugs:

Del button is fixed and works in my quick test.

The exception I had when I try to transcode from image drive is fixed and works in my quick test.

The lost of setup when entering more jons (based on vob)data seems to be working also.


New functionality:
The new add window is works Ok. Only have a few remarks.

When I press the add button and the press cancel the dialog also pops up. This is strange I think.

When I select in the open file window multiple vobs of the same VTS the add job window will show me all files of the DVD multiple times. This is logical of course but very confusing for a normal user. Maybe it is even more logical to just show the add job window when add is pressed.

The new window does not have shroll bars so I cannot realy see what files I did add.

The new window does not have a cancel button. Would be nice if it had one. I noticed I could cancel by not adding any files or deleting them all but a cancel button would be better.

Suggestion:
Maybe it is a good idea that the new job window also enters the setting for percentage and output file. It is more logical I think. I'm working on composing a JOB add the files set the compression and output file and then press Ok.

Bug:
Had a crash while I was playing around with the new add job window. Will try to recreate it tommorow and let you know what I did do.

Will do some more thorough testing tommorow. Thanks for the quick bug fixes.

jsoto
13th October 2003, 23:50
Hi Nic,
Not sure if you are just addressing ac3 delay correction or still not.
You can take a VC++ (in fact only 'C') code from http://forum.doom9.org/showthread.php?s=&threadid=45504 (sources included).
Sorry if it is a little dirty, but I am very newbie in programming...
BTW, "delayac3" also fix ac3 common errors

PS: BeSweet is also able to fix ac3 delay in -payload mode.

jsoto

vhelp
14th October 2003, 02:50
@ Nic my friend..

Originally posted by Nic
ReJig has the code built in and is compiled with Intel C++ 7.1 (still the fastest normally, although differences will be tiny)

http://nic.dnsalias.com/ReJig.zip

Ok, bugs should be fixed and it's easier to add files. Also, it can take a commandline, if it does work for you well DVDRFreak with CCEData.txt maybe Eyes' only could be persuaded to add it to autorun from DoIt4U.

Let me know how you get on :)

Cheers,
-Nic

Hay.., commandline sounds fantasic.. only I have to figure out what I would
have a need for it for :rolleyes: ..but good inclusion none the less :p

Thank you for the constant acceptance of nags and plentiful of updates :)

-vhelp

Nic
14th October 2003, 08:38
@vhelp: I'm sure it will come in useful (mainly made it so I can test groups of files with a batch file for testing the ReQuant engine ;) )

@jsoto: Excellent work, really was not looking forward to porting AC3 Delay corrector, your code's great and will be included in the next release :)

@DVDRFreak: Excellent testing as always :) Ill fix all that and release it (the only bit i'm not sure about is having the compression level in the add box, not sure if it belongs there....hmmm)

Cheers,
-Nic

m1482
14th October 2003, 12:27
@Nic:

Thank you for this excellent tool!

Is there any way to add the size (in Mb) of each stream that appears at the "Stream List & Demuxing" window? This may come very handy for determining re-compression factor...

Nic
14th October 2003, 12:29
@m1482: Theres no exact way of doing it with out demuxing the whole file. Which is a slow process. There is no quick way unfortunately.

m1482
14th October 2003, 12:49
@Nic:
Theres no exact way of doing it with out demuxing the whole file. Which is a slow process. There is no quick way unfortunately. Are you sure? DVDShrink does it, just analyzing content (in about 30 seconds)...:)

Nic
14th October 2003, 13:17
Then it's very clever ;) Ill have to have a think...can't see how it could do that, maybe it guestimates it from a portion of the file?
(if anyone can guess let me know, maybe because it knows the exact length of the audio from the IFO it can just get the bitrate of the AC3?)

-Nic

mikegun
14th October 2003, 13:58
maybe it's enough to know the bitrate and the lenght to calculate ?!

mikegun

Nic
14th October 2003, 14:03
Yup it is, but of course, I don't use the IFO, so there is no way I can do the same...yet.

DVDRFreak
14th October 2003, 20:29
Okee testing continues.

test1: the command line options.

Initaily I could not get he -o option to work. I used the following command line:
C:\TEST_DATA>rejig -level 70.0 -i "Charlies Angels - Blowing up the ofice.M2V" -o "test.m2v"

Figured out that placing the -o before the -i option makes it work. So the command line is order sensitive.

This command line works:
C:\TEST_DATA>rejig -level 70.0 -o "test.m2v" -i "Charlies Angels - Blowing up the ofice.M2V" -o "test.m2v"

The -quit -close and -auto options work. The can be placed as the first parameter or the last without any problem.

The combining of m2v files has a problem with spaces.
C:\TEST_DATA>rejig -level 68.4 -o "test.m2v" -i "Charlies Angels - Blowing up the ofice.M2V"+"Charlies ANgels - Opening.M2V" works
but
C:\TEST_DATA>rejig -level 68.4 -o "test.m2v" -i "Charlies Angels - Blowing up the ofice.M2V" + "Charlies ANgels - Opening.M2V" does not work. The last one only will add the first m2v to the job.

test 2: Transcoder engine:
Run rejig on several m2v files at 70% the run the original requant on the same files. Byte compare rejig files with the requant files and they are indentical. So the integrity of the engine is till in tact.

DVDRFreak
14th October 2003, 22:39
Originally posted by m1482
@Nic:

Thank you for this excellent tool!

Is there any way to add the size (in Mb) of each stream that appears at the "Stream List & Demuxing" window? This may come very handy for determining re-compression factor...

If Nic will make the VOB function also to work multi PGC VOB files there is no longer the need to demux first. Just set the compression and transcode directly from VOB. For single PGC vobs this works already.

Idea:
Add an option to let you set the final output filesize that the transcoder engine would except. Did this already in the original requant command line tool and it works like a charm.

Would this be helpfull ?

vidcel
14th October 2003, 23:05
Is there anyway to get this to work with AVI files to convert to MPEG2
:D :D

int 21h
14th October 2003, 23:16
Originally posted by vidcel
Is there anyway to get this to work with AVI files to convert to MPEG2
:D :D

No.

Rombaldi
15th October 2003, 00:19
Originally posted by DVDRFreak
Idea:
Add an option to let you set the final output filesize that the transcoder engine would except. Did this already in the original requant command line tool and it works like a charm.

Would this be helpfull ?

If you mean set the output filesize and then let ReJig calculate the percentage, then yes, I would love that...

Case in point. Archiving episodes to fit on DVD, right now they are coming out (varying) between 1.48 and 1.55gb, I would love to be able to stack up several eps, tell it to make them all 1.38 gb (three per disc) and let it rock.

DVDRFreak
15th October 2003, 07:46
Originally posted by Rombaldi
If you mean set the output filesize and then let ReJig calculate the percentage, then yes, I would love that...

Case in point. Archiving episodes to fit on DVD, right now they are coming out (varying) between 1.48 and 1.55gb, I would love to be able to stack up several eps, tell it to make them all 1.38 gb (three per disc) and let it rock.

Jup that's what I meaan. In the commandline version I made it so that I can enter the size in MB (example 1024.8 MB) (think GB is not accurate enough) and the program calculates the exact compression factor (fact_x internally) and percentage.

Tested it on a few files and it works perfectly.

Nic could you also do this in the ReJig tool ?

Prysme
15th October 2003, 13:09
Hi all,

I got a question, someone has already try to recompress a menu, as I understand about this prog it preserve the cell id, so i make a test with a menu, recompress ok, remux m2v with vobedit, and the menu navigation is wrong, any idea ?

Prysme.

echooff
15th October 2003, 16:28
Did a simple test with a rip of City Slickers 2 last night. I say simple because complicated is still beyound my limited capabilities at this point;).I used the newest version Dvd Decrypter to rip to 1 large m2v and 1 ac3. The object was to see how small I could get the video before artifacts became noticeable. There is not a lot of fast motion in this movie. I managed to go down to 40% before anything was visible and then only on the few fast motion scenes. At 42% there was none. Man was this fast. It was so fast I was able to decrease in 1% increments without my hair turning white with old age. Nics Gui was easy to use and self explanatory. Since it is so easy to use I think maybe a sticky on this little proggie is warrented for the newbies. To be honest I had more trouble with Dvd Decrypter than ReJig. Nothing wrong with Dvd Decrypter. Just a case of stupid in, stupid out.:confused: Congradulations guys.

resonator
15th October 2003, 22:01
Originally posted by Prysme
Hi all,

I got a question, someone has already try to recompress a menu, as I understand about this prog it preserve the cell id, so i make a test with a menu, recompress ok, remux m2v with vobedit, and the menu navigation is wrong, any idea ?

Prysme.

Haven't tried it, but my guess is - forgot to update the vts sectors with IFOEdit?

Rombaldi
15th October 2003, 22:31
The more I use this, the more I become amazed at the speed and quality that can be stuffed in a smaller space...

(chuckle) maybe the name needs to be changed...

TARDIS - it's bigger on the inside than it is on the outside (grin).

JvD
15th October 2003, 22:46
OK, this tools seems promising, BUT, is there a way to keep certain subpictures (subtitles) intact OR is ReJig _JUST_ a transcoder (a not-so-many-features-application)? I would like to use it but I MUST HAVE SUBTITLES?

Nic
15th October 2003, 23:19
Well, I'm keeping myself busy...been adding IFO parsing support. (when I say adding, I mean hacking VStrip into ReJig ;) )

@JVD: I'll make it so you can demux subtitles as well. The tool is only small and simple now, but it will grow. Got to buy me a dvd burner too...anyone gotta spare? ;)

@Rombaldi: I like the name ReJig :P as Garf/Monty once famously said:
"I Like The Name. I Wrote the Software. The Name Stays."
http://www.hydrogenaudio.org/index.php?act=Search&CODE=show&searchid=273b48fb1549e0cd0d8a36e855883703&search_in=posts&result_type=posts&highlite=the+name+stays

@DVDRFreak: Harder to do if it's not a raw M2V file, because a vob say isn't a true representation of the size of the m2v. I've got lots of ideas for the engine once I do all this periphery stuff. One of which is rate control. Then either two pass, or the ability to select certain time periods for quant boosts/decreases (i.e. boost on credits, lower the quant in difficult sections, etc)

It's growing, should be able to release a minor IFO parsing version (not fully functional, just an example) over the weekend, got to fit in seeing Kill Bill as well, obviously.

-Nic

zeus163
15th October 2003, 23:39
@Nic

Thanks for the fantastic update. This little tool has worked wonders for me on two DVD's I've authored now. I wasn't looking forward to the hours of re-encoding several .m2v streams I had to fit onto DVD's I wanted to author and was able to compress them to 90% and have them fit and I can't even tell.

I look forward to 2 pass on this tool. Great job!

mmgrover
15th October 2003, 23:45
Nic, I made a couple of changes to the "ReadInCCEData" Function.
I would loose the output file name on the last file and I changed
code to allow for same output file names as if they were run
through CinemaCraft Encoder and pulldown.

thanx, mike

ps: Nice app, Compiles well under Visual Studio .net



void CReJigDlg::ReadInCCEData(LPCSTR szCCEData)
{
FILE *fin = fopen(szCCEData, "r");

list<CString> lstM2VFiles;
list<CString>::iterator iter;

if ( fin )
{
char szPath[500];
char *p = szPath;

bool bInQuotes = false;
while ( true )
{
int c = getc(fin);
if ( c == EOF )
break;

if ( c == '"' )
{
bInQuotes = !bInQuotes;

if ( !bInQuotes )
{
// Then we have the filename
*p = 0;

// Convert to a .M2V
if ( strrchr(szPath, '.') )
strcpy(strrchr(szPath, '.'), ".m2v");

lstM2VFiles.push_back(szPath);
p = szPath;
}
}
else
{
if ( bInQuotes )
{
*p = c;
p++;
}
}
}
fclose(fin);

for ( iter = lstM2VFiles.begin(); iter != lstM2VFiles.end(); iter++ )
{
// Add the Jobs in
CJob Job;
Job.csInputFile = *iter;
Job.fCompressionFactor = m_fCompressionFactor;

// Create suggested output filename
Job.csOutputFile = *iter;
int nDot = Job.csOutputFile.ReverseFind('.');
if ( nDot != -1 )
{
Job.csOutputFile = Job.csOutputFile.Left(nDot);
}

//Job.csOutputFile += "_ReJig.m2v";
int nNopull = Job.csOutputFile.Find("nopull");
if ( nNopull != -1 )
Job.csOutputFile += ".mpv";
else
Job.csOutputFile += ".mpv.m2v";



m_JobList.push_back(Job);
AddString(*iter);

//Save the last input before refreshing
// mike
m_csOutputFile = Job.csOutputFile;

// Select this one on the input list
m_lstInputList.SetCurSel(m_lstInputList.GetCount()-1);
m_PreviousJobSelection = m_lstInputList.GetCurSel();
OnRefresh();
HorizScrollBox();
}
}
}

Nic
15th October 2003, 23:54
Sounds fine to me :) Ill put it in. Thanks :)
(you can put text like that in using square brackets with the word "code" in, then you won't loose the formating and the post is smaller)

some code
etc :)

mmgrover
16th October 2003, 00:06
Thanx, I didn't know that :-( my bad lol

int 21h
16th October 2003, 06:36
Direct VOB output needs what.. update of VOB navigation packs and correction of sectors in IFO table?

DVDRFreak
16th October 2003, 06:56
Originally posted by Nic
Well, I'm keeping myself busy...been adding IFO parsing support. (when I say adding, I mean hacking VStrip into ReJig ;) )

@DVDRFreak: Harder to do if it's not a raw M2V file, because a vob say isn't a true representation of the size of the m2v. I've got lots of ideas for the engine once I do all this periphery stuff. One of which is rate control. Then either two pass, or the ability to select certain time periods for quant boosts/decreases (i.e. boost on credits, lower the quant in difficult sections, etc)

It's growing, should be able to release a minor IFO parsing version (not fully functional, just an example) over the weekend, got to fit in seeing Kill Bill as well, obviously.

-Nic

Wow. with IFO support this little proggie will realy Rock :cool: . True about the filesize thing did not think of that.

Thanks Nic for all your time and affort to make this little proggie realy shrinktastic.

JvD
16th October 2003, 10:18
Yeas, the is Tooo hard for me. Why not manual XXXXMB? In ReJig that is. (dont know how to estimate/calculate the % shrinkage, including sound, etc.)
Pls linify me or explain it.

PS. After a couple of tests I can say that the Quality IS REAAALLY great for an app this fast. DS.

girv
16th October 2003, 11:38
@Nic: thanks :)

@all: anyone done any quantitative tests comparing ReJig quality to any of the other transcoders out there?

Grunter
16th October 2003, 15:38
@JvD Why don't you use ifoedit for authoring m2v output from ReJig with audio and subtitle from original dvd? It works well ;)

unixfs
16th October 2003, 17:46
Hi,
how much can you compress your videos?
I tried to set a factor of 12.5% on an 8 GB video expecting to have
a compressed 1 GB file (conscient that quality would suck), but it was 2.5 GB.

What's the typical ratio of quants size/whole movie?

Thanks.

Nic
16th October 2003, 17:46
(I believe im getting ahead of myself and already am looking into the reauthoring side...even though it's so tempting just to automate ifo-edit ;) )

int 21h
16th October 2003, 18:23
Originally posted by Nic
(I believe im getting ahead of myself and already am looking into the reauthoring side...even though it's so tempting just to automate ifo-edit ;) )

Resist the temptation! ;)

JvD
16th October 2003, 18:34
Grunter, how do I do that. I know hoe to author (mux) video and sound together, but how do I add the subpictur/subs that I want. PLS, enlight me.

[EDIT]OK, I think I got it!! ;-)

DVDRFreak
16th October 2003, 18:48
Originally posted by JvD
Grunter, how do I do that. I know hoe to author (mux) video and sound together, but how do I add the subpictur/subs that I want. PLS, enlight me.

[EDIT]OK, I think I got it!! ;-)

You can also make a VOB job with ReJig 0.3a to transcode the video to wathever size you want and the remux it with IfoEdit back into the original VOB. This way you keep the menu and all the extra's you want to keep.

JvD
16th October 2003, 19:24
Dont get it! I forgot to do my homework , sorry! Have to read som more about this! Any tips! Enlight me MOOORE! I have been living in a shelter with all those easy oll-in-one-solutions ;-)

mmgrover
16th October 2003, 22:33
Has anybody been successful at remuxing a video file from ReJig
using IfoEdit?

I keep getting pauses and jerks during playback?


mike

DVDRFreak
16th October 2003, 23:02
Originally posted by mmgrover
Has anybody been successful at remuxing a video file from ReJig
using IfoEdit?

I keep getting pauses and jerks during playback?


mike

Jup just did shrek. Tried it with Recode and Shrink but the picture quality was blurred and I did get visible macroblocks.

Used IfoEdit 0.95 to strip and ReJig to transcode the M2V file directly from the VOB files (just click first VOB (VTSxx_01) and ReJig will add the rest of the requierd files. After ReJig is finished open the ifo for that title set and remux the video. When this is finished delete the original VTS_x_01 files and move the new ones into the place. Press get VTS sectors and presto. Plays perfect.

The backup I have now is almost perfect with all the extra's included. No visible quality loss imho. Only thing stripped is one language track and all menu's that where not in english.

JvD
17th October 2003, 08:16
Thanks DVDRFreak!
Will this method keep the possibility of subs?

int 21h
17th October 2003, 08:19
It will not...

I think you'll need VOB output from Rejig before you can deal with the subs.. (without reauthoring a DVD that is..)

DVDRFreak
17th October 2003, 12:51
Originally posted by JvD
Thanks DVDRFreak!
Will this method keep the possibility of subs?

This method keeps the original DVD structure in tact. So all the subs yoy do not strip with IfoEdit will remain. By the way if you want to reauthor a DVD with subs the easyest way is to use DoItFast4U to demux all the stuff you want and the compress it with Requant's CCEdata.txt imput feature.

JvD
17th October 2003, 13:16
Thanks again! I have tried what you descibed in earlier post and it works really great. Will do some reading on DoItFast4U to see what i can do and HOW. "Ill be back!"

DVDRFreak
18th October 2003, 11:34
Hi Nic,

Found on sourceforge some sources to author a DVD maybe these will be also useable for this new tool. Don't now however how good they are. Project is called DVDAuthor.

JvD
18th October 2003, 12:59
Originally posted by DVDRFreak
This method keeps the original DVD structure in tact. So all the subs yoy do not strip with IfoEdit will remain. By the way if you want to reauthor a DVD with subs the easyest way is to use DoItFast4U to demux all the stuff you want and the compress it with Requant's CCEdata.txt imput feature.

OK, tried it! Ripped the complete DVD, rund the main-movie-vobs trough ReJig, Demuxed, the sound. Then Muxed it togheter in Ifoedit creating new vobs. Replaced the old ones with this new set of vobs. In Ifoedit, got VTS sectors, and saved it. When playing it, THERE ARE NO SUBS? WHAT DID I DO WRONG? I didnt stripp anything. The picture is amazing, with hte speed in mind. Sure, CCE makes perfect copies. The day this transcoder is placed under som great GUI, in a smart all-in-one-solution, this product WILL rock (it allready does). Keep on working guys!

Exo
18th October 2003, 15:03
Hi JvD

You can either rip the subtitles with vobedit to sup files
and use those sup files in Ifoedit's DVD Author mode or
you can use Ifoedit's remux function to simply replace the
video in your original vob with your ReJigged m2v (and
keep all original audio and subpicture tracks, also the menus
should work as in the original).

Nic
18th October 2003, 15:55
@DVDRFreak: Way ahead of you ;) Already ported DVDAuthor to Win32...with a combination of mplex -f 8 and dvdauthor all built in, things may go quite well :) Ill also add code to automate IFOEdit, as that is the tried and tested method (even if it's not opensource :( )

DVDRFreak
18th October 2003, 16:29
Originally posted by Nic
@DVDRFreak: Way ahead of you ;) Already ported DVDAuthor to Win32...with a combination of mplex -f 8 and dvdauthor all built in, things may go quite well :) Ill also add code to automate IFOEdit, as that is the tried and tested method (even if it's not opensource :( )

Wow :cool: can't wait to test this sucker. Way to go Nic.

layer3maniac
18th October 2003, 17:14
This is REALLY exciting. Kudos on all your work, Nic. It's hard to believe how far this has come in such a short time. You are amazing! Keep up the good work, and BTW, thank you!

DVDRFreak
18th October 2003, 17:33
Hi Nic,

in your code for the engine in 0.3a there is still the printing of the percentage for the command line version removing it will save some time. Removed the all printf commands in general and it was 1-2% faster.

JvD
18th October 2003, 22:53
OK, thanks for all help. Now I got it to work. I used Vobedit to rip subpicture streams (is this neceserry?). The joind them all together (m2v, ac3 ond sup) in Ifoedit (do I really need to do all three?). Replaced the original VOB-files (movie) with these new ones. VOILAT! It worked fine. THANKS MATES! But i AM SOOOO bad at calculating the size (in %) for the moviefiles. The movie ended up too big (100MB:-) Yeas, i AM really lousy ;-)

DVDRFreak
18th October 2003, 23:47
Originally posted by JvD
OK, thanks for all help. Now I got it to work. I used Vobedit to rip subpicture streams (is this neceserry?). The joind them all together (m2v, ac3 ond sup) in Ifoedit (do I really need to do all three?). Replaced the original VOB-files (movie) with these new ones. VOILAT! It worked fine. THANKS MATES! But i AM SOOOO bad at calculating the size (in %) for the moviefiles. The movie ended up too big (100MB:-) Yeas, i AM really lousy ;-)

For a movie only backup this could be a method (so a DVD without extra's or menu's). You indeed need a substream a AC3 stream and a M2V stream for a DVD with sound and subtitles.

If you want just to shrink a DVD to fit on one DVDR do the following.

1) Rip it to harddisc with DVDDecryptor.
2) Strip all stuff you do not want out with IfoEdit (there are somegood guides on the doom9.org site) or browse the ifoedit forum.
3) Check the size of the stripped projects (for example it is 4.8 GB). So you need to shrink the total by 4.8GB-4.37GB=0.43GB.
For now there is no way to tell with ReJig how big the M2V sreams are in a VOB so to be able to see this demux all VOB's to M2V to see the size. Then calculate a percentage to save the amount of space needed.
4) ReJig the M2V's with the calculated percentage.
5) Start IfoEdit and select a ifo belonging to a Rejig M2V. Under the menu VOB extra's select Remux M2V. In the dialog select your new M2V.
6) When IfoEdit has finished replace the original VOB/IFO files with the new ones created by ifo edit.
7) Repeat step 5 and 6 for all Rejiged M2V files.
8) When all is done open IfoEdit once more and press GET VTS sectors.

Now we have a fully working DVD with menu's subtitles extra's. That will fit on a DVDR disc.

Nic
19th October 2003, 23:32
Well i'm working loads on ReJig, but this version doesn't allow you to do much more, I'm away tuesday-thursday, so I thought I'd release this and fix little things since 0.3a (i.e. has mmgrover's code, jsoto's ac3 correction, dvdrfreak's suggestion of removing printfs, also no one had noticed the audio delay always reported 0ms ;) etc)

But there's lots of new code inside that hasn't been turned on really yet :) For example, With the code that's in there you can rip a ifo parsed PGC video straight from DVD to a M2V file (it's very unpolished at present, but works fine). So even though it seems not much of a step forward with 0.3b, the next proper version (0.4), should have a lot more...

(...spent the last hour with a hex editor seeing how .sup files work for IFOEdit. Easy to add, that will be in the next version so you can demux to sup)

http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip
(Sourcecode is always updated with every release and always at that link, sometimes I'm just too lazy to type the link with every release ;) )

-Nic

ps
Thanks for all the testing and feedback, helps loads! :)
Special thanks goto maven, because i've done a really shameful hack to get VStrip to do all the work for me, one day ill neaten it up (but it works ;) )

DMagic1
20th October 2003, 00:39
It would be nice if there was something to aid people in calculating their %.

Macanudo
20th October 2003, 02:22
I remember reading somewhere that it was possible for Transcoders to change the resolution. I think it is an option in ReMpeg2. If it is possible, I think it would be a great feature to add to Rejig.

You could reduce the resolution to 352x480, which as you know is still DVD complaint, and eliminate blocking at low bitrates. This might allow you to keep some extras at low bitrates that you would otherwise delete.

Just a suggestion,
Macanudo:D

int 21h
20th October 2003, 04:08
Currently with this engine it is not possible as it would require subsampling of the motion vectors... also, unless you had some specific filtering applied to the subsampled vectors, you would introduce a good amount of distortion.

jhmac
20th October 2003, 06:13
Sorry for the newbie questions...
When I demux should't I get 2 files a .mpa & .mpv files? Also the 2 recompress buttons what are the difference between them? What is the best way to mux the files back together? I am playing with this tool but really don't know how to use effectivly.

OK first I load the vob files then demux the audio then recompress the video now I think I mux and convert to vobs with ifoedit but not sure if this is correct or how to do this. Anyone feel like giving a crash course in ReJig'ln a movie!

Thank You!

jsoto
20th October 2003, 08:05
Hi Nic
(...spent the last hour with a hex editor seeing how .sup files work for IFOEdit. Easy to add, that will be in the next version so you can demux to sup)
I've spent more than one hour and I was unable to find the clue about timestamp (the first bytes of each frame). Could you explain it? Well, I can wait because it will be included in the sources...
BTW, I have written a source with subs extraction, but, obviously, timestamp is not working. I am trying to include this feature in mdvdauth plugin, without using additional SW.

jsoto

Nic
20th October 2003, 08:38
Ahh, the timestamp is a PTS, so divide by 90000 to get the number of seconds. But strangely (well almost) it is not the PTS of the Sub Stream in the MPEG, but it is offset, I think, by the video stream PTS.

So (from memory) you have 'SP' (which is the start of sup sub) then the PTS (which I think is a QWORD) then pretty much the size of the sub minus it's header and that's about it. (I think there was one more bit, but I can't remember (im at work now))

Hope that helps :)

-Nic

ps
jhmac: I'll write a mini-guide for the next release, but for now read through mine and DVDRFreak's posts in this thread, and that should give you an idea of how things work. But it sounds like your doing it right anyway :)

noir
20th October 2003, 12:33
Originally posted by Macanudo
I remember reading somewhere that it was possible for Transcoders to change the resolution. I think it is an option in ReMpeg2. If it is possible, I think it would be a great feature to add to Rejig.

You could reduce the resolution to 352x480, which as you know is still DVD complaint, and eliminate blocking at low bitrates. This might allow you to keep some extras at low bitrates that you would otherwise delete.

Just a suggestion,
Macanudo:D

i also noticed that for a perfect dvd compilant the 352x480(576)stream must be 4:3 not 16:9, this introduce a complex resize problem

jsoto
20th October 2003, 22:03
Ahh, the timestamp is a PTS, so divide by 90000 to get the number of seconds. But strangely (well almost) it is not the PTS of the Sub Stream in the MPEG, but it is offset, I think, by the video stream PTS.
Many thanks, Nic.
I'll play with it when I get some free time.
jsoto

mmgrover
20th October 2003, 22:39
Nic, I have an idea for a a new feature.
I just did Star Wars Episode I, but at the podracer scene movie was
blocky :-(. I then demuxed by Cell ID. I rejiged VobID 6,cells 6-9
at 80% and dropped the other cells by 1 percent to end up with same
final output size. I then glued all the cell back together to a single m2v stream and remuxed. pod racer scenes were much better looking!

I wonder if it would be worth adding individual compression
settings for the multiple file input?

just an Idea, mike

Nic
20th October 2003, 23:07
"I wonder if it would be worth adding individual compression
settings for the multiple file input?"

Could you explain this a little more...I was going to add a feature in to allow you to specify times in the input for the quant to be boosted/decreased...are you thinking of a similar thing?

Anyway I'm just about to catch a plane to see a client, be back thursday/friday...

-Nic

DVDRFreak
20th October 2003, 23:18
Hi Nic,

Some ideas for the engine:

When in Ifo mode it would be nice if you could select the compression per chapter. In file mode a time selection would be an option.

Also you could make the engine smarter by detecting somehow high motion scenes. These normaly compress not so good and would therefore need a lower compression ration then the rest of the mpeg. Maybe it is possible to analyse the bitrate or the motion vectors so those scenes could be detected.

int 21h
21st October 2003, 01:53
Originally posted by DVDRFreak
Hi Nic,

Some ideas for the engine:

When in Ifo mode it would be nice if you could select the compression per chapter. In file mode a time selection would be an option.

Also you could make the engine smarter by detecting somehow high motion scenes. These normaly compress not so good and would therefore need a lower compression ration then the rest of the mpeg. Maybe it is possible to analyse the bitrate or the motion vectors so those scenes could be detected.

You could do this by applying a bias... instead of applying a straight X% quantizer increase across all frames, you apply X% quantizer increase on certain frames, and a lower Y% on frames that are more complicated. You could detect 'complicated' frames by looking at the coefficients I think... As far as I can tell, currently the ReQuant engine just blindly increments the quantizer scale...

DVDRFreak
21st October 2003, 07:02
@INT 21h

Jup, thats what I saw in the source to. It increases the quant scale and decies whether to compress I/P/B frames depending on the fact if it already compressed the video enough (react_time constant). Do you know how to determine the coefficients (I think you mean the motion vectors) ? Is it already in the source somewhere.

This could help Nic allot to build in this new feature.

bwalerud
21st October 2003, 10:01
Handle a mpeg2-stream contained in an .avi?

duartix
21st October 2003, 12:16
From what I know about DVDShrink before deep analysis, it was using Constant Frame Quantization, i.e. if you choose 70%, it would reduce the frame to 70% of it's original size.

Since it just works on DCT data, lets say the frame was:
20% MV
80% DCT
it would have to reduce the DCT to:
(70% "desired reduction" -20% "non reductable MV")/(80% "DCT data")
which is (0,7-0,2)/0,8 = 62,5%

But what if the frame was:
50% MV
50% DCT ?
then the final rate of the DCT data would be:
(0,7-0,5)/0,5 = 44%

In a higher motion scene like this:
65% MV
35% DCT
the final rate of the DCT data would be:
(0,7-0,65)/0,35 = 14%

Well I think you get my point: As the amount of motion in a frame is getting higher, so is the reducion of the DCT values. This was why DVDShrink performed so poorly in high motion scenes (before deep analysis) When the amount of Motion Data is beyond the reduction rate it is impossible to reduce the frame further without going into MV reduction. That's probably where a bit reservoir mecanism takes place.

So, instead of Constant Frame Quantization what is needed is Constant Quantizer Reduction. But in order to do that, a first pass is needed to calculate that global quantization value.
Either that or motion vector reduction also.

I don't know how Rejig is working (in fact I don't know either how DVDShrink is working now that is has deep analysis) but wanted to share my toughts...

int 21h
21st October 2003, 22:07
You can't touch motion vectors, or you shouldn't anyways..

For transcoding within the compressed domain, there are two main ways to do it.

The first is increment quantizer scale, you uncompress until you get to quantized coefficients, which you then dequantize, and requantize on a higher scale.

That method is the most inefficient but also the simplest to implement.

The second method is to selectively drop coefficients. You can do this several ways also. You can always drop coefficients over block position X, or you can drop after X amount of 0s. The best quality method is to adaptively do both of these.

This method is the most efficient but also more difficult to implement.

ReQuant (the ReJig engine) uses both of these methods. On I-Frames, we increment the quantizer scale. On P-Frames, the last coefficient is dropped, if there is more than one coefficient. On B-Frames, the quantizer scale is multiplied by a computed factor.

So how do we make this more efficient and better quality?

That's hard to say. In general, if you look at a graph with PSNR on the Y-axis, Rate on the X-axis, and graph the regular MPEG compression process, its a positively sloped curve. Then, graphing the transcoded process, at high rates, you'll see the two curves very near each other, when the curve for the regular compression begins to drop off, the transcoded curve maintains a higher PSNR longer, then more rapidly drops off. This tells us that if we reduce the rate too much, we're going to end up with a worse PSNR from transcoding than you would re-encoding. (i.e. worse picture quality)

Also in general, in higher motion scenes, we should be able to either increase quantizer scale more.... or be more liberal with the coefficients we drop.

Right now, ReQuant is not setup to consider motion vectors in the overall scheme of things, but to improve quality, we could further improve the decision process of which method to use, instead of blindingly applying it by frame type...

jhmac
21st October 2003, 22:11
Holy crap what did he just say?

DVDRFreak
21st October 2003, 22:38
Originally posted by jhmac
Holy crap what did he just say?

He explains how Requant works and gives some good tips how to improve it :D .

@int 21h
Good explanation int 21h hope this helps. I myself was digging through the source and found a variable called delta that is calculated based upon motion (at least I think it is). When I run it through the debugger it seems to get higher values when fast motion scens are processed and low values when normal scenes are processed varying between 10-255 or so.

Can we maybe use that value and adapt the fact_x based upon that ? Or did I not understand this calculation correctly ?

int 21h
21st October 2003, 22:57
Delta also appears to me an indicator of motion... but it appears that the functions dealing with motion vectors are currently only used around line 1271:

case MC_FRAME:
MOTION_CALL (motion_fr_frame, macroblock_modes);
break;
case MC_FIELD:
MOTION_CALL (motion_fr_field, macroblock_modes);
break;
case MC_DMV:
MOTION_CALL (motion_fr_dmv, MACROBLOCK_MOTION_FORWARD);
break;


The only problem with changing fact_x once you begin processing, is that ReQuant has no rate control... when you start ReQuant you tell it you want to apply a blind X% reduction across all frames, if you change fact_x while execution proceeds, you're no longer getting a reduction of X%, so you would need to implement more sophisticated rate control...

int 21h
22nd October 2003, 01:43
Perhaps we could change it like you suggest, so that on higher motion values we do less of the requantization process, and we make a sort of debt buffer that we try to equalize out later by applying even more compression on lower motion scenes... I dunno, I get confused when I start to stare at the code too long, its so messy.

DVDRFreak
22nd October 2003, 07:13
So if we want to use this we would have to do a two pass. First pass build a info file with motion information. Second pass calculate fact_x dynamicly based on this info file and some kind of bias setting (1-255) that tells Requant when to lower and when to increase fact_x.

int 21h
22nd October 2003, 07:18
Instead of, or perhaps in addition to, manipulating the factor, I think you should manipulate the methods used, i.e. you only drop coefficients on high motion, increase quant on low motion, etc.

RB
22nd October 2003, 09:10
Originally posted by int 21h
I dunno, I get confused when I start to stare at the code too long, its so messy.
Simply couldn't resist an "me too" here :) Why is it that great minds always write such higly obfuscated code with no comments?

duartix
22nd October 2003, 11:47
Simply couldn't resist an "me too" here Why is it that great minds always write such higly obfuscated code with no comments? I can't possibly agree with that as I know one of these people, which is now taking a Master Degree in genetic programming, and I've never seen clearer code than his. We were both in Computer Science (Artificial Inteligence) and I've seen Math students copying his projects over the years because of it's simplicity, cleanness and structure. It was like looking at at manual of Structured Programing using OO.

Anyway, @DVDFreak:
Isn't it easier than this? Second pass calculate fact_x dynamicly based on this info file and some kind of bias setting (1-255) that tells Requant when to lower and when to increase fact_x.Isn't it enough to make a first pass where you calculate the ratio of MV and DCT in the total amount of data, and then you just calculate the effective DCT reduction rate by:
effective DCT reduction rate = (desired reduction - MV ratio)/(DCT ratio) ?

This way we could have a constant DCT quantizer. Doesn't this mean constant quality?

Or perhaps I am oversimplifing things?
I must confess that int 21h post has put me on my knees. :o

Sbofen
22nd October 2003, 13:30
Originally posted by jhmac
Holy crap what did he just say?

Just when I thought I was starting to understand a little about DVD structure and programming...

Ummm, I've got cookies and a twinkie - if it'll help.

All I can say is that I'm glad there are people that do fully understand all this and can make a great app out of it for me!

Man I feel dumb
:stupid: :eek:

int 21h
22nd October 2003, 19:08
I'm hesitant to really recommend tying too much to motion because motion is not always a precise indicator of scene complexity... it reminds me alot when me and a friend bothered nando until he put those motion based DRF (really quantization) boxes into Nandub, and it made it a little better, but about 5x more complicated (i.e. you had to know alot more about the content, etc.) Whereas, coefficients could indicate it a little more accurately (in my opinion)...

I regret I don't have a lot of time to dive into alot of changes to the Requant engine, I really would like to oO the source, but there are some parts I just cannot understand :( Maybe Nic can help me out when he returns.

Mug Funky
22nd October 2003, 19:23
hey, first of all, thanks you guys. your work is _very much_ appreciated.

one thing i've noticed is that rejig/requant seems to be excessively hard on b-frames. perhaps percentages could be specified separately for i, p, and b frames? this would make file size prediction hell (i think), but it would make requant/rejig much more versatile.

duartix
24th October 2003, 10:46
Ok, my doubts on DVDShrink's deep analysis compression method were answered here (http://forum.digital-digest.com/showthread.php?s=&threadid=26603).

So what's it all about?
DVDShrink performs a first pass where it calculates the engine's maximum and minimum compression for every frame in the source. That's why it can take as long as half a(n)? hour.

With that information, it's very easy to set the compression uniformly across all frames on the second pass.
That easy! :cool:

Nic
24th October 2003, 13:35
Very useful thread duartix thanks, doesn't sound too complex at all. Should be able to implement that, just came back and now have a week off (assuming the software I wrote for the client doesn't fall over ;) ). So I should be able to work on it lots over the next week...Lots of interesting/thought provoking discussion, since I've been away, keep it coming... :)

-Nic

vidcel
24th October 2003, 13:51
I have tried using this a few times to trascode my mpegs that I have accidently created to large, this all goes fine except when I import it into DVDAuthor it tell me that it's max is 10200kbps and the DVD max should be 9800kbps, even if I do it at 20% still the same. So something a bit odd.
I tried an old bitrate program as well and the same was reported.
:confused:

mikegun
24th October 2003, 13:53
hi,

did you try dvdpatcher ?

rgds.,

mikegun

vidcel
24th October 2003, 14:17
thanks for that.
That worked.
Cam

Nic
24th October 2003, 20:38
@int21h et al: I converted ReQuant into C++ code...but it's quite a bit slower than the C :( also allowed me to do some tests with the Intel Compiler...which makes it a helluva lot faster than VC6.

http://nic.dnsalias.com/ReQuant_src.zip

is the C++ version and the old C version, for you to play with, I moved some of the more interesting functions to the top of ReQuant.cpp
The C++ version won't make it into ReJig, but it may be useful for testing quality...
(I did a fc and the C++ version and C version report the same output, which is good, if you can make the C++ version the same speed let me know).

Back to IFO parsing stuff, then onto rate control ;)
(Surprised no one has tried double clicking the right mouse button in ReJig to see what I was upto before I went away... ;) )

-Nic

JvD
24th October 2003, 20:57
OH! I totaly missed that part :eek: I normaly right-dubbel-click everything :D Nice "interface"!

*DEMUXING AS WE SPEAK*

Nic
24th October 2003, 21:15
LoL...don't expect it to work...but it's a start. Thought someone would have picked up on it ;)

JvD
24th October 2003, 21:19
SORRY to tell but it doesnt work. Tried two times and in the end, when it all was at full (100%) I get an error msg.
When I pick an IFO (first one) then get an m2v that is way bigger then the original. (used an allready shrinked set of files, movie only) The m2v itself should be appr 3.6GB.

int 21h
24th October 2003, 22:04
Originally posted by Nic
@int21h et al: I converted ReQuant into C++ code...but it's quite a bit slower than the C :( also allowed me to do some tests with the Intel Compiler...which makes it a helluva lot faster than VC6.

http://nic.dnsalias.com/ReQuant_src.zip

is the C++ version and the old C version, for you to play with, I moved some of the more interesting functions to the top of ReQuant.cpp
The C++ version won't make it into ReJig, but it may be useful for testing quality...
(I did a fc and the C++ version and C version report the same output, which is good, if you can make the C++ version the same speed let me know).

Back to IFO parsing stuff, then onto rate control ;)
(Surprised no one has tried double clicking the right mouse button in ReJig to see what I was upto before I went away... ;) )

-Nic

Interesting that its so much slower in C++, have you profiled it to try and see why?

Nic
25th October 2003, 00:22
@int21h: Haven't profiled it, could be that now it doesn't use static variables everywhere, etc the compiler can't optimise as well, etc...take a look, ill just keep with the C code for now, my C++ code doesn't help the readability (<--is that a word ;) ) much.

@JvD: Well it's only the test stuff, so I doubt it would work, but it has worked fine for me, any more info you could give me would be great (like the error msg it said, the percentage you set it to before hitting reencode, the buttons and the order in which you pressed them etc etc). Thanks :)

mmgrover
25th October 2003, 15:43
Nic I had to add another line of code, mike


for ( iter = lstM2VFiles.begin(); iter != lstM2VFiles.end(); iter++ )
{
// Add the Jobs in
CJob Job;
Job.csInputFile = *iter;
Job.csInputFile.Replace("nopull.",""); //<- mike
Job.fCompressionFactor = m_fCompressionFactor;

// Create suggested output filename
Job.csOutputFile = *iter;
int nDot = Job.csOutputFile.ReverseFind('.');
if ( nDot != -1 )
{
Job.csOutputFile = Job.csOutputFile.Left(nDot);
}

//Job.csOutputFile += "_ReJig.m2v";
int nNopull = Job.csOutputFile.Find("nopull");
if ( nNopull != -1 )
Job.csOutputFile += ".mpv";
else
Job.csOutputFile += ".mpv.m2v";


If any body needs, I can compile Under Visual Studio 7 to test.


mike

m1482
25th October 2003, 17:15
@Nic:

I don't know if others had notice, that when transcoding with this tool, the transcoded file is somehow JUMPY. I carefully check it when running the ".m2v" file with Power DVD. I notice that every 3 or 4 seconds, the movie tend to jerk or jump. You can notice this specially when the camera is moving horizontally. First I noticed it when playing the movie in my Sony DVD player. I confirmed it, playing it through Power DVD, and using also other movie.

Both transcoded movie are NTSC, and the compression was adjusted to 58% and 60% respectively. Maybe the framerate is altered or changed, however no audio sync problem is detected...

Nic
25th October 2003, 18:39
It is a bug that was kind of noticed before, but obviously does not happen often, or we would have heard more about it...I need to get it to reoccur here for me to find the problem. What was the name and region of the DVD (or material) you were transcoding?

(if it happens often enough, maybe it would be easy enough for you to cut a bit out of the original source and send it to me?)

Cheers,
-Nic

mmgrover
25th October 2003, 18:55
@nic

I have a couple of movies that I also have this problem with.
One is StarWars Episode I. Another one that might be a problem is
"The Core" I recompressed the video with rejig and Horizontal
camera movement seems fuzzy and jerky. I just finished
running it through IC8 and I am going to compare it now.
I can send you a segment of these if you want?


mike

DVDRFreak
25th October 2003, 23:40
Originally posted by mmgrover
@nic

I have a couple of movies that I also have this problem with.
One is StarWars Episode I. Another one that might be a problem is
"The Core" I recompressed the video with rejig and Horizontal
camera movement seems fuzzy and jerky. I just finished
running it through IC8 and I am going to compare it now.
I can send you a segment of these if you want?


mike

Did also the core with rejig (movie only) I did not notice any jerky or fuzzy camera movement. Did the demuxing with DoItFast4U maybe that is the difference. Or it just happens at higher compression ratio's. Movie only I just needed a compression of 86% I believe.

Nic
26th October 2003, 00:06
Yup, that's an interesting point...anyone that gets jerkyness, could you try demuxing it to M2V first (with DVD Decrypter or whatever) and then ReJiging it. That way ill be able to pinpoint where the problem is...

If you can send me any problem clips that would be great mmgrover.

Cheers,
-Nic

DVDRFreak
26th October 2003, 01:10
@Nic

It's the engine I think. When you compress at high compression levels it happens to me also. Tested it on NARC. Used decryptor to rip first chapter compressed it at 77% it is Ok. Compressed it at 50% still it is Ok. Compressed it at 40% and the picture starts to go jumping around like it is in fast forward.

m1482
26th October 2003, 01:51
@Nic and DVDRFreak:

I discovered something...

First I demultiplex with VStrip and transcode again using 58 anf 70%. The problem persist!!! Then when I was concluding that the problem was with the transcoder I check the demux m2v file created by VStrip, and the problem begins there!!!

So, is the demuxing program use in Rejig the same or similar as VStrip???

dragongodz
26th October 2003, 04:21
just some thoughts following on from Int21's comments.

instead of tying variable requant to motion you could base it on original GOP size compared to average VBR for whole mpg/vob. that is if the original GOP is say 10% larger than the average then requant less than target value and if the GOP is 10% smaller than average requant a bit more. then use the values as a payback system to hit the target average.

this would need to be limited in payback amount to try and keep to target closely.asuming the original compression VBR ratios were based on quality for all motion etc this would help maintain quality with high motion scenes, especially using large compression amount.

Nic
26th October 2003, 09:18
@m1482: Well if you used normal mode (i.e. not IFO mode) then the demuxing is based on libmpeg2's demux code, which is supposedly flawless (along with VStrip which is also flawless?!). What is the name of that DVD, ill go buy it and look into it...

@DVDRFreak: Sounds like an integer is looping round or going negative when it shouldn't...looks like the ReQuant engine isn't flawless, i'd already patched little bits of it to make it less susceptible to errors (i.e. if you used it on neuron2's infamouse bitch.vob, it used to crash)

@dragongodz: Interesting points...which rises a question:

What is currently seen as the better/quickest way to determine the PSNR of two MPEG-2 clips? Running them through AviSynth? Because the difference in quality isn't that large i'll need to rely on increasing PSNR, rather than my eyes, to raise the quality, and make sure the changes I make actually improve the video etc
(I know PSNR isn't the best guide, but it is a rough easy well known one)

-Nic

int 21h
26th October 2003, 10:38
In regards to C++ version vs C version... here are my findings with a release build of the C++ version, a release build of Rejig, and the original executable provided by RB.

Release builds compiled with Intel Compiler 5.0


Test File - 67MB NTSC video file

requant (original) - 100% completed, 10 seconds, 6633 kb/sec.
requant (C++) - 100% completed, 5 seconds, 13267 kb/sec.


Test File - 407MB NTSC video file

requant (original) - 100% completed, 52 seconds, 7654 kb/sec.
requant (C++) - 100% completed, 28 seconds, 14215 kb/sec.
ReJig - 100% completed, 37 seconds


I didn't think of timing the 67MB file in Rejig until I started on the 407MB file.

DVDRFreak
26th October 2003, 10:53
Originally posted by int 21h
In regards to C++ version vs C version... here are my findings with a release build of the C++ version, a release build of Rejig, and the original executable provided by RB.

Release builds compiled with Intel Compiler 5.0


Test File - 67MB NTSC video file

requant (original) - 100% completed, 10 seconds, 6633 kb/sec.
requant (C++) - 100% completed, 5 seconds, 13267 kb/sec.


Test File - 407MB NTSC video file

requant (original) - 100% completed, 52 seconds, 7654 kb/sec.
requant (C++) - 100% completed, 28 seconds, 14215 kb/sec.
ReJig - 100% completed, 37 seconds


I didn't think of timing the 67MB file in Rejig until I started on the 407MB file.

I think you made a typo 52/28/37 seconds for a complete DVD is not possible. Speed of the C++ version looks promissing almost 50% faster then the original.

Nic
26th October 2003, 11:22
@int21: To do a fair test use the C++ source and enable and disable the the C++/C versions by changing which main function is run...the C source is the DVDRFreak version(using percentages)...and the C++ version is based on that. A problem with the C++ version is that it reports a different average bitrate to the C version even though they produce exactly the same file...didn't look into why.

The C++ version, which I spent a good hour or so converting, was slower in all tests, there is no reason for me to lie...seeing that I wasted my time creating the C++ version...

-Nic

ps
Just finished my code for converting sub streams to .sup files for use in IFOEdit...should be in the next release for tonight.

Logiqx
26th October 2003, 13:18
I'm not entirely sure whether this is a problem with ReJig (0.3b), DVD2AVI (1.77.3dg1.0.0rc2) or MPEG2DEC3 (1.77.3dg1.0.0) but somewhere along the line I seem to be gaining an extra frame of video in my test. It's not the most significant problem by any means but it is interesting as I'd expect no change at all.

I am using Minority Report (Region 2 - PAL) as a test and the original demuxed M2V shows 208899 frames in Bitrate Viewer. Also, loading the M2V into VirtualDub (1.5.7) via AviSynth+MPEG2DEC3 I can see the same number of frames (i.e. 208899).

After running the M2V through ReJig (reducing to 73%), Bitrate Viewer still reports 208899 frames but VirtualDub (via AviSynth+MPEG2DEC3) is showing 208900.

Does anyone have any ideas what is going on? I'm not completely sure whether it is ReJig or DVD2AVI/MPEG2DEC3 that is causing it. I can provide the D2V files if they are of any use in diagnosis.

Logiqx

int 21h
26th October 2003, 19:20
Originally posted by DVDRFreak
...I think you made a typo 52/28/37 seconds for a complete DVD is not possible...

I didn't typo... it was only a 407MB file...

int 21h
26th October 2003, 19:28
Originally posted by Nic
@int21: To do a fair test use the C++ source and enable and disable the the C++/C versions by changing which main function is run...the C source is the DVDRFreak version(using percentages)...and the C++ version is based on that. A problem with the C++ version is that it reports a different average bitrate to the C version even though they produce exactly the same file...didn't look into why.

The C++ version, which I spent a good hour or so converting, was slower in all tests, there is no reason for me to lie...seeing that I wasted my time creating the C++ version...

-Nic

ps
Just finished my code for converting sub streams to .sup files for use in IFOEdit...should be in the next release for tonight.

I wasn't saying you were lying, I was just curious :) You are right however, tested against the C source you included, its slower (Something like 12-15%?).


407MB NTSC Test File

100% completed, 35 seconds, 11372 kb/sec. (C++)

100% completed, 29 seconds, 13725 kb/sec. (C)

DVDRFreak
26th October 2003, 19:48
Originally posted by int 21h
I didn't typo... it was only a 407MB file...

I see now, sorry did not read correct.:o

RB
27th October 2003, 10:03
Originally posted by Nic
@DVDRFreak: Sounds like an integer is looping round or going negative when it shouldn't
Nic, maybe you want to review the ui64ToDouble() function I added to the original code. It looks OK to me, though.

I added it because at some points the code assigned a unsigned __int64 to a double and VC++ 6 does not support this conversion. IIRC newer versions can so you can probably get rid of the function.

Nic
27th October 2003, 12:25
@RB: Your ui64ToDouble() looks absolutely fine. However, have you got Service Pack 5 installed on your vc6 ? Because mine can go from unsigned __int64 -> double with no problems ? So ill remove your function and let vc6 do it for me, which might be slightly quicker...

RB
27th October 2003, 12:44
Yes, I've got SP5 installed. Maybe it's because I have only the Standard Edition.

digitalman
27th October 2003, 14:54
I know everybody knows this, or there wouldn't be ten pages of posts, but the results of this program are amazing. I like to put two movies per 1 DVD. So I have been setting the compression at 62-64%, and their is no pixellation, even on fast moving scenes. There may be some loss in color, but nothing the average layman would notice. I only had a class years ago in C++ for DOS, so I don't know how NIC and you guys do your magic, but whatever it is, keep it up.
Thanks to:
Makira for M2VRequantiser (on which the compression code is based)
DVDRFreak, RB, Int 21h, mmgrover, jsoto (AC3 Delay correction code), maven (VStrip),
Videolan.org (libdvdcss DVD Authentication)
And everyone else at Doom9.
-from NIC's readme file in the rejig.zip.

int 21h
27th October 2003, 15:22
Originally posted by Nic
@RB: Your ui64ToDouble() looks absolutely fine. However, have you got Service Pack 5 installed on your vc6 ? Because mine can go from unsigned __int64 -> double with no problems ? So ill remove your function and let vc6 do it for me, which might be slightly quicker...

Can you do that with both compilers? It seems to me when I'm compiling code for work, the Intel compiler is a little more relaxed on casting than the Microsoft compiler...

DVDRFreak
27th October 2003, 17:39
@Nic

Was testing the OO version and noticed something interesting. Used Rejig 0.3b and the OO version you made for requant. Compiled both without the conversion function ui64ToDouble().

Tested both on the first seen of NARC (700MB at 40%). The Rejig 0.3b version came out 284MB the OO version 302MB.

But now the interesting part. The Rejig version has the jumping fastforward problem. The OO version is working OK.

Edit:
Another thing is that the OO version will not compress the file more then 44%. If I choose anything lower it just comes out 44%. Maybe this is the difference.

Edit3:
Tested ReJig engine 0.3b / Requant original and both engines allows me to compress the video until a maximum of 39%. With the motion bug of course.

Edit2:
Performance related the OO version takes 90 seconds for 677MB compared to 83 seconds for the requant I compiled in the beginning.

Edit4:
Figured it out why the OO did not compress as much as the ReJig engine. Forget to enable option REMOVE_BYTE_STUFFING. Removed some compiler warning and enabling this option the time to comprees at 40% is now 86 seconds compared to 83 for my original release.
Only problem now the motion bug exists also in the OO version. So the bug is in the REMOVE_BYTE_STUFFING option.

The remove_byte_stuffing option is used for CBR streams since we are transcoding DVD's and most of them are VBR we should copile without this option.

Edit5/6:
Tried disabling the option and the quality realy sucks. So enabled it and enhanced check to check for 8 zero bytes instead of 6. Seems to work for NARC and the quality is much better again.

Disabling the option caused the first scene in NARC to be as blocky or even worse as the rest of the transcoders at 71%. Checking on 8 0 bytes solved the issue for the first scene. Need to do some more testing.

By the way enabling the option makes the OO code almost as fast as the C code 537 second OO code against 521 seconds C code for complete movie. So that is 3% this speed difference could be due to the fact that I now check for 8 zero bytes.

Nic
28th October 2003, 00:55
@DVDRFreak: Excellent work, that makes alot of sense. I'll look into that too. I only tested it once on a 2 minute file and they both outputted exactly the same file, so I assumed all was ok.Doh!
It will be great if that fixes the "jerky" bug (I havent been able to replicate it yet). Let me know of any progress or what you think should be changed :)

@int21h: Yup, that's with normal VC6 SP5 compiler, on my Athlon 1800xp it takes ages to compile with the intel compiler so for testing I always use vc6 (infact with the last version of ReJig released that was done with just vc6 as the intel one was taking too long ;) )

Cheers,
-Nic

DVDRFreak
28th October 2003, 01:11
Originally posted by Nic
@DVDRFreak: Excellent work, that makes alot of sense. I'll look into that too. I only tested it once on a 2 minute file and they both outputted exactly the same file, so I assumed all was ok.Doh!
It will be great if that fixes the "jerky" bug (I havent been able to replicate it yet). Let me know of any progress or what you think should be changed :)

Cheers,
-Nic

Will mail you my version of the OO code so you can take a look what I did change. The remove_byte_stuffing stuff is not very clear to me so I did a trial and error. Changed the number of 0 bytes to check before removing one 0 byte. Don't know if this works for all the movies it did for NARC.

int 21h
28th October 2003, 03:18
After profiling...

27% of CPU time is spent in Flush_Bits
21% of CPU time is spent in Put_Bits
10% of CPU time is spent in Refill_Bits
8% of CPU time is spent in putAC
6% of CPU time is spent in get_intra_block_B15

The rest is divided among the other functions...

What does this tell us? I interpet that to mean I/O is our main bottleneck here... I profiled running across both of my IDE channels with source/destination.

Comments?

Vapor
28th October 2003, 20:43
Just a quick test that might be handy, not IO or CPU related as far as I can see.

Rejig 0.3b - 70% ratio - ntsc/demuxed/stripped m2v from a dvd vob.
Test file: 834mb (15.1 mbytes/sec read)
Out file: 584mb (10.6 mbytes/sec write)
Time taken: 55 secs

Cpu usage: 30-33% (dual mp2900 - 50% = 1 whole cpu)
Source file on: 15000rpm scsi drive
Out file to: 2x10000rpm scsi drives (raid0)

Normal disk transfers (read/writing scenario as above) are usually around 50mbytes/sec sustained.

Great tool btw, keep up the good work.

PurpleMan
28th October 2003, 21:22
Dear NIC

For this software to be efficiently used for DVD backup purposes, there is a very important feature that noone has mentioned yet.
When inputting a VOB file, have the program list the VOBID/CELLID's inside of it (you can use vstrip sourcecodes I believe) and make it possible to transcode just a single cell or ID. Or rather, the ability to specify a different compression ratio for each CELL/ID.

If you do that, we can practically write a new DVD Shrink (easily too).

I'm here if you have any questions regarding my suggestion and/or future development of the abovementioned.

PurpleMan

int 21h
28th October 2003, 23:42
Originally posted by Vapor
Just a quick test that might be handy, not IO or CPU related as far as I can see.

Rejig 0.3b - 70% ratio - ntsc/demuxed/stripped m2v from a dvd vob.
Test file: 834mb (15.1 mbytes/sec read)
Out file: 584mb (10.6 mbytes/sec write)
Time taken: 55 secs

Cpu usage: 30-33% (dual mp2900 - 50% = 1 whole cpu)
Source file on: 15000rpm scsi drive
Out file to: 2x10000rpm scsi drives (raid0)

Normal disk transfers (read/writing scenario as above) are usually around 50mbytes/sec sustained.

Great tool btw, keep up the good work.

I get 13 mbytes per second using IDE, so it seems to me the actual I/O processes themselves are where the bottleneck is, not the devices, I should have made that more clear, sorry.

DVDRFreak
29th October 2003, 00:42
@INT 21h
Thanks for the profiling. I modified the code a little (changed the refill function so it will do the while loops) and now it performs better the my original compiled requant C code. Will see if I can do the same without the while loop.

I have now as results:

Test file 5.12 Gb at 71%.

Original C code 521 seconds.
Untuned OO code 540 seconds.
Tuned OO code 517 seconds (including jumping fix).

int 21h
29th October 2003, 02:27
@DVDRFreak:

Can you post the modified oO Refill_Bits function? I'm messing with changes also, so I'd like to make sure I'm on the same page.

int 21h
29th October 2003, 02:33
Also, I'm considering changing the macros to functions because the profiler will not report their time (due to the nature of macros).

DVDRFreak
29th October 2003, 07:51
Jup I can I changed it like this:



void CReQuant::Refill_bits(uint n)
{
assert((rbuf - cbuf) >= 1);
while (n > inbitcnt)
{
inbitbuf |= cbuf[0] << (24 - inbitcnt);
inbitcnt += 8;
SEEKR(1)
}
}

void CReQuant::Flush_Bits(uint n)
{
assert(inbitcnt >= n);

inbitbuf <<= n;
inbitcnt -= n;

assert( (!n) || ((n>0) && !(inbitbuf & 0x1)) );

if (unlikely(inbitcnt < 24)) Refill_bits(24);
}




In the main loop I changed
Refill_bits()
Refill_bits()
Refill_bits()
Refill_bits()

to

Refill_bits(32)


Changing the macro's to functions/procedures will proberly degrade performance because it will get the overhead of calling a procedure/function. But you could do it for profiling purposes of course and see what happens.

TheJez
29th October 2003, 11:11
With this profiling you will know where to gain the speed ! You might even consider changing the bits that consume the most runtime to assembly code. I don't know how efficient the compiler that you are using is, but generally things can be done (much?) more efficient in assembly.

Unfortunately I am not able to help you out with the programming, but I support your efforts and follow this thread with great interest ! Keep up the good work !

The Jez

Nic
29th October 2003, 12:09
I already did quite a bit of profiling on this using AMD's CodeAnalyst (I really like that for profiling...). The functions can't be increased much by Assembly, but some could be done.

@PurpleMan: Thanks for the info, yup that should be easy to implement, Ill probably only do it for the IFO mode (because things are easier that way ;) is that going to be Ok?).
@all: Please point these things out to me, because I've not authored a DVD before and may miss even the very obvious.

@int21h & DVDRFreak: Keep up the good work...my office keep calling me and I had to go into work yesterday, so haven't made the progress I would like, but should be able to work on it today. There's no rest for the wicked... ;)

timecop
29th October 2003, 12:28
Wow!
A .ts demuxer!
Is it fast?
Faster than TSDemux?
What the freaking hell is it with this program being overrun by pirates using it to copy DVDs?
I want to use it to demux .ts files into m2v + aac audio.
But when I load my .ts files, it only shows the video PID.
Where's the audio PID?

Oh hell half the time (er, 1 out of 10 files I tried it on)
it doesnt even find the video PID.
blah.
I guess I stick with tsdemux

Nic
29th October 2003, 12:57
Cut out a bit of a TS stream and send it to me & ill fix the code to show your PIDs. Also it probably isn't showing the AAC audio, because Im not detecting it ;) I've only got one .ts file to test with...your lucky it worked at all ;)

timecop
29th October 2003, 13:08
Originally posted by Nic
Cut out a bit of a TS stream and send it to me & ill fix the code to show your PIDs. Also it probably isn't showing the AAC audio, because Im not detecting it ;) I've only got one .ts file to test with...your lucky it worked at all ;)

Hm, tempting.
I'll bring some sample streams with me tomorrow to work and pm you a url with that. Or perhaps I should just be unlazy, look at the source, and see how you are demuxing it and fix it, but hah, that would actually mean working.
I'll get back to you with a bunch of sample streams.

int 21h
29th October 2003, 16:45
Thanks DVDRFreak.

Does anyone know what the purpose of this is?


#define likely(x) (x)
#define unlikely(x) (x)

unixfs
29th October 2003, 17:02
Originally posted by Nic
Cut out a bit of a TS stream and send it to me & ill fix the code to show your PIDs. Also it probably isn't showing the AAC audio, because Im not detecting it ;) I've only got one .ts file to test with...your lucky it worked at all ;)

Nic,
sometimes AAC in TS shows as MPA layer-4
(in the first 2 bytes of the PES payload you will find
0xfff[89] (layer bits are set to 00)).

Nic
29th October 2003, 18:32
@unifxs: Interesting...I hate these minor workarounds/hacks used with MPEG streams broadcasters do, the BBC do weird things also...

@int21h: They were specific to the Apple version and for the compiler. Those #defines you posted do nothing, it's the same as if they didn't have the likely/unlikely macro around the code...it's just there so the likely/unlikely commands didn't need to be added everytime for the Apple compile.

DVDRFreak
29th October 2003, 18:35
Originally posted by int 21h
Thanks DVDRFreak.

Does anyone know what the purpose of this is?


#define likely(x) (x)
#define unlikely(x) (x)


It's for the GCC compiler in the original it looks like this:


// gcc
#ifdef HAVE_BUILTIN_EXPECT
#define likely(x) __builtin_expect ((x) != 0, 1)
#define unlikely(x) __builtin_expect ((x) != 0, 0)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif

unixfs
29th October 2003, 18:36
Originally posted by Nic
@unifxs: Interesting...I hate these minor workarounds/hacks used with MPEG streams broadcasters do, the BBC do weird things also...


Me too, but the worst thing is that these hacks are part of the
AAC standard (ADTS syntax) :(

crimson
30th October 2003, 23:42
Thanks for the helpful program.

I have one problem with it -- when I transcode my mpg2 file, the audio is split off separately and I cannot remux it together with the transcoded file. I have tried every program I could think of (TMPG, M2, DVTOOLS, etc.) and it always gives me illegal mpg stream on the transcoded m2v file.

Any suggestions for different remux programs that work or is there any way to have Rejig not strip off the audio?

int 21h
30th October 2003, 23:52
I have successfully tested remuxxing with IfoEdit version 0.6 (available at the IfoEdit website)

E-Male
31st October 2003, 09:36
after reading along for soem time, i decided to post aswell:

GREAT WORK

i started a little test comparing the quality (and speed *g*) to CCE
my first test with "Das Boot" (superbit, bar scene) impressed me quite a bit

keep up the good work

I'll soon release some results of further tests

CU
E-Male

digitalman
31st October 2003, 16:49
Crimson,
Is this MPEG file from a commercially produced DVD? Like a blockbuster movie? If it is, someone had similar issues when trying to author a DVD with a ReJig or Requantizer file. The post is here:
http://www.mmbforums.com/modules.php?name=Forums&file=viewtopic&t=2378&start=0&postdays=0&postorder=asc&highlight=

crimson
31st October 2003, 18:07
Not a commercial DVD mpeg. It's pulled from my ReplayTV unit and these types of units are known for weird MPEG2 formats. I can't get IFOedit to work on remuxing without having any VOB, IFO, or BUP files. I'll take another look at IFOedit and see what I can do. Thanks.

mrbass
31st October 2003, 20:42
Originally posted by crimson
Not a commercial DVD mpeg. It's pulled from my ReplayTV unit and these types of units are known for weird MPEG2 formats.

go read http://www.mmbforums.com/modules.php?name=Forums DVDLab forums which discussed TIVO, ReplayTV mpeg issues in great length. I think Oscar implemented some workarounds with DVDLab as far as remuxing them, etc.

mmgrover
31st October 2003, 23:34
Just Curious, what ver we at?

mike

Nic
1st November 2003, 00:18
Even I can't remember, sorry for the lack of updates...Got the flu...sat here shivering crazily. Got most of the IFO parsing code done. (You can select Chapters/Vob-ID/Cells, select multiple streams at the same time, etc etc). Once finished that I begin work on the rate control :)

-Nic

mmgrover
1st November 2003, 01:04
@nic

Sorry to hear about the flu :-( I just got over it myself!
Can I download this anywhere?
Curious to check it out...

mike

horseflesh
1st November 2003, 05:13
This is pretty exciting, I need a tool that will drop the bitrate on my out-of-dvd-spec MPG2s.

Because I am new to authoring, I am not sure what to do next though. None of the guides out there seem to have me in mind.

Start with: weird high-bitrate MPG2
Rejig to DVD-friendly MPG2 in M2V format
Then... ?

I hit Demux to give me the MPA file too, but what's next?

I have Nero but I can't get it to recognize the MPA and M2V files properly. It just wants to put them in the root of the DVD-video image.

Thanks!

jhmac
1st November 2003, 05:49
I too, would like to see a guide or a brief "How To" on using this. I haven't had any luck with it but it is probably because I am not using it correctly... Any help would be appreciated!

Nic
1st November 2003, 11:30
@mmgrover: Thanks...feeling a little better today...Ill try and put up a version today, it won't be fully working, but you'll see what I've been upto at least :)

@Horseflesh: Get IFO-Edit and you can reauthor with that, it's pretty straightforward and should work fine. Doom9 even has a guide on using it.

@jhmac: Will be a little while before documentation is done. If you've got any specific questions, ask away :)

-Nic

jhmac
1st November 2003, 11:47
OK when you demux a mpg file shouldn't you have a .mpa, and .mpv after demuxing? I always get just one so I have to run the process again.

should you only compress the .mpv or can you compress the .mpg with out demux.

Can rejig also mux in future release or do you recommend another program.

E-Male
1st November 2003, 12:30
Made another test:
Fightclub RC1 at 64% (enough to put it on a DVDR with only the English 5.1 audio)
---------------------------------
perfect result & impressive speed
---------------------------------
I'm really starting to like this a lot
and i could imagine some interesting way to use this code [GPL rules!!]

i'll post more when i'm less tired

CU

E-Male
1st November 2003, 18:46
REQUEST:

could a program be made that "looks like" docce4u, but instead of cce uses this transcoder or it's code?

so it could be tested in full backups with the big 3 or with numenu4u or other tools using docce4u

thx a lot in advance
E-Male

daxab
1st November 2003, 23:46
It seems like people are successfully using ReJig (very, very cool) in two ways:

1. IFOEdit only, with remuxing of the video stream.

2. DoItFast4U.

Can someone post a quick step-by-step HOWTO for both these approaches? It's also a little confusing as to what you can keep -- subs, angles, etc. -- and what you lose with each approach. Also, is menu compression possible?

darkseid
2nd November 2003, 01:39
I think a simple how to guide of how us noobs who have been following this thread with interest (and coders bewilderment).
Can somehow use rejig (which is fast with good quality) can perform a full backup of a DVD 9 to DVD 5

mmgrover
2nd November 2003, 03:04
Just Load the CCEData.txt file with rejig and recompress :-)
(Pick a desired compresion level)
Folow all other steps as usual with the big 3.

Oh, I put a version of rijig on a site here that has my last
CCEData.txt parser change. nic, If you want me to remove offered down load, let me know.

http://rejig.mmgrover.com

mike

mmgrover
2nd November 2003, 04:23
@E-Male

I've been pondering the idea of dll version of rejig with
a callback function for the transcode progress.
Nic, this could allow it to be used very easily in other
Apps? What ya think?

mike

Nic
2nd November 2003, 10:50
@mmgrover: Cool :) I meant to release a new build last night, but still ill, fell asleep early. I did right the commandline code into ReJig so people could use it from other apps even easier than a DLL. But there's been no interest in it so far...

@darkseid: If I finish the changes I've made soon, IFO Mode should make backing up DVDs a lot easier and obvious, and hopefully that will be the main mode for DVD backup.

-Nic

E-Male
2nd November 2003, 13:23
if teh program itself does all the job thats of course fien with me
but integration with the known tools, just replacing CCE, would be great

I think many people would agree, if they knew this thread :)

echooff
2nd November 2003, 14:55
@Nic

Hope you feel better soon. Love ReJig.

Nocturno
3rd November 2003, 00:26
Great work guys,

i'm certainly interested in either commandline or dll.
like many others i like to make my own gui's for this kind of stuff,so commandline/dll versions are always appreciated. :p

Eyes`Only
3rd November 2003, 03:14
I've found this app (thanks E-Male) and will be integrating it shortly into DoItFast4U! (thanks Nic!)

Eyes`Only
3rd November 2003, 06:53
After Phase I integration and some testing by myself as well as others, we've determined the app is almost useable with Big3 in it's current state. The problem is that it seems to be ignoring the bitrates in the ccedata.txt file and just using 70% for everything, which will obviously create oversized dvdrs. Can we get this fixed? Optimum behavior would be to determine the % by analysis of the video file and the bitrate, but even if it would accept different % for each file that would help. 70% across the board isn't workable, for obvious reasons.

The Big3 method and it's calculations gets closer to it's target size on a regular basis than ANY one-button app does, though some are finally getting close. The ability to keep this accuracy is highly important!

JvD
3rd November 2003, 08:40
Originally posted by mmgrover
Just Load the CCEData.txt file with rejig and recompress :-)
(Pick a desired compresion level)
Folow all other steps as usual with the big 3.

Oh, I put a version of rijig on a site here that has my last
CCEData.txt parser change. nic, If you want me to remove offered down load, let me know.

http://rejig.mmgrover.com

mike

This file givs me an error asking for "MFC70.DLL". Is it me or the file? Whar revision of Rejig is available?

If I would like to integrate this app into the Big 3, what parts and where do i change my standard process.

Eyes`Only
3rd November 2003, 08:44
JvD: I'm trying to do this for you all but the ccedata files are being encoded at 70% which won't give you dvdr size. With Nic's help we can hopefully get thru that issue. Use Nic's build if you dont want that VC7 error stuff. Newer VC compilers require users to install extra crap! I thought you could statically compile the dlls with VC7 though...

MedicineMan
3rd November 2003, 09:32
Great. Now that Eyes`Only is working on integrating Rejig into the Big 3, we'll soon have a fully working and freeware (well, almost; we still need Scenarist) solution to our backups.

And it will solve my problem of not being able to get DoCCE4U to work with the Big3.


Keep the good work. We all in this board will be glad to help and test whatever you want.


Sincerely


MM

Rombaldi
3rd November 2003, 09:47
Please don't forget the 'plain' M2V stream processing! I've been using the heck out of this on making discs of old TV I'm archiving.. being able to give a light 'squeeze' on the M2V streams before authoring is worth it's weight in GOLD!

Eyes`Only
3rd November 2003, 09:49
What do you mean, "forget it"? Doesn't it already work?

Eyes`Only
3rd November 2003, 10:01
Nic:

Found another issue. For NTSC m2v files that don't need pulldown afterwards, the filename structure is *.nopull.avs. Inside the AVS, the actual d2v/m2v file is *.m2v though. Rejig is looking for *.nopull.m2v for some reason, and skipping all nopull files, causing NTSC to severely fail.

mmgrover: I saw that your version DOES compensate for the nopull files (thanks!), but since it's making everyone find a vc7 dll, I can't really use it for integration yet (I don't like to require my users to use framework or external dlls, can't it be compiled with the dll static?). Tried to compile it myself with MSVC6 so ppl could use it but kept getting, "H:\rejigmm\IFOModeDlg.cpp(332) : error C2520: conversion from unsigned __int64 to double not implemented, use signed __int64". I read earlier that RB made a function to fix this, but I'm not sure how to implement it, and it's too late so I gotta get to bed. :( I'll delve further into the fix tommorrow, if there's no way to compile VC7 dlls static.

It's still not doing anything with the bitrates from the ccedata.txt file is it? I couldn't find any code that led me to believe it was. When you are doing the big3 method, aren't your dvdrs coming out oversized? Normal bitrate for extras is around 1850, which results in a file about 35% of the original. I'm not sure what that would look like transcoded, I'm assuming it would look terrible, but I'd at least like to get this all implemented so I can confirm or displace my fears. :)

Nic
3rd November 2003, 11:32
@Eyes: mmgrover's code is in my version at home, want to get a version of the ifo parsing working and finished before releasing. There is no real bitrate control as yet, that's next on my list. Probably best for you, if you want to that is, get involved after that's implemented.
I use VC6 at home, and going from unsigned __int64 to double doesn't cause me issue, but RB's function does it well (can be found in RequantEngine.cpp I think). I'm slowly getting over the flu, so ill release a new build soon :)
Shout me if you've got any questions or anything I should implement I haven't thought of :)

-Nic

Wilbert
3rd November 2003, 13:22
Do you still need a sample of a ts containing an AAC stream (for demuxing it)? Or is it already capable of doing this?

mmgrover
3rd November 2003, 13:37
I put the visual studio run time library's on web page.
Sorry, I forgot about that...

http://rejig.mmgrover.com/vs7runtime.zip

I had put file's there temporarly be cause nic was sick :-(
(Hope you are feeling better :-) )



But I can leave other builds there if nic wants me to?


mike

TEB
3rd November 2003, 13:56
Awsome app. It reminds me of the RT hardware from TandbergTV and Scientific Atlanta are doing in RT transrating domain. (as its called in the DVB/ATSC sattellite area) A full transcoding is way to expensive still in RT.
Anyway ive tested many of my SPTS test streams (single program transport streams) and not one of them could be read or demuxed by rejig, or dvd2avi either (nics version)..(just sent ya a email Nic)

A open question: Is it possible in this process to change from VBR to CBR? Say change from a mpeg2 dvd-constrained mpeg2 to a 6mbit cbr stream. In such a process AFAIK transrating should be enough since the bitrate reduction isnt that large from dvd quality to 6mbit. But where the crossline is for going down to a full transcode is i dunno...
Ill test with procoder later to check vs rejig.

best regards teb

digitalman
3rd November 2003, 14:26
Originally posted by Rombaldi
Please don't forget the 'plain' M2V stream processing! I've been using the heck out of this on making discs of old TV I'm archiving.. being able to give a light 'squeeze' on the M2V streams before authoring is worth it's weight in GOLD!

Yeah!! Don't forget about the single .m2v file encoding. Keep on improving the transcoder aspect of Rejig or Requant. Thanks!!!!

timecop
3rd November 2003, 14:28
Originally posted by Eyes`Only
JvD: I'm trying to do this for you all but the ccedata files are being encoded at 70% which won't give you dvdr size. With Nic's help we can hopefully get thru that issue. Use Nic's build if you dont want that VC7 error stuff. Newer VC compilers require users to install extra crap! I thought you could statically compile the dlls with VC7 though...

yeah, great.
another free and simple tool taken over by the pirates, useless features added, just wait until bug reports for non-dvd pirating related bugs will start getting ignored, and then integrate this into another one of your one-click apps, and boom, another useful project down the drain.

For what I was going to use it for, I dont need ifo editing, dvd pirating decss library, reading vob files, er whatever other things that got added.

And it still doesn't properly demux .ts with mpeg2 + AAC

E-Male
3rd November 2003, 16:07
well, there always is someone that complains... no comment on that

IMO there are 3 main targets now [anyone correct me if i missed something ]
-the standalone m2v tarnscoder tool [we already have it, but there still can be some improvements]
-the dvd backup tool [Nic's current work clearly leads there]
-better integration [replacing CCE in DIF4U, NM4U and other tools, hope Nic and Eye's Only can fix the problems there]

lookign forward to what evoluting here, curiously watching this thread...

CU
E-Male

mmgrover
3rd November 2003, 16:13
I tried to link with static libs, But both VC6 and VC7 on my maching didn't like the libdvdcss.lib using static linking :-( and I don't have code for this.

mike

Nic
3rd November 2003, 16:25
@mmgrover: It's from videolan.org, you can download the source for libdvdcss from there :)

@timecop: Well as I said, until you came along, I only had access to one transport stream file. So my motivations for transport stream code isn't as high as yours...also remember at the top of the forum the title is:
"Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion."
Not everyone here is a pirate, and in your e-mail it sounded like you were quite capable of helping with the coding but couldn't be bothered. Didn't motivate me much. But I will eventually add full .ts support and thanks for the clips you offered.
(also thanks TEB for the email and offer of clips :) )

-Nic

mmgrover
3rd November 2003, 17:16
@nic

Would you by any chance have the VC6 project file for that?

mike

Eyes`Only
3rd November 2003, 17:40
timecop PM'd me in Doom9 with a quite hateful and foulmouthed message. Using the word f***<something> over and over doesn't really show me intelligence, BTW...

Great! My alternative was to calculate percentages, then call rejig one file at a time, but use of the ccedata.txt in a more complete fashion is a much more preferred solution than calling multiple instances of Rejig, IMHO.

echooff
3rd November 2003, 17:49
@Nic


Not everyone here is a pirate, and in your e-mail it sounded like you were quite capable of helping with the coding but couldn't be bothered. Didn't motivate me much.


Don't let it get you down. I can't do any of the coding stuff, but if I could , I would. I will, however, stand on my head and bounce up and down if you think it would help. :D :D :D Jsut a little lighthearted humor. The thread seems to be taking a ugly turn. I sure hope not. I am following this thread with great interest.

Rombaldi
3rd November 2003, 18:07
Originally posted by Eyes`Only
What do you mean, "forget it"? Doesn't it already work?

I meant 'don't forget to keep that feature in' as the transcoding quality improvements are added (grin)... Didn't want it to get lost in the wonders that the IFO parsing and other things that are being added (which are GOOD.. no arguement there).

Just sticking my head up as a reminder :D :D :D

Eyes`Only
3rd November 2003, 18:09
I figured that, but then again I was thinking, "What programmer ever removes a useful feature?" hehehe. I don't think you have to worry about this tool remaining multi-functional, bud.

Nic: forgot to add, "Get Well Soon!" :P

mmgrover
3rd November 2003, 18:18
@Eyes`Only

I been noticing another issue, The smaller the file size,
the less accurate the percentage is with ReJig.
I'm still looking at code to figure this out.


mike

for instance a just ReJigged a file that was
258,215,145 bytes and selected 50%.

File ended up 143,164,986 bytes.

Should of been closer to 129,107,572 bytes

It ended up being 55.4%

mike

Doom9
3rd November 2003, 19:21
@timecop: the great thing about the GPL is that at any point you can fork of your own branch and take it into any direction you want. Thus the only answer you'll get from open source developers when complaining about the direction a project is going in, is "so fire up Emacs and get coding if you want to change something" ;)
Quite obviously, the audience has a large influence on where tools are going. You may have noticed that we've established a number of non DVD related forums in the past few months, but so far the DVD crown is still in the large majority. If you're not into coding, maybe you could invest your energy in bringing people here and helping them out (the quality of help you'll get in a forum is a big factor to attracting people), so that the digi TV crowd will eventually have more influence here. Unfortunately, the TV we have at home can only be used to watch DVDs and VHS tapes because there's no cable and we don't have a satellite (and terrestrial TV is useless around here), so I don't have the resources to actually delve into the subject myself and help attract that crowd by writing a couple of guides.

Rombaldi
3rd November 2003, 19:54
Originally posted by Eyes`Only
I figured that, but then again I was thinking, "What programmer ever removes a useful feature?" hehehe.

Haven't worked with many Microsoft products have you :D :D :D :devil:

For what it's worth, I have a (tiny) wishlist in regards to the M2V stream transcoding....

1) drag/drop or open multiple files to the program as 'multiple files' not the file1+file2+file3 way it goes now (the effect may be the same but confused my brain :D ).

2) be able to set EITHER the compression percentage OR the desired output size and let it calculate the other value (ie, if I have a 1845mb file and want the final size to be 1700mb then all I do is enter 1700 and it shows the compression factor of 92% OR I can enter 95% and it shows a compressed size of 1752mb. Obviously if the file need to be demuxed, you can't [easily] set the output size in MB rather than % unless you did it in two passes, one to get the size of the M2V data and extract and the second one to actually ReJig/Demux the file... then again if the possibility of a two-pass ReJig to improve the quality happens, then that's easier to do..

3) being able to set a different compression factor/size on different files easily... the 'Jigger Stack' looking like this -



File Name Input Size Output Size %
--------- ---------- ----------- --
file 1 1845 1700 92
file 2 1845 1752 95



I hope that made sense :confused:

E-Male
3rd November 2003, 20:00
to add one thing: besize percentage and size, also the desired avarage framerate should be a posibilty to enter
hope Nic and the others don't get flooted with feature-requests to much, as this code is getting more and more interest

mmgrover
3rd November 2003, 21:44
Well, I'm proud of what nic and others have done with this program!
So, I bought a domain for it:

www.rejig.org

I'll set it up on the webserver when I get home....


mike

ps: nic, if you have no problem with this, I can post version updates, news, source code, etc etc...

on this site.

mike

E-Male
3rd November 2003, 23:35
nice :)

lighty
4th November 2003, 00:09
oh boy, oh boy, oh boy - I can hardly wait for more advanced feats... :) :) :)

mmgrover
4th November 2003, 00:33
www.rejig.org is up now :-)


mike

Eyes`Only
4th November 2003, 00:38
Nice! You have the downloads switched though.. the source download links to the compiled .exe and vice-versa :P

mmgrover
4th November 2003, 00:45
oops, I fixed it

mike

E-Male
4th November 2003, 01:17
things are taking shape

would it be ok (copyright-wise) to put up a (very) short clip from a DVD plus some transcoded versions, to show how goo´d ReJig looks with certain sources and transcoding-precentages? (also compared to CCE)
if yes i'd volunteer to do some samples

mmgrover
4th November 2003, 01:36
Ok, there's a links page with a couple of plugs, hehehehe

mike

robshot
4th November 2003, 02:21
Hiya all,
greetings,

to: nic and all the good guys :)

great transcoder!
just tested it with a pal anamorphic dvb episode of Alias (mpg), at 4mbps. setting at 80% yields 706mb from the 990mb original file. and in garden/trees scenes, which should be difficult scenes, it still have nice result. haven't done much test, just this initial testing, and yes, with the combination of speed and quality, hands down all, the next best thing :)

sorry for no technical input, just haven't got enough tests.

cheers,

ps. has any progress achieved for .ts file transcoding? is it really "scary" to open the door for resizing? say, from HD to 720xPAL/NTSC of SD size?

dragongodz
4th November 2003, 03:58
mmgrover - more accuracy should come with measuring CompressionDone compared to CompressionWanted with monitored rate control. that is you measure how much has been done as you go and if it is either not enough or too much you adjust following compression to make it up.

this type of function is essential if the variable compression with payback is used such as i mentioned earlier.

nic - if you are interested in my opinion on that and how it should be implamented in the future let me know.

int 21h
4th November 2003, 04:43
Originally posted by E-Male
things are taking shape

would it be ok (copyright-wise) to put up a (very) short clip from a DVD plus some transcoded versions, to show how goo´d ReJig looks with certain sources and transcoding-precentages? (also compared to CCE)
if yes i'd volunteer to do some samples

No, it wouldn't be ok... at least in the United States... but you could use movies from www.archive.org...

mrbass
4th November 2003, 06:18
Originally posted by Nic
[
Edit8: By the way, ill make a little GUI for Requant and make it so it can accept PS/TS/ES Streams as well (although it will only output ES) [/B]

MPEG-2 Streams
PS = Program Stream
ES = Elementary Stream
TS = Transport Stream

I was kinda not exactly following along when when people began discussing TS but now I understand. Here's a nice explantion PDF http://www.ismc.nima.mil/vwg/RP_0101_MPEG-2_Streams.pdf

jhmac
4th November 2003, 06:50
Why is there a link to DoItFast4U on the site?

E-Male
4th November 2003, 06:57
why shouldn't it be on the "links" site

mikegun
4th November 2003, 06:59
hi,

just downloaded rejig. I cannot add files. pressing the "add" button will open
another dialog. pressing add again and nothing happens :(
I'm sure this worked already with an older version !

regds.

mikegun

jhmac
4th November 2003, 07:25
@e-male
What does it have to do with Rejig?

E-Male
4th November 2003, 07:40
it's planed to use rejig with DIF4U instead of CCE

jhmac
4th November 2003, 07:58
A shameless plug for software that doesn't support Rejig yet, but no mention of the original author of the Requant software? I think none of this would be possible without the original code!!!

Eyes`Only
4th November 2003, 08:06
Wow, what's with the hostility?

I for one appreciate the mention, but I also agree there should be more links there (Nic's homepage, etc), and I'm sure the author will get to it in time.

Shameless? Well, yeah. Why would there be shame? ;)

jhmac
4th November 2003, 08:12
Oh well just my 2 cents... Back to the topic...

E-Male
4th November 2003, 11:03
Originally posted by jhmac
Back to the topic...
first usefull words today

mikegun
4th November 2003, 13:59
hi,

is my problem mentioned before related to the vb runtime files ?
if so, how do I correctly install them on my system (win98se) ?

rgds.

mikegun

mmgrover
4th November 2003, 14:07
Wow, I goto bed, get up and the sparks fly, ok, so they did't fly...

I added the DoItFast4U link because I currently use it with rejig :-)
Open up the ccedata.txt file pick my desired compression levels, and
wala, Resume with the rest of the big 3 :-)

@mikegun Did you click "Done" after you selected your video files to
close out the Add Dialog?

mike


ps: I am waiting for nic to get better so I can find out the
history of this product to give credit where credit is due...


mike

I plan to add some guides today :-)

mikegun
4th November 2003, 14:16
hi,

pressing "add" just opens another empty window with another "add" button. pressing this button again and nothing happens ?!

rgds.

mikegun

mmgrover
4th November 2003, 14:37
I started the first guide, I hav't resized the images or added text yet, But it should help newbies get started :-)

mike

mmgrover
4th November 2003, 15:58
I update the beginner's guide :-)
Please give me some feed back before I work on the others.

Added Nic's Home page to links page.
Added ReAuthorist to Links page.


I would like to add a "Coming features" page, just not sure what they are?


mike


Hope Nic is ok? Havn't heard from him in a bit...

mmgrover
4th November 2003, 17:13
I created a Windows Installer Setup Version that contains runtime files and is downloadable from Web Site.
(it contains the merge modules for Visual Studio 7)


mike

mikegun
4th November 2003, 17:29
hi,

I tried the installer (couldn't choose folder for installation).
selected typical then. still can not add files :(

rgds.

mikegun

mmgrover
4th November 2003, 17:40
List off what steps you are taking.

What is your OS, and Size of video file?

Nic
4th November 2003, 17:40
(I'm still alive and kicking and reading thru the posts, just busy with work :( )

mmgrover
4th November 2003, 17:42
@nic
Glad to hear that :-)
What are your feelings on web site?
(Let's face it, this is pretty much your baby!)


mike

mikegun
4th November 2003, 17:47
Originally posted by mmgrover
List off what steps you are taking.

What is your OS, and Size of video file?

My OS is 98se.
1) start rejig
2) klick "add"
3) a window/dialog comes up, "add file's" on top. top right I click "add" nothing happens...

mikegun

mmgrover
4th November 2003, 17:49
Sounds like he is not getting the File Open Dialog from the windows Common Controls...

let me look at code there...

mmgrover
4th November 2003, 18:59
@mikegun

download the Installer or the zipped exe and give it a try now :-)


mike


@nic

I forced the file open dialog to version 4 with
dlg.m_pOFN->lStructSize = OPENFILENAME_SIZE_VERSION_400;
in AddDlg.cpp

mikegun
4th November 2003, 19:07
hi,

thanks a lot for the fast response. it is working now :-)

regards,

mikegun

JvD
4th November 2003, 21:21
OK, tried using the DoItFast4U, ReAuthorist and Scenarist to make a movie. Followed the same steps I use to do when I use the "Big 3" but let Rejig do the encoding. Load the CCEdata.txt file in Rejig and get my files there, encode each on eof them and then started ReAuthorist ond pick the working directory. First, I miss one of the PGCs. Why? But hell, i was just going to try so i when on with reauthoring. Loaded the .scp-file created. After a while (when everything seems ready) I just go to layout tab (i think) and fired Scenarist away. Here is my dead end. I get Scenarist error saying something about layput bla bla bla. I doesnt even start author my dvd-files :-( Whats the trick? How do I do? What do I have to do DIFFERENT?

(Ill be back with some more specific info)

mmgrover
4th November 2003, 21:32
@JVD

what was the Scenarist error?
Earlier versions of rejig would miss the last file, what version
you have?

In scenarist, if a video file is missing, you will need to creat it
and select "PlaceHolder->data"



mike

JvD
4th November 2003, 22:15
Sorry, i deleted all files. Trying again right now. Using the latest Rejig from rejig.org. If I get the same error msg Ill be back!
In ReAuthorist I can switch between the different Title Sets, how do I get Scenarist to do both VTS01 (movie) and VTS02 (som extras)? I can only pick VTS01 and then "Author it".

This is the error mesg: http://www.morck.se/scenarist_error.jpg

mmgrover
4th November 2003, 22:18
@JvD
Did you load the import script for a single titleset or the whole scenarist project?

I will try to make a quick guide for the complete proces when I get
home tonight...


mike

mmgrover
4th November 2003, 22:28
@JvD

Error is because when scenarist imported the script, the video
files were not available, so it put in place holders

You were missing video for Program Chain 1 TitleSet 1, and
video for Program Chains 2,4,5 for Title Set 2.


mike

JvD
4th November 2003, 22:33
So, what shall I do? *feels like helpless noob* Can i correct this?

mmgrover
4th November 2003, 22:47
Post what's in your CCEData.txt file

JvD
4th November 2003, 22:49
"C:\DVD_BACKUP\VTS01\VTS__01_P01.16~9_1.AVS",0,9608,4911,0,3
"C:\DVD_BACKUP\VTS02\VTS__02_P02.4~3_1.AVS",0,9608,1850,0,3
"C:\DVD_BACKUP\VTS02\VTS__02_P04.4~3_1.AVS",0,9608,1850,0,3
"C:\DVD_BACKUP\VTS02\VTS__02_P05.4~3_1.AVS",0,9608,1850,0,3

mmgrover
4th November 2003, 22:57
Did you click the "Re-Compress All" button, and
did all the Jobs go from "[NOT DONE]" to "[SUCCESS]" ?


ReJig Should be creating 4 files:

VTS__01_P01.16~9_1.mpv.m2v
VTS__02_P02.4~3_1.mpv.m2v
VTS__02_P04.4~3_1.mpv.m2v
VTS__02_P05.4~3_1.mpv.m2v


mike

JvD
4th November 2003, 23:24
I did one file at the time but all were seccessfulle created, the name of the files are as you say and they are placed in each VTS01 and VTS02 folders. http://www.morck.se/folder.jpg

I see now that there is two .p2v-files. The original and the rejiged one. Should I remov the original?

This is what Scenarist says:

Info
Info Creating DVD Files
Error The track<VTS_01_PGC_01> has place holder.
Error The track<VTS_02_PGC_02> has place holder.
Error The track<VTS_02_PGC_04> has place holder.
Error The track<VTS_02_PGC_05> has place holder.
Error PreCheck From DB failed
Error DVD files could not be created

WHat shall I do?

In the ReAuthorist.SCP I see that .mpv files are requested. Am I stupid or should it be like that? My files are m2v.

mmgrover
4th November 2003, 23:40
Ok, now that we know the files are there, Are You reimporting the
script file or just reopening the scenarist project file?

If you are just re-opening the scn file, you have to be sure to
tell scenarist that the video files are there now.
Click the data tab in scenarist, select the video stream in question, then right click and select "placeholder->data"


Don't worry, we will figure this out.
I never give up :-)

mike


Send me the scp file to mike@rejig.org

JvD
5th November 2003, 00:16
Finally SUCCESS :) :D :devil:
What i did was to rename the files by removing the .m2v so the files was .mpv instead (created files was VTS__0X_P0X.XX~X_X.mpv.m2v but the scp-files was looking for a mpv-file) . After that I just loadet Scenarist as usual an got it runing without any problems. Created a fully functional DVD ;-) So, is it me or a bug? Why is the ReAuthorist files looking for mpv-files when thera are only m2v? Should Rejig output mpv?


God night guys and keep up the good work on this app!

mmgrover
5th November 2003, 00:29
@JvD

I'm looking into that now...

mrbass
5th November 2003, 02:34
Mac DVD Backup Transcoder by Makira
http://www.metakine.com/products/dvdremaster/

released source code Requant (Sep 2003)
http://www.metakine.com/files/M2VRequantizer.tgz

RB ported it to win32 (October 6, 2003)
http://home.t-online.de/home/340044300675/requant.zip

DVDRFreak (October 9, 2003)
http://www.mrbass.org/M2VRequant.rar
-Changed startup parameter so program will accept percentage as parameter.
-Recompiled using speed optimalizations for P6.

Nic (October 10, 2003)
http://nic.dnsalias.com/Requant.zip

Nic (October 11, 2003)
ReJig v0.1

Nic (October 12, 2003)
ReJig v0.2, v0.2b, v0.2c, v0.2d

Nic (October 13, 2003)
ReJig 0.3a

Nic (October 19, 2003)
ReJig 0.3b
http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip

Nic (October 24, 2003)
converted ReQuant into C++ code...
http://nic.dnsalias.com/ReQuant_src.zip

mmgrover...Just download and keep local copies since links change, etc. Not sure if Nic wishes to add a summary change log. Just for clarification but I'm pretty sure all of this is based off of M2VRequantizer source and none of it yet (at least) is based off of M2VDownsizer source as it hasn't been ported to win32 yet.

M2VRequantizer:
A module which simply requantizes the video leaving the motion vectors unchanged. This module is very fast and provides relatively good quality.

M2VDownsizer:
A modules which recompresses the video stream completely (including motion vectors). This will usually yield slightly better quality, at the cost of time.

Eyes`Only
5th November 2003, 03:24
JvD:

NTSC: If the file is nopull, the extension should be .mpv, not .mpv.m2v. CCE outputs .mpv and if we pulldown, we pulldown to an output file of .mpv.m2v. To emulate this filename structure, a .nopull.avs should search for a .m2v and transcode it to a .mpv.

PAL: Pulldown should never be used, so the extension should always be .mpv

I use AVIFILEINFO to determine the fps of the video file (well actually the .AVS). For example:


pfi = new AVIFILEINFO;
PAVIFILE pfile;

AVIFileInit();

AVIFileOpen(&pfile, m_csAVSFileLocation, OF_SHARE_DENY_WRITE, 0L);
AVIFileInfo(pfile, pfi, sizeof(AVIFILEINFO));
m_dFrameRate = pfi->dwRate / (double)pfi->dwScale;

AVIFileExit();


(if m_dFrameRate<26), don't add .m2v under any circumstance.

Don't know if there's code in there already to determine fps, I see there's a bunch of classes in Rejig borrowed from others, but I almost always write my own classes. Probably why my production time is so much longer! LOL

mmgrover
5th November 2003, 05:03
@eyes only

(if m_dFrameRate<26), don't add .m2v under any circumstance.

What if the d2v file is set to film?
That returns 23.976, it will be pulled down.
Shouldn't that be named .mpv.m2v?

mike

or do you mean if m_dFrameRate <> 25?

I don't have any PAL dvd's here :-(

Would it be safer to assume if < 24fps must be pulldown else
keep mpv ext?
Film should be only pulldown.

Eyes`Only
5th November 2003, 05:46
Good point. I was actually pasting my "figure out if you need to add .nopull" routine and obviously for that I use if (m_dFrameRate>26). I reversed it in an incorrect fashion. That'll teach me to speed-post, eh? :(

JvD
5th November 2003, 08:43
Originally posted by Eyes`Only
NTSC: If the file is nopull, the extension should be .mpv, not .mpv.m2v. CCE outputs .mpv and if we pulldown, we pulldown to an output file of .mpv.m2v.

Thanks! I know that cce outputs a .mpv but since I am a novice (compared to you guys) and I live in a PAL country (without any need to pulldown ;-) I didnt even think about it. But i think it should be corrected in some way.

Nic
5th November 2003, 09:51
" see there's a bunch of classes in Rejig borrowed from others"
Where?
Theres the whole load of VStrip code in there...But all the classes are mine :) (although I use them lots, in things like MPEGDecoder etc)
There isn't a single class written by anyone else in there.

-Nic

ps
@mrbass:
Oh I did do a port of M2VDownsizer, it's not a very good bit of code (sooo slow, uses mpeg2enc from mjpeg). I tried to put in a reasonable amount of x86 assembly, still too slow to use. Ill post it later, it may be difficult for some to compile...

mmgrover
5th November 2003, 14:07
@nic

I'd like to check out that code too, I was working on porting
it over, but you beat me! lol


mike

@nic,mrbass


I updated the history page this morning. Check it
out and see if it works for you?


mike

Eyes`Only
5th November 2003, 15:36
Theres the whole load of VStrip code in there...But all the classes are mine (although I use them lots, in things like MPEGDecoder etc)
There isn't a single class written by anyone else in there.

True, the classes (9 in total I think) were all from VStrip, but one stated "based on code originally written by Thomas Mirlacher (dent@cosy.sbg.ac.at)
for the "free InFormatiOn project" (http://www.linuxvideo.org)" which I guess means a class borrowed from a class? It's not a subject of importance anyway. The reason why I don't use code from others is more based around my inexperience with doing so! heh

BTW: I installed SP5 and still can't seem to compile successfully :(

Nic
5th November 2003, 15:59
(There are no VStrip classes...only C source that's been ported to C++ by me, but not in a class...but as you say, it's not important :) )

Have you tried installing "Processor Pack 5" for VC6? I think that might solve the issue if you haven't already...

-Nic

mmgrover
5th November 2003, 16:01
Just Wondering if we could all get together for a meeting somehow?
I'm worried people will be working on same areas and overlap code?
Not sure what direction things are headed?


mike

Eyes`Only
5th November 2003, 16:07
Hey! That was the fix I was looking for! I tip my hat to the master...

mmgrover: Sounds good to me, I didn't plan on writing any new code as of yet though, I just know a lot of ppl looking for a version with static libs that has advanced CCEData.txt parsing. How does EFNet IRC sound to you guys?

mmgrover
5th November 2003, 16:09
I wasn't trying to step on any toes here ;-)

Still not sure How nic feels about web site?
I just see a good app here with lots of future!


mike


Trying to be what ever help I can.
Have coded for years, but my MFC skills are getting rusty :-(
I mostly use Builder 6 and delphi 7 now :-)

On another note, been about 60 downloads of Installer version of rejig. My DSL line goes nuts now and then...

mmgrover
5th November 2003, 16:17
The only thing holding me back with a staic version was
that I havn't been able to compile the css code in vStrip yet :-(

I added code to a version here that gets frame rate, If it's 23.976
use .mpv.m2v naming alse use .mpv



mike

Nic
5th November 2003, 16:27
:) Website's fine...

If I've included my MPEGInfo class they'll already be a class to find out the framerate but that might not be in there...post your code and ill put it 0.4 to be released soon...(code's done, just got to make the stop button work.lol! (then test it...))

-Nic

ps
I'm not really one for IRC, my free time is very short, and it's better spent coding...My plans are to finish this IFO mode off and then work on the compression/rate-control. So anything other than that shouldn't interfere or overlap for now :)

Eyes`Only
5th November 2003, 16:32
Nic: understood. Well if either of you want to chat using a system a little more facilitating than this one, I'm in EFNet IRC at #doom9 most of the time. Great! I've got an alpha of DoItFast4U 1.3.4 about to go beta which will call rejig as long as users put a copy of it in my install dir, and keep it named Rejig.exe. I think it should suffice, as long as CLI doesn't change.

mmgrover: No wait, that sounds backward. 23.97 = mpv.m2v, 25=mpv, 29.97=mpv

mmgrover
5th November 2003, 16:47
@eyes only


Film is 23.976, 29.970 after pulldown


So wouldn't Film be the only mpv.m2v?

Eyes`Only
5th November 2003, 16:56
yeah, I guess I misunderstood "alse" to mean "also", which confused me.

mmgrover
5th November 2003, 17:00
Sorry, I meant else, lol

Sounds like converting from bitrate to percentage is up to us?
You had any ideas on that?


mike

Eyes`Only
5th November 2003, 17:07
Well I thought about doing it, but the problem is what you mentioned about the sizing not working correctly as it is now. I don't think it's proper for me to pursue it, as what *might* need to be done is a complex calculation varying depending on other factors such as filesize, correct? I can send percentage information in the CCEData.txt file, but I'm not sure this would work out the way we want it, and it would leave the file proprietary, instead of being able to be used on both apps (DoCCE4U and Rejig), which is something I was hoping(?) could be done, at least in initial stages.

mmgrover
5th November 2003, 17:12
Since this project is in its early stages, Do we use the CCEData.txt
for manual import, and possibly create a REJIGData.txt file
for DoItfast4U->ReJig auto processsing?


Leave existing CCEData code and add additional code?
Create a nice format for rejig text file?


mike

I'm not sure if nic's current work fixex that or not?

mmgrover
5th November 2003, 17:21
How do you guys feel about CVS?

I can open outside on my openBSD machine to allow access to my WinCVS server here and we can use the WinCVS cient?
I have been using it for about 3 years and have had good luck with it.

We can set it to allow Read only access for Anonmoyous users.

This would allow us to all work on the project at the same time :-)
Just keep committing your changes.

@eyes only

CVS is the Concurrent Versions System, the dominant open-source network-transparent version control system. CVS is useful for everyone from individual developers to large, distributed teams:

Its client-server access method lets developers access the latest code from anywhere there's an Internet connection.
Its unreserved check-out model to version control avoids artificial conflicts common with the exclusive check-out model.
Its client tools are available on most platforms.


Goto http://www.cvshome.org/

On my Win2000 server I use http://www.cvsnt.org
For Client I use http://www.wincvs.org

Awsome Tool!!!

Eyes`Only
5th November 2003, 19:07
Never used it. :confused:

mmgrover
5th November 2003, 22:45
Has anybody Used ReJig To Compress a Encrypted vob?
I finally got the csslib to compile ok, so I opened up a
vob file on my hard drive that is encrypted, when I try to
compres ReJig crashes :-(. I then thought maybe it was my Compiling
of css, so I downloaded the ReJig exe from nics site. Same problem.

Has this worked for anyone else?


Going to start running it in debug mode to see if I can trace it.


an assertion fails In Debug mode at line 226 in RequantEngine.ccp


void putAC(int run, int signed_level, int vlcformat)
{
int level, len;
const VLCtable *ptab = NULL;

level = (signed_level<0) ? -signed_level : signed_level; /* abs(signed_level) */

>>>>>>> assert(!(run<0 || run>63 || level==0 || level>2047));

len = 0;


Nic, Does Rejig decrypt on the fly?


I compiled the test app thet came with libdvdcss and it worked fine....

mike

Nic
6th November 2003, 00:09
(Nope ReJig in normal mode does no decryption, although plugging in code to do so is easy with those classes (I do it in my unreleased DVD2AVI_Nic....In IFO Mode decryption is done however).
(libdvdcss is only used for Authentication (which is only used in IFOMode))

Im just about to release version 0.4 :)

-Nic

ps
Not a fan of using CVS at the moment, maybe later though.
Using CCEData.txt should be fine, but we'll need to look into it once rate control code is implemented, which ill begin work on soon.

Nic
6th November 2003, 00:28
ReJig 0.4a
http://nic.dnsalias.com/ReJig.zip

(source code)
http://nic.dnsalias.com/ReJig_src.zip

Now has IFO Parsing, can rip streams and convert straight from the DVD. Also can convert Sub->Sup and correct AC3 Delay after ripping.

Very untested at present, bound to be buggy. After bugs removed, moving onto rate-control (i.e. so you can put in a final size).

Also includes DVDRFreak's fix for Remove stuffing by removing 8 bytes instead of 6. Should stop jerky video...please let me know if it does.

-Nic

DVDRFreak
6th November 2003, 00:43
@Nic

Cool, will start testing tommorow after work. Great to see you are better again.

Noticed one bug pressing the open disc button in ifo mode shows a dialog with a empty box. When the open disc button beside this box is pressed the program terminates with an exception.

dragongodz
6th November 2003, 03:45
mmgrover - i had a quick look at the sizing wrong(not enough) for 50%.

in requantengine.cpp change the react_delay values. so -2.5f becomes -1.0f, -5.0f becomes -2.5f. then change -60.0f to -10.0f and -80.0f to -20.0f. make sure to change all instinses.

try that and see how close the output size is to what it should be. should be pretty close. this is more of a quicky solution until nic gets a chance to work on the rate control properlly. :)

mmgrover
6th November 2003, 07:09
@dragongodz

I will give that a try

mike

Grunter
6th November 2003, 12:57
I've tried ver. 0.4a. In IfoMode crash everytime. :confused:

Nic
6th November 2003, 13:07
Give a little more detail grunter. When does it crash? When loading an IFO? As soon as you hit Process? Did you make sure you supplied an output directory? etc

jhmac
6th November 2003, 13:23
Did it crash on a dvd or files ripped to harddrive. Was the dvd a copy or an original?

Grunter
6th November 2003, 14:32
Let me explain. I try to process in ifo mode an iso mounted with daemon tools (previously ripped on hd with dvd-decrypter), when it's going to finish the processing, it crashes:( It crashes when i demux the video and also when i re-compress the video.

DVDRFreak
6th November 2003, 19:03
@Nic

I'm testing a little and found a strange thing:

In IfoMode:

I deselect all chapters except chapter 1 and choose an output directory. Rejig 0.4a processes the video but it processes all the video. This might have something to do with the fact that if I deselect a chapter de CELS that are corresponding to this chapter are not deselected.

I did run a second test same video now I deslected all chaptes and all cells and then selected chapter 1 and manually selected the correct cell id's. Same result so it is not the selection of cell id's.

Nic
6th November 2003, 20:36
(Well that bit was working...means ive broken it ;) It really has almost no testing it's current state, but I thought it needed releasing otherwise I might hold up other code ammendments...the fixes should only be quick. Ill do them soon)

-Nic

sundance
6th November 2003, 23:07
Hi nic,

just tested ReJig's Ifo-Mode with "Maid in Manhattan" (R2).
Works fine here; no crashes (W2K SP3). And, of course, the video quality is excellent (85% compression).
But while playing with it, I found some "issues" (beside the "one chapter thing" DVDRFreak found) which you might want to know:
a) When "Correct audio delay" is selected, even streams with 0ms delay are "corrected".
b) If you try to stop it while correcting, the unfinished, corrected version is kept while the original ac3 file is deleted (happened at least once; could not reproduce it another time I tried...).
c) If you don't select a video stream (just audio and/or subs), any existing m2v stream is deleted.
d) After a destination folder is selected, the compression is always reset to 70%.

Tnx for your outstanding work!
I'll keep on testing...

Nic
7th November 2003, 00:26
Thanks for that bug report....lots of very minor things...sorry you had to find them, but at least there easy to fix :)

-Nic

int 21h
7th November 2003, 04:53
@Nic:

Check this out http://www.dvdrhelp.com/forum/viewtopic.php?t=180017

A quick Cygwin-less port of that shouldn't be entirely too difficult, and then ReJig could output direct to DVD.

DVDRFreak
7th November 2003, 07:52
Originally posted by int 21h
@Nic:

Check this out http://www.dvdrhelp.com/forum/viewtopic.php?t=180017

A quick Cygwin-less port of that shouldn't be entirely too difficult, and then ReJig could output direct to DVD.

That would be so cooool :) :cool:

I believe that Nic already ported the DVDauthor part.

Nic
7th November 2003, 09:39
(and mplex (from mjpeg) is already set up to compile under vc6 (which id didn't use to be). So the whole thing is ready for auto authoring using them :) Just got to get the time to put it all together, first going to do rate control though.

-Nic

jhmac
7th November 2003, 10:14
@Nic & other ReJig developers

I would like to make a donation (PayPal) to the ReJig cause, do you have something setup yet? A little something to say thanks for all the hard work...

Nic
7th November 2003, 12:14
No need for donations. Give it to a local cause or charity :) Thanks alot for the nice offer though :)

-Nic

DSPguru
7th November 2003, 12:23
Originally posted by Nic
Give it to a local cause or charity :)Nic is dA'mAn!

mmgrover
7th November 2003, 13:51
See, Nic doesn't need it, Him and bill gates live on the same street!

Just kiddin, lol
mike

On another note, Nic what are your plans for rate control?

mike

E-Male
7th November 2003, 14:48
is dvdauthor only for movie-only, or can it create complete DVDs?

EDIT: afetr readign a bit more, seems like it is (or will very soon be) able to do whole DVDs

So if the code of rejig, DIF4U and dvdauthor could be joined to one program, we could in the near future be able to do full dvd-backups with freeware

jdobbs
7th November 2003, 15:28
Once again my hat is off to Nic. You're an inspiration.

onesoul
7th November 2003, 16:32
Originally posted by Nic
Excellent news (Thanks for pointing this out to me Int21h). I'm crazy busy right now with work, but this deserves my attention :) Ill try and port M2VDownsizer now.

-Nic

ps
Edit: Well, already got it compiling, now just got to get all the 24 unresolved errors removed. I haven't put in the MMX code or anything yet, expect the first release to be slow as hell.
Edit2: Although it might not help a jot, i did build a ICL 7.1 compiled Requant http://nic.dnsalias.com/Requant.zip
Edit3: Got it compiled as an exe, now gotta work out how to use it ;)
Edit4: Uggh, it's one of these apps that uses stdin and stdout for the input/output...that's just wrong, im on windows afterall ;) soon change that.
Edit5: Well it's running, using 99% cpu so I suppose it's going ok. If I can't get it working then Ill at least release the source code, got to get back to work now. It's all done in VC6 using ICL 7.1.
Edit6: Well now its running correcly ;) Very very slowly making output...really need to get the mmx code in, may not put it out till then.
Edit7: Wow! It works...did my first little test. Slow as hell though.
Edit8: By the way, ill make a little GUI for Requant and make it so it can accept PS/TS/ES Streams as well (although it will only output ES)

Sorry for going back, but I didn't understand what M2Vdownsizer can do. Is it better than M2VRequantizer and usable?

cheers

mmgrover
7th November 2003, 17:01
Can someone offer the ported version of M2VDownsizer?
I would like to do some Quality tests :-)

mike

int 21h
7th November 2003, 18:39
Originally posted by onesoul
Sorry for going back, but I didn't understand what M2Vdownsizer can do. Is it better than M2VRequantizer and usable?

cheers

M2VDownsizer is a full decoder/encoder implementation, based upon Mpeg2Enc if I remember right... its very slow and not very usable, the quality is ok though.

mmgrover
7th November 2003, 18:55
@int21h

Maybe M2Vdownsizer isn't worh messing with ...

int 21h
7th November 2003, 19:53
Nic has a completely ported version of it... in fact before Requant came out, I think he was working a Mpeg-2 encoding project with it... In any event, as far as I know, Nic looked at it, and even added some of the optimized routines back in, and it was still pretty slow, and so it was put on the very, very back burner for now.

jsoto
7th November 2003, 20:56
a) When "Correct audio delay" is selected, even streams with 0ms delay are "corrected".

This could be a good practice. No delay correction, but some common errors in ac3 (crc, uncompleted frames, etc) could be fixed or, at least, detected.

jsoto.

Exo
8th November 2003, 00:44
Isn't it possible to requantize with another matrix?
This could possibly increase quality when using higher
compression ratios. CCE (newer than 2.50) for example
lets you choose between different matrices. Two of
them are called: very low bitrate matrix and ultra
low bitrate matrix. Maybe this could lead to higher
compression with less artefacts?

jhmac
9th November 2003, 20:39
Sure got quiet around here...

int 21h
9th November 2003, 21:09
Originally posted by Exo
Isn't it possible to requantize with another matrix?
This could possibly increase quality when using higher
compression ratios. CCE (newer than 2.50) for example
lets you choose between different matrices. Two of
them are called: very low bitrate matrix and ultra
low bitrate matrix. Maybe this could lead to higher
compression with less artefacts?

I was going to reply to this earlier, but I've been drunk most of the weekend... but here I am yet again :)

A quantization matrix is used during encoding to specify levels of quantization for specific frequencies (i.e. usually you apply a high level to things not seen very often, and a lower level to components that make up more of the picture)

When you look at a compression matrix, for instance the KVCD compression matrix...

Intra:
8 9 12 22 26 27 29 34
9 10 14 26 27 29 34 37
12 14 18 27 29 34 37 38
22 26 27 31 36 37 38 40
26 27 29 36 39 38 40 48
27 29 34 37 38 40 48 58
29 34 37 38 40 48 58 69
34 37 38 40 48 58 69 79


You'll notice we have 64 integers listed (these are used in the quantization equation as a sort of constant), these correspond to the 64 coefficients that the DCT process yields. Due to the nature of DCT, the block itself becomes arranged by frequency, with the 0,0 corner (the DC) holding the most significant information, and the 63,63 (one of the ACs) corner holding the most insignificant information, so that after you apply quantization to a block, you get something like this:


153 5 4 0 0 0 0 0
4 2 0 0 0 0 0 0
3 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0


And something like this is what is stored (all the 0's aren't actually written out, because in conjunction with zigzag scanning and the EndOfBlock symbol, you don't need them..)

So.... In ReJig, using a re-quantization matrix would probably not be the most direct approach to a quality based encoding model. Something like a matrix might be ok, but we really don't need to specify requantization parameters for all 64 coefficients, because its probably very rare that they all even exist. The artifacting problem is happening when extra quantization is being applied to a frame, and its reducing the ACs of the frame (the coefficients other than 0,0) to 0 or near 0.

This all really leads up to the problem that ReQuant currently is a unintelligent engine. Right now it blindly applies the rules it has to every frame, no matter what is in the frame or what the result is... I imagine this will be improved in time, just be patient :)

Exo
9th November 2003, 22:08
@ int 21h:
thanks a lot for your detailed explanation

Originally posted by int 21h
just be patient :)

Well, I'll try :)

robshot
10th November 2003, 16:57
Posting to inform some strange behaviour.

1. Try to backup ALL content of Ride with the Devil R1
2. using rejig to "jig" movie content in VTS_06_1.VOB to VTS_06_06.VOB.
3. result is fine, big .m2v file.
4. use ifoedit 0.92 to open the VTS_06_0.IFO (whereas VTS_06_0.VOB is the menu).
5. under ifoedit, i go to VOB Extra, and remux the new .m2v. Note: UNCHECK the AutoCopy Menu Files to Destination, and VOB size is 1GB.
6. This DVD has trailers and music videos by Jewel, which I also rejig because i want full BACKUP. Trailers+Music Video in VTS_03_1.VOB, and Recommendation Trailers in VTS_01_1.VOB
7. I took the same procedures with the movie rejigging (Opening original VTS_01_0.IFO, then opening VTS_03_0.IFO)
8. remux with VOB Extra menu of ifoedit 0.92, the same process with the movie.
9. I then use the VOB+BUP+IFO CREATED BY IFOEDIT (VTS_01_0 for Trailer Recommendations, VTS_03_0 for Trailer+MusicVideo, and VTS_06_0 for movie) to REPLACE the original IFOS/BUPS/VOBS.
10. I open IFOEDIT again, this time opening VIDEO_TS.IFO. I click GET VTS Sector to fix and correct all the changes.

11. Result:
a. Movie plays fine, menu plays fine, quality fine...
but...
b. trailers and music video NOT SYNC. Opening the VOB created by ifoedit also shows no sync.

After opening the original VTS_01_1.VOB and VTS_03_1.VOB with Vobrator, i found out the following:

VTS_01_1.VOB has 3 trailers, and between each there's a black mpeg2 still, so total of 7 PGCs (double still mpgs at end)
VTS_03_1.VOB has 2 trailers and 1 music video, with 2 black mpeg2 still in between, so total of 5 PGCs.

I remux the rejig file with rempeg2, and now the VOB is smooth and SYNC.

So i guess, there lies the problem with ifoedit muxing vob that originally contains mpeg2 still ?

The solution with rempeg2 muxing does not give me new IFO, so the next process of IFOEDIT - GET VTS Sectors is not correctly done.

Any ideas?

cheers
robshot

TEB
10th November 2003, 17:14
just a little question for a newb like me:
When u spesify eg: 70% in rejig does it reduce EVERY frame down to 70% flat? or doest it vary and the total is 70% ? is it possible to use this process to "shave" off the tops on a VBR peak?

best regards teb

naoenxeosaco
10th November 2003, 17:23
I noted previously any DVD titles not play fine with ifoedit muxing. For this cases, I proceed this way:
1. Execute DoItFast4U on DVd Title;
2. In ReAuthorist make some adjusts and click in "Author It!";
3. Rejid demultiplexed video VTSs and rename output M2V file;
4. Import script in scenarist;
5. IfoUpdate
6. Burn.

Like you says... "is smooth"....

Bye

dragongodz
11th November 2003, 10:52
mmgrover - just wondering if you tried the changes i suggested and if so then did you test it with 50% compression ?

DMagic1
11th November 2003, 12:20
Is there a way to get the m2v file into Maestro? If it was said before I can't find it. 15+ pages to look thru.

robshot
11th November 2003, 14:21
To update the issue i had with Ifoedit 0.97 does not mux rejigged m2v containing still mpeg2 pgc(s), the workaround is as follow:

1. with vobrator, identify which are the still mpeg2 pgc(s) in your original .VOB file.
2. using Ifoedit to open the corresponding .IFO, VOBIDsplit it to new sets of VOB(S).
3. rejig the VOB file(s).
4. when you have the vob file(s) with no still mpeg2 pgc(s), the new rejigged file (m2v(s)) will be muxed fine with Ifoedit
5. last stage is usual, open VIDEO_TS.IFO and get VTS sector.

I use MenuEdit to remove buttons and/or language menu(s) I don't want, and combining it with Ifoedit + Rejig makes a backup process without the need much of anything else.

To _again_ list the procedures:
1. SmartRip the DVD
2. VOBrator the VOBs to identify VOBIDs
3. Make decision to Rejig or not to Rejig which content material (should i delete the special features? Should I rejig some of them? What % calculation for movie rejigging?).
4. Ifoedit what VOBIDs and Stream needs to be stripped.
5. Use MenuEdit to remove buttons connecting to (removed) image menu and all
6. Ifoedit back the rejigged and MenuEdit-ed files. Check final DVD-R filesize.
7. Test playback of your VIDEO_TS folder with PowerDVD

Now, when would that requant engine get "smarter"? Transcoding now has a new name, but re-encoding with CCE and/or Procoder still give the best quality? It needs to be paralleled (sp?), right?

Rejig has given a high leap from the one-clicks transcoding quality, and it is nearing those of CCE and Procoder (engine 1.5).

cheers, nic and all!

Nic
11th November 2003, 14:28
Thanks for all the feedback robshot and everyone, I haven't disappeared just haven't been home much recently. Ill do a bug fix release ASAP.

@DMagic1: Your right, I will try and compile the useful things from this thread into text/doc. Unless anyone else would like to do it ? :)

-Nic

mmgrover
11th November 2003, 15:31
@dragongodz I tried what you recomended, didn't help much :-(

Different video streams on compress so small and
stop there :-(
I'm Open To Ideas??


@nic I hve been working with eyes` only and we have a version that
works well with DoItFast4U. Just having problems with getting
video to compress to a accurate size :-(

Let me put lates code on site for you to get.

It's At http://www.rejig.org/downloads/0.4b/rejig_0.4b.rar


It parses a REJIGData.txt file from DoItFast4U

mike


@robshot

Do You mind if I put your tips of wisdom on the ReJig web site?

E-Male
11th November 2003, 17:53
Originally posted by mmgrover
..we have a version that works well with DoItFast4U.....
music to my ears

DMagic1
12th November 2003, 06:15
Originally posted by Nic
Thanks for all the feedback robshot and everyone, I haven't disappeared just haven't been home much recently. Ill do a bug fix release ASAP.

@DMagic1: Your right, I will try and compile the useful things from this thread into text/doc. Unless anyone else would like to do it ? :)

-Nic

Until then could you or anyone else point me to the page its on if you know.

Eyes`Only
12th November 2003, 10:25
mmgrover: the last alpha I gave you works well then? I'll rls a DoItFast4U! 1.3.4 tommorrow (or soon) with the latest additions.

all: The integration between the two apps works well, we are still experiencing a problem with oversizing since it seems Rejig can only compress so far before it just doesn't compress anymore(?) currently. I don't see anything more I can add to version 1.3.4 to rectify this, and I think the solution will come from the Rejig development at this point.

dragongodz
12th November 2003, 11:12
mmgrover - ok i would attach one with a more extreme changed values but cant so message me where i can send it to you so you can give it a try. i quickly tested it on 2 files and 1 it came close but the other just would not go below a certain size. so you probably want to try it with a couple of different files. the changed source file is included and i have commented with dragongodz above the changes so they are easy to find.

mmgrover
12th November 2003, 14:22
@dragongodz

You can e-mail it to mike@rejig.org

mike

E-Male
12th November 2003, 18:12
can't wait to try full backups with the new versions of DIF4U and ReJig

motster
13th November 2003, 02:45
FWIW, the crashing seemed to go away when I went from daemon-tools 3.32 to 3.41. More info as I find out!

echooff
13th November 2003, 15:17
mmgrover


I know you guys are working hard on the code. You posted version 0.4b on your site. I am not a programmer and don't own a compiler. I also realize it's probably not ready for issue yet but...Could you possibly compile this version.

robshot
13th November 2003, 20:17
mmgrover wrote:
@robshot
Do You mind if I put your tips of wisdom on the ReJig web site?

well of course i don't mind, mmgrover! Surely this is an exciting thread and after out from the scene for quite a while, i got in just in time to read this thread. All i can say is WOW! Got me hooked rightaway :)
Perhaps later a more detailed but simpler guide would follow. So far, i got 2 perfect backups with (Smartripper + VOBrator) and rejig + ifoedit + EditMenu.

cheers mate!

mmgrover
13th November 2003, 21:58
@echooff

I uploaded a compiled exe
http://www.rejig.org/downloads/0.4b/ReJig.rar


@robshot

thanx, I'll get on that tonight :-)


mikw

E-Male
13th November 2003, 22:12
is this new version any better than the one before until the new DIF4U version is publicly released?

EDIT: found the new version

E-Male
14th November 2003, 15:50
ok, i ran DIF4U
then processed the result with ReJig
but how to go on?
(i tried reauthorist but it crashes)
can someone help me out?

thx
e-male

dragongodz
15th November 2003, 12:25
mmgrover - just had a quick try of 0.4b. it appears to use the changes for output size that i sent. so you got ok results with what i sen then i take it ?

E-Male
15th November 2003, 14:18
i didn't check the size
when the crashes happend and couldn't get further i just deleted the files
sorry

Superduck
15th November 2003, 23:18
Just tried DIF4U latest version with Rejig 0.4b. It seems that DIF4U set the compression ratio to 1% :/ So I had to do it manually afterwards to get it right.

cweb
16th November 2003, 13:12
I've taken the liberty to port this to Win32 so it can be compiled with MSVC++ and does not require the ugly Cygwin environment. Will run on Win9x/ME/NT/2K/XP/2003. I really don't deserve much praise for this as the port was fairly easy :)


Why not try the much nicer mingw environment? It's better than the ugly Cygwin.

Nic
17th November 2003, 00:07
@cweb: I assume you've taken that from the first post from RB. Alot has changed since then... ;) But leads me to another topic.
I've been playing with ffmpeg MPEG-2 Encoding in my absense, might try and include that into ReJig as well as normal Domain Transcoding...Has anyone had any good success with ffmpeg mpeg-2 encoding for dvd authoring?

Ill post my results of it as well as a cygwin build (it just doesn't build nicely in mingw and it still needed the mingw DLL mgwz.dll). (My build can take multiple .m2v inputs and output one single .m2v, which the original can't)

To bring it back on topic, I've fixed a few bugs in ReJig, will release that ASAP, then begin the rate control stuff.

-Nic

winman
17th November 2003, 01:21
@nic

Not sure about the ffmpeg command line version but I have great success with the ffmpeg MPEG-2 encoder that comes with ffvfw(Sep 27 2003 build). I mostly use it for capturing and transcoding divx materials. Quality is quite good and the speed is great (on a 2.0GHz Athlon system - a 640x480 video source get ~60+ fps w/o resize and ~45+ fps w/ resizing ).

The resulting m2v work fine with Maestro amd bbmpeg... Playback is also great as long as the resolution is compliance. Reducing the maximum I-frame interval to 18 or less would probably help with compliance but most hardware players I tested don't seem to care if you have more than that.

DMagic1
17th November 2003, 06:12
i'll wait for the answer

*question edit out*

JvD
17th November 2003, 09:52
Nic, "then begin the rate control stuff", OK, I think I heard this a LOONG time ago ;-) I have done several backups with Rejig now but mainly together with Big3-1 :-) It would be great if Rejig had it built in. I use ReAuthorist and the values thhat I get from there (including an control maually) witch end up around 4250 +/-100.

Nic
17th November 2003, 10:23
(what can I say? Im a busy and easily distracted guy ;) )

DDogg
17th November 2003, 17:26
Nic, great work. Since you brought up mpeg2,[I assume for situations where transcoding would not be appropriate?] might there be a possibility to also use the CCE plugin as an output module? I have tried a few tests with the experimental internal mpeg2 [of ffvfw] and show problems with blocking and strange spots on graphic slides. Perhaps just my method using VDub. If you will let me know what you want tested with the internal mpeg2 [of ffvfw], and how you want the results correlated, perhaps I can contribute to the effort. Here or PM is fine.

DMagic1
18th November 2003, 04:42
I asked a while back, how to get the Rejig M2V into Maestro. I never got and answer. What I did to get Maestro to accept it was to run Pulldown setting only "all frames to progressive". After that Maestro accepted it fine.

Is this the best way to get Maestro to accept the M2V file?

dragongodz
18th November 2003, 11:53
DDog - the mpeg encoding (especially mjpeg) in ffvfw is very buggy so dont take that as being typical. Nic did a little program some time ago (avs2mpg i think it was) that used mjpeg compression and it appear to work fine.

the only problem with mpeg encoding from ffmpeg is its GOP usage. that is if you just encode normally and even set the GOP size to 15 or 18 it doesnt strictly stick to it. example i have a clip that has a lot of movement in it. ffmpegs method to keep it looking good ? short GOPs. when the motion gets heavy it became IBBIBBIBBIBB etc. while this keeps a perceptial quality it is not that good for size and may stutter when you play these sections(this clip does stutter a bit for me).

a more reliable method would be to base the GOP off what the original is and recode accordingly. that way asuming the original encoding knew what it was doing any change in quality should be consistant. the exception being if the payback system i mentioned waaaay back was implamented. then high motion scenes would get extra bitrate anyway.

Nic - you asked about PSNR somewhere back there, ffmpeg has PSNR reporting for encoded frames if you are still interested.

mmgrover - you still around mike ? just wondering why you didnt release the source to 0.40b using the changes i made for output size. others could probably play with it more.

Nic
18th November 2003, 16:17
Thanks for that input dragongodz...Hadn't noticed the GOP problem. It's because of the scene change detection code in ffmpeg. If I remove it...things go back to being reasonably strict GOP sizes.

Keep the info coming :)

-Nic

ps
Actually I can raise the detection level so it occurs alot less....that is probably better than turning it off altogether...

pps
@DMagic1: Sorry if it seems im ignoring your question, but Ive never used Maestro. So have no idea, sorry, hope you get an answer to your question.

echooff
18th November 2003, 16:45
@mmgrover

Sorry for the late reply. Been under the waether. Many, many thanks for the compiled version. I love this tool.

unixfs
18th November 2003, 16:50
Originally posted by Nic
ps
Actually I can raise the detection level so it occurs alot less....that is probably better than turning it off altogether...


How do you raise it?
Have you noticed those nasty blocks in uniformly colored areas? (especially black turning greyish) I can't find a way to let them go away

Nic
18th November 2003, 17:29
@unixfs: codec->scenechange_threshold = 3500; in ffmpeg.c is how I change the threshold, normally it's set to 0 ;)
Haven't noticed those blocks you mention yet, Ill test more with it. It's getting updated regulary, even the code on my machine is out of date now, maybe they've fixed it?

-Nic

DDogg
18th November 2003, 19:15
dragongodz, thanks for that info. The particular clip I had handy was ntsc DV with a hand held pan...You can imagine the result :)

mmgrover
18th November 2003, 19:43
@echooff
No Problem :-)

@dragongodz

I posted your changes to http://www.rejig.org/development.asp



mike

JvD
18th November 2003, 22:04
mmgrover: any compiled version for this dragongodz-version?

mmgrover
18th November 2003, 22:48
@JvD

It's In the release dir in the rar file
mike

JvD
18th November 2003, 22:56
OK, I also thought i would try out the IfO-mode. Loade the image in daemmon tools and start ReJig and choose Ifo-mode. "Open disk" and pick the mounted drive. Everything seems fine, I can se the IFOs, the PGCs, chapters and cell-ids. I pick the first PGC, chose the stream I want, sound and subtitle language. The I move on to next PGC, i do my settings. NOW, my settings on PGC1 is gone (the settings for the first PGC didnt stick). Is it a bug Or did I miss something. Is this part still under construction? I thought i read about someone using this mode. OR?
One more thing, the audio (languages) alternatives specified under "Streams" in inaccurate. For this movie I can only pick Deutch, and HOW FUN IS THAT ;-)
Yet another thing, under titles /ehere my PGCs are, will it be possible to pick the PGC I want to keep? Now I cant! The Del button remove alls sets :-( OK, I can de select the video under streams but then again, when I go to the next PGC to pick streams, my first choises on PGC1 is gone.

sundance
19th November 2003, 09:50
@DMagic1
I asked a while back, how to get the Rejig M2V into Maestro. I never got and answer. What I did to get Maestro to accept it was to run Pulldown setting only "all frames to progressive". After that Maestro accepted it fine.
Is this the best way to get Maestro to accept the M2V file?


I also hesitated to answer since you mentioned using "pulldown" which was NTSC related to me.
Being a PAL user I never had any problems importing rejiged m2v streams into Maestro. The only thing annoying is that the original time code is still present (usually 0:59:59:00 or some other value just a little below 1 hour) which gives you some additional work to adjust your chapter marks and subtitles.
So maybe there are other NTSC guys to help you out.

Nic
19th November 2003, 10:17
JVD: You can only do one PGC at a time, at present. Hence you loose your settings when you switch PGCs.

burnix
19th November 2003, 11:55
I have tested last night the version 0.4a on DVB (sat) capture and it works fine.

DVB sat - 720*576 - pal - 25 fps.

I have compared the requant portage and rejig, no difference between the two app.


Have nice work ;-).

DMagic1
19th November 2003, 20:00
thx Sundance and Nic

burnix
20th November 2003, 10:30
Hello all.

Just a few word about my test on dvb file.

- first i capture with my dvb card
- then correct it with pvastrumento

If the format is ok for dvd (720x576) i can use it in tmpgenc dvdauthor (no prob)

If i demux the file to obtain the video file, then use requant or rejig to lower his size, i cannot use it in dvdauthor ????

The video file (m2v) play ok but there is a problem. When i remux with tmpgenc i have a lots of packet undeflow (????).

Someone can have a solution ??????

Thanks

ronnylov
20th November 2003, 13:53
Originally posted by burnix
Hello all.

Just a few word about my test on dvb file.

- first i capture with my dvb card
- then correct it with pvastrumento

If the format is ok for dvd (720x576) i can use it in tmpgenc dvdauthor (no prob)

If i demux the file to obtain the video file, then use requant or rejig to lower his size, i cannot use it in dvdauthor ????

The video file (m2v) play ok but there is a problem. When i remux with tmpgenc i have a lots of packet undeflow (????).

Someone can have a solution ??????

Thanks

I don't think you need to remux it. I beleive TMPGEnc DVDAuthor accept elementary files and you can demux it directly with PVAStrumento, rejig it and then import it without any remuxing step. Just use the same file names but with different extentions for audio and video (mpv and mpa).

Another way to do it is author a DVD with the original file that is too big and then use any DVD transcoding application to shrink the VOB files to fit a DVD. I have done this with DVDShrink but it may be possible in Rejig too?

burnix
20th November 2003, 14:01
I have tested the second solution, since my first use of dvdauthor. I think i going to use this solution every time. The only thing was that in the first release of dvdauthor dvdshrink cannot open my dvdstructure (pb on decoding key, but there is no css encryption in dvdauthor).

I can try too the first solution (import elementary stream treated by rejig).

I do all of this tonight and i keep you informed tomorrow.

Bye.

echooff
20th November 2003, 14:13
If the mpeg file is dvd compliant DvD Author will accept it and its audio without muxing. If there is a prior sync issue it must be cleared up first. I have found it is wise to use IfoEdit on the authored output to get vts sectors prior to burning.

Nic
20th November 2003, 16:15
http://nic.dnsalias.com/ffmpeg.zip
If you fancy using a bit of commandline encoding for m2v -> m2v, try this build of ffmpeg. I honestly don't know what the speed and quality will be like compared to CCE. But it might be worth looking into...(Read the ReadMe.txt)

-Nic

ps
@JVD: Forgot to ask for that IFO that only displayed Deutsch as a language. Could you mail it to me? mail: nic@nic.dnsalias.com

burnix
20th November 2003, 16:42
Is there any tools to analyse the m2v file generated to see where is the problem ????

daddy_fizz
20th November 2003, 22:01
i'm not sure if this is a problem with ifoedit or the rijig m2v file

when i try to author a rejig m2v with a single audio and subtitle track using ifoedit it will get about 5 percent done and then say

"INTERNAL ERROR: additional data required but no free space in input buffer"

???

~Fizz

mmgrover
20th November 2003, 22:26
@daddy_fizz


I would always get "INTERNAL ERROR: additional data required but no free space in input buffer" if i had a bad spot in my ac3 audio track.

mike

daddy_fizz
20th November 2003, 22:34
i will try reripping the ac3 and see if it works

thanks

~Fizz

daddy_fizz
20th November 2003, 23:54
nope didn't seem to help

hmmm...

~Fizz

jsoto
21st November 2003, 01:17
@daddy_fizz
Please check your ac3 with BeSliced (a fantastic DSPGuru´s tool).
Also, did you try to author without subs?. Just to know...

jsoto

dragongodz
21st November 2003, 04:17
mike - no probs.

nic - yes i knew why it did those short GOPs but i was just trying to show how ffmpeg left to defaults can overdo things. not only change scene change sensativity but also minimum GOP size to 5 and that should be better.
as for ffmpeg i have found that using EPZS(size 2) with SAD ME gives a quite nice picture and isnt too slow but i didnt test on long video so maybe other will. :)
i have some docs on things like rate control and transcoding etc if you are interested aswell. just let me know and i will email them to you.it will have to be soon though as i have ordered a new motherboard, case and stuff so in a day or 2 i will be busy pulling my pc apart and rebuilding a new one. :)

daddy_fizz
21st November 2003, 05:30
Originally posted by jsoto
@daddy_fizz
Please check your ac3 with BeSliced (a fantastic DSPGuru´s tool).
Also, did you try to author without subs?. Just to know...

jsoto

ran it through besliced and used the "fixed" audio track but still did it, reauthored without subtitle and worked fine... is this a known problem with ifoedit? thanks

~Fizz

Nic
21st November 2003, 09:34
@dragongodz: "yes i knew why it did those short GOPs" Then you should have told me ;) I didn't.lol. Yup send any info along. There doesn't seem much interest in the build I made though....

@daddy_fizz: There's a problem with the sup files created by ReJig. I was bugfixing lots yesterday (fixed that one at about midnight ;) ) Ill release it later today.

-Nic

daddy_fizz
21st November 2003, 09:49
thanks i appreciate it, i was going to start backing up my dvd collection with rejig...but was just waiting to see if this could be fixed...

~Fizz

Nocturno
21st November 2003, 14:33
@Nic .. will do some testing with ffmpeg when i find some time, your work is appreciated :D

Nic
21st November 2003, 17:57
http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip

Bug fix for the IFO Mode really, rough changelog:

SUP Creation Fixed. (substream ID was being included sometimes)
All Sundance's initial comments after 0.4a release fixed (Thanks alot!)
Can now export chapter times for IFOEdit Authoring
PTS & Audio Delay finding improved (VOBEdit gets it wrong too ;) )
Other things I've forgotten, but now it's alot more solid.

Created backup for Matrix Reloaded today using it and IFO Edit authoring, without problems.

-Nic

unixfs
21st November 2003, 18:19
so when can we expect the first 2-pass ReJig? :)

Nic
21st November 2003, 18:48
Tomorrow with luck ;) Only very basic, but almost done.

daddy_fizz
21st November 2003, 21:01
dang i think i'll have to wait for that one now :D

~Fizz

Nic
22nd November 2003, 01:13
http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip

ReJig now has 2pass;
ReJig can now calculate the size of the original M2V file and use that to calculate the percentage needed for a specified outputfile size. It's basic but works well.

-Nic

daddy_fizz
22nd November 2003, 02:22
nice! thanks, i for one really appreciate the work you have/are doing

how exactly do i use this sizing feature... i am a little confused :D

~Fizz

lighty
22nd November 2003, 03:51
@Nic

Good work with 2pass. Good size prediction especialy in IFO mode.;)

The only thing that surprised me is that first original m2v file is demuxed and then ReJiged m2v file is created. I didn't anticipate it and ran out of space on disc. Oh well, I will be better prepared next time.:D

mikegun
22nd November 2003, 09:04
hi,

I tried 0.4d with 2nd pass and rejig crashed at the end (tried 2 times).
it seems like rejig produced the m2v but cannot finish right.
the m2v is about the size I wanted but unplayable.
os is 98se.

regards,

mikegun

unixfs
22nd November 2003, 10:55
Nic,

I tried to recompress a 3.6 GB M2V to 780 MB but it ended being
1.2 GB. I didn't expect it to reach that size (after all motion vectors remain unchanged, right ?), but I noticed that the first
step was very fast (no more than 3 minutes).
Maybe a deeper scan will help?

In all my attempts, the final size was never < 33% of the movie, maybe this is the tipical size of non-quantizers?

Quality seems to be very good :)

Excellent work!

Nic
22nd November 2003, 11:26
@daddy_fizz: Tell me which bit is confusing and ill try and help. BUt basically put in the total size (including audio, subs and rejigged video) in MB into the size box and hit Process.

@lighty: Well it does say Demux & 2Pass ;) lol, well I had it originally only do a two pass. But it's slower and if it gets the size wrong, you can't rejig it. Maybe ill change it later.

@mikegun: Never had it crash, ill put in some debug output so I can catch where it's crashing. It might be a win98 thing (I don't have win98 to try it on :( ). Is it crashing in normal mode or IFO mode? What type of file? Thanks :)

@unixfs: The first pass isn't really a first pass ;) It just finds the size of the original M2V file (so Demuxing is all it does, at present it even does that on a raw M2V file which is stupid, and ill correct that in just a minute ;) ). I can't get it below around < 33% either, but I dont think it will be a problem (??)...And the quality does look good :)

-Nic

ps
The commandline has changed, so you can control it from there. Also if eyes' only contacts me (or mmgrover) Im sure I can make it more useful now for DoItFast4U....

dragongodz
22nd November 2003, 12:09
Nic - to answer your PM questions here, i only did a few tests with the changes i made and yes they always came out smaller. the amount could vary but there was always a size drop(closer to percentage user set). basically the react_delay etc is keeping track of if reduced size is falling behind and reacting if it is. i havent looked in to it to much as it appears a very basic system that should be replaced with the type of payback system i mentioned earlier.

unixfs - well i could probably make it go lower by adding some more steps to the react_delay and add quant etc but do you really want <33% ?

well i have my new motherboard (gigabyte 7s748, nice.....and cheap :) ) in a new case with some new ddr400 ram so now to rip this system apart and transfer the bits i want etc and then upgrade OS aswell. fun.....not. so see you guys in a week i would say. :)

unixfs
22nd November 2003, 12:29
Originally posted by dragongodz

unixfs - well i could probably make it go lower by adding some more steps to the react_delay and add quant etc but do you really want <33% ?


For me quality is not always the most important factor (dvb captures to be archived and dropped), so I would really love to shrink it even more.
Thanks!

mikegun
22nd November 2003, 12:32
@Nic
it was crashing in normal mode. I added 2 vobfiles from the same vts (extras vom t3 rc1),
checked 2nd pass, wrote in the desired size and started.
it not just crashed itself but the whole system, could be 98se related.

regards,

mikegun

Nic
22nd November 2003, 15:43
http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip

Only a minor update, but necessary.
(Doesn't try to do a two pass if encoding from a raw m2v file now, it can do it in just one pass)

ps
@mmgrover: if you want, give me access to rejig.org I can update as needed.

mikegun
22nd November 2003, 18:11
@Nic:

latest version doesn't crash. it seems to finish ok but the .m2v is still not playable.

regards,

mikegun

daddy_fizz
22nd November 2003, 19:20
@mikegun: what are you trying to play it with? i can't play a m2v file with any program on my computer but if i mux the m2v file then it will play fine.

@nic i just wasn't sure if that was the total size for the video or total size for video,audio,subs,etc. maybe you could put total size for dvd or something on there instead of total size for video. just my 2 cents

thank you

~Fizz

Nic
22nd November 2003, 20:04
Hmmmm :(

The main reason, dvd authoring is difficult for us in GPL is there is no easy solution to multiplexing the subtitles. The main multiplexor people can use for dvd authoring is mplex of the mjpeg project on sourceforge. So my idea was to add SUP support to mplex.

But hex editing through IFOEdit shows that it uses mplex code for it's multiplexing (!) Which is GPL software ! And therefore he has already added SUP support to mplex...(even if he is using it under some sort of LGPL his changes to the library would need to be released)

Is Derrow still around now days? I haven't followed the dvd authoring scene...Any chance of him releasing his modified mplex source code do you think? I dont want to have to write what he's already written...

-Nic

mikegun
23rd November 2003, 09:13
Originally posted by daddy_fizz
@mikegun: what are you trying to play it with? i can't play a m2v file with any program on my computer but if i mux the m2v file then it will play fine.


I rename it to mpg and play it with windvd. it works now, must have been my fault, sorry guys ...

regards,

mikegun

dvd2svcd
23rd November 2003, 11:21
you can use spumux.exe it's freeware. And you can use mplex with it too :)

http://dvdauthor.sf.net

I'm planning to implement this in dvd2dvd too as it is freeware :)

DVDRFreak
23rd November 2003, 19:08
@Nic

Hi Nic,

A new version of the original transcoder is avialable. It implements some new kind of rate control. According to the official side it has better speed and better quality !

Nic
24th November 2003, 11:06
@DVDRFreak: They may have changed it, but the source code download hasn't changed :( Ill email them.
@d2s: Hi, spumux, is ok, but a real longwinded way of adding them. as you have to feed the original files in to get the stream, which is then converted to PNGs (I think). If we could get the mplex code from Derrow to do it, it would be alot easier, otherwise ill have to write the code myself :(
(If your going to use it, you may want to compile the source in MinGW so you don't have to include the cygwin DLLs)

@mikegun: Glad you got it working :)

-Nic

2COOL
24th November 2003, 12:04
First of all, to everyone involved in rejig, a great job on a project that keeps getting better!:D I'm impressed! Well, I've been pretty much lurking behind the scenes and trying to beta test ReJig and I, for one, always need subtitles and I've had more failures and success when remuxing the transcoded m2v using IfoEdit. Though I had great success with doing Full Metal Panic volume one, a awesome episodic anime, I had problems with doing Finding Nemo. I had audio and video sync problems, which I think has to do with the stream delays. When I did this movie through a dozen times using IfoEdit to remux, I keep getting a constant half a second delay of audio throughout the movie. Anyways, in a nutshell, here's the working way that I went about doing this. Keep in mind you might need alot of space on your harddrives if the titleset is too big.

_________________________________________________________
1. Load each Titleset VOB separately into Rejig.
_________________________________________________________
2. Select 1 or 2 Pass and compress all.
_________________________________________________________
3. Remux m2v using, not IfoEdit,but with VobEdit 0.60.;)(I didn't see this freeware being mentioned in this thread but if not, that's my advice) For some reason, VobEdit is a better remuxer. Hmmm....the're both from the same author. Also, since there is no batch option, you can open up more VobEdit remuxing windows and as a speedier remux, drag the processing window down below the bar.
_________________________________________________________
4. Join all VTS_*_00*.VOBs using Vobedit.
_________________________________________________________
5. Create new IFOs with new VOBs. 1 PGC and 1 chapter for each cell.
_________________________________________________________
6. Replace original VOBs with new VOBs
_________________________________________________________
7. Use IFOUpdate in adjusted cell mode and with "Copy Audio and Subpictures Table" unchecked. I don't want my original IFO getting "Not Specified" streams. Used the IFO I got when creating new IFOs as my Authored IFO.
_________________________________________________________
8. Play to test.
_________________________________________________________

I really wasn't going for a targeted size in this test and I wish I could get it close to what I want my titleset to be shrunk to. What I really was trying to do is try to retain my subtitles without reauthoring. Since I live in NTSC country, IfoEdit 0.96 doesn't do me any justice for the moment. :(

I hopes this works for others.

DVDRFreak
24th November 2003, 12:31
Originally posted by Nic
@DVDRFreak: They may have changed it, but the source code download hasn't changed :( Ill email them.
-Nic

Try this url:
http://metakine.com/files/

Downloaded it file is called:
M2VRequantiser.tgz with a s the old version is also there but is called M2VRequantizer.tgz with a z.

Nic
24th November 2003, 13:17
@DVDRFreak: Excellent work, expect a new build tonight.

@2Cool: Thanks for your input, I know that all your feedback and guides are very highly regarded. :) Could you name some more DVDs you've had trouble with. Nemo here is still in Cinema...Also why is IFOEdit bad for NTSC stuff? Is the issue mentioned here: http://forum.doom9.org/showthread.php?s=&postid=391721 (sorry, im a authoring newbie, so have to check :) )

-Nic

ps
The reply from Metakine (sounds promising :) ):

Hello Nic,

I'm glad you have been able to compile the module on Windows - it had actually never
been tested on a little endian processor...

The code was up, I just screwed up with the link when I updated the web page (I was
pointing to M2VRequantizer.tgz instead of M2VRequantiser.tgz - and it worked because
of another typo - anyway!)

The source code is there as I speak in:

http://www.metakine.com/files/M2VRequantiser.tgz

You will see that concretely, the changes aren't so big - they mainly concern the
bitrate
tracking, but that improved picture quality by a lot.

Gaspard Petit

WiSo
24th November 2003, 20:03
Originally posted by Nic
I did right the commandline code into ReJig so people could use it from other apps even easier than a DLL. But there's been no interest in it so far...
-Nic
Hi Nic,
to build it as static lib would be great but commandline should be fine. The xbox scene is waiting for such a tool even when it takes a long time on a 700MHz celeron :D
Just my two cents.

The_Flash
24th November 2003, 23:53
Glad to hear the new version will be implemented soon. I've been following this project since the beginning, albeit quietly, and am very impressed. Thanks to everyone who dedicates time to the project. I love "gettin' jiggy wid it!"

Nic
25th November 2003, 01:16
(The new M2V code is added, but found bugs in the demuxing code while adding it. Taken me until midnight tonight to find it, hence no new build tonight, ill release it tomorrow, but hopefully this will fix problems reported to me with muxing in TMPGEnc in 2-Pass mode and perhaps other problems (IFO-Edit muxing, sync, etc))

DDogg
25th November 2003, 01:34
Nic, re the command line interest, I think there is, and there is going to be, a hell of a lot of interest. However, IMO, those type of tool writers are going to tend to wait a while for the construction dust to lay down a bit, which makes sense. I hope you don't take lack of activity at the moment with lack of interest. I figure it is completely disproportionate :)the changes aren't so big - they mainly concern the bitrate tracking, but that improved picture quality by a lot.Quite an understatement.

jonjon51
25th November 2003, 11:03
hello all :) , and excuse me in advance for my poor english language...

I bought a DVD burner recently, and I'm very interested in this project. I tested the quality of requant/rejig, and I'm very very impressive with the quality :eek: I requant Pearl Harbor and I can't believed my eyes and time taken to do that !!! so big thanks to Metakine, Nic and the others ;) for this fabulous tool !!!

concerning my post, I'm a very little VB programmer, and I code a Requant Calculator, named Requant Calc ;) , to determine the percentage and the video bitrate (CCE's encoding for example). It may work, but I'm sure it has lot of bugs :p

If someone could test it, it will be very great :)

Requant Calc v0.0.1 (http://easysvcd.free.fr/RequantCalc.zip)

Mug Funky
25th November 2003, 12:36
thanks for the tool...

i got a type mismatch when i ran it without specifying any values (except the video file)...

i'm not entirely sure how to use it.

Nic
25th November 2003, 12:56
@jonjon51: Nice little tool, what is it actually intended for? Is it to find out the percentage required to fit perfectly on a DVD-R? You could add a button to automatically run ReJig using commandline parameters to start the encode.
I also urge you to release the sourcecode and make it GPL, as I'd like everything to do with ReJig to be GPL if possible. But that is entirely your choice :)

Cheers,
-Nic

jonjon51
25th November 2003, 14:03
thanks for the fast replies :)

@Nic: Requant Calc was created to facilitate the research of the percentage of video size reduction. it will be able to have an option for launching Rejig in command line in near future ;).

a small tutorial:
- open the video file
- open the audio files
- open the subtitles
- enter the duration of film in the form h:mm:ss, or directly the duration in seconds
- press "Calculate" button
simple, no ? :cool:

I hope RC will be useful for you. of course, I will release a new version including source code, but I'm a newbie concerning GPL stuff :( . so for instance, I prefer do some tests and improvements before. I'm realy pleased to contribute, even just a little, to this project ;) all your comments, ideas, are the welcomes.

=> new version, without the bug reported by Mug Funky :D
Requant Calc v0.0.2 (http://easysvcd.free.fr/RequantCalc.zip)

JvD
25th November 2003, 14:56
Man, I am a Rejigoholic, cant stop using it ;-) Full movie backups toghether with doif4u, Reauthorist and scenarist and movie only with Rejig and Ifoedit works great. The last method needs som cut and paste action of subtitle colors (in ifoedit) and also add celltimes (Or do I really?). I have to calculate bby hand and it doesnt end up so exactly (4200-4400). Still it is more than a one-click-solution (nothing thats bothers me). Looking forward to the new Rejig with the improved picture quality AND a way to automate the whole process. From ripping to authoring. Keep up the good work!

DVDRFreak
25th November 2003, 15:00
Originally posted by jonjon51
thanks for the fast replies :)

@Nic: Requant Calc was created to facilitate the research of the percentage of video size reduction. it will be able to have an option for launching Rejig in command line in near future ;).

a small tutorial:
- open the video file
- open the audio files
- open the subtitles
- enter the duration of film in the form h:mm:ss, or directly the duration in seconds
- press "Calculate" button
simple, no ? :cool:

I hope RC will be useful for you. of course, I will release a new version including source code, but I'm a newbie concerning GPL stuff :( . so for instance, I prefer do some tests and improvements before. I'm realy pleased to contribute, even just a little, to this project ;) all your comments, ideas, are the welcomes.

=> new version, without the bug reported by Mug Funky :D
Requant Calc v0.0.2 (http://easysvcd.free.fr/RequantCalc.zip)

@jonjon51
Missing only the possibility to enter the DVD size. I'm a DVD+R user and those discs are smaller then DVD-R discs. Could you add an option to specify the size.

Also usefull if you want to keep space avalilable for some other data.

@Nic
Maybe it is also possible to integrate this in Rejig. So it will be completly automated. Just specify the DVD size and Rejig will calculate based upon selected audio and suptitles what the compression should be.

Nic
25th November 2003, 15:06
@DVDRFreak: Still don't own a DVD writer yet ;) (Don't even own a DVD Player yet, ordered one yesterday ;) (used my Duron800 up until now )). So my calculations might not prove fruitful (the problem is the added size that occurs due to muxing, that's the bit im not sure of yet).

@JVD: for the cell times do you use the export function in the latest ReJig? if you click export under the chapters it will create a list (unlike IFOEdit which create a Cell list?? Which is weird, as on a dvd the chapters are chapters, not cells (often get 2+ cells to a chapter)).
What do you have to calculate by hand? Is the 2pass code not very accurate for you? Or is that you have to work out what size you need?
Glad you like it so far :) The release later today should be even better.
(ps. could you also send any IFO files that have failed to be read properly to nic@nic.dnsalias.com )

-Nic

jhmac
25th November 2003, 16:02
@JVD

Could you do a quick guide on using rejig and doitfast4u?

E-Male
25th November 2003, 16:10
ok, where to start….

@jonjon51: nice contribution
but like Nic brought up, muxing vobs causes a certain overhead, does your tool take this into account?
@NicBtw I don’t know how to calculate this overhead, but I’m sure it’s possible to a certain extent of precision, I think the length (not size) of the video is the main factor

@JvD&all: for movie-only-backup I do like that:
-rip the video, audio and subs
-do some rough calculations and rejig the video
-then rip the complete vobs to hd (not needed if anydvd or similar is used)
-then use the remux .m2v feature of ifoedit (with strip streams and create new ifos for movie only disc)
(-repeat from the second step if size is not fine)
-burn or create image….
This way there is no need to copy colors and stuff

Can someone please explain to how to use rejig with doitfast4u, reauthorist and scenarist for full movie backups?
THX in advance
EDIT: jhmac posted while i wrote my post, i gues we basicly ask for the same thing

About the upcoming new version: if quality gets even better: WOW!!!
Hope more automation for movie-only and full backups (either in rejig itself or in tools controling rejig) will evolve soon
Can wait for the first full GPL backup tool(s)

To bad I can’t really contribute to the projects
Maybe my little guide helps some people, feel free to ask questions about it

CU
E-Male

Nic
25th November 2003, 16:32
mmgrover is hopefully going to collaborate with Eyes' to do the DoItFast4u work. (I've never used DoItFast4U so mmgrover will the better man for the job). At present DoItFast4U and ReJig probably aren't that viable until an update to both exists (which won't be far away I hope). (feel free to nag Eyes' and mmgrover ;) )

With the next release you'll be able to select the old transcoding algorithm as well as the new one. Just in case the new one has bad side effects.

ReJig will eventually be able to do Movie Only Backups all automated from inside ReJig. DoItFast4U im hoping will be used for the full back ups. But we'll have to see :)

-Nic

E-Male
25th November 2003, 16:36
maybe rejig could be split into 2 version

like "rejig basic" for simpel transcoding and movie-only-backups

and "rejig deluxe" with doitfast4u and dvdauthor code included for full-backups with one (GPL) tool

what does everybody think about that, good idea or bad idea?

to make this clear: i both versions should stay free, no freeware and shareware version or stuff like that

mmgrover
25th November 2003, 16:52
@E-male
As far as I know, ReJig will always be free?

Yes, ReJig currently works with DoItfast4U, but you would have to
play with percentage to get file size close.

I am currently working with eyes to incorporate the new
file size method of ReJig :-)

I was just dragging my feet a lil to get source code after nic added
new ReQuant engine...


mike

E-Male
25th November 2003, 16:55
>As far as I know, ReJig will always be free?

just wanted my post to be understood correctly (someone might have thought i'd recommand a free and a paid version, which is NOT the case)
i just meant 2 version instead of 1 with to different features that might get confusing (and maybe hard to keep track on code-wise, don't know)


>Yes, ReJig currently works with DoItfast4U, but you would have to play with percentage to get file size close.
>I am currently working with eyes to incorporate the new file size method of ReJig :-)
>I was just dragging my feet a lil to get source code after nic added new ReQuant engine...

looking forward to this better integration.....

jonjon51
25th November 2003, 17:14
new version of Requant Calc (including VB sources code ;)):
- you can specify manualy th DVD size
- the "Del" buttons now work perfectly
- you can directly run Rejig after that Requant Calc find the right percentage ;) the 2-pass mode is not yet implemented (@all: does it work fine ?), and it's completely untested (I'm at work now :D)

@E-Male: at the moment, RC doesn't take care about overhead :(. I didn't know that DVD muxing cause that... but I'll think about it :).

Requant Calc v0.0.3 (http://easysvcd.free.fr/RequantCalc.zip)

E-Male
25th November 2003, 17:33
hm, found that with a quick google search:
--------------
DoItFast4U:
"Built-in DVDCalc!
Amazingly accurate compared to others out there.
Adjusts for .vob overhead automatically! "
--------------
i gues that means we now know who to ask *g* ...

DVDRFreak
25th November 2003, 17:54
Originally posted by jonjon51
new version of Requant Calc (including VB sources code ;)):
- you can specify manualy th DVD size
- the "Del" buttons now work perfectly
- you can directly run Rejig after that Requant Calc find the right percentage ;) the 2-pass mode is not yet implemented (@all: does it work fine ?), and it's completely untested (I'm at work now :D)

@E-Male: at the moment, RC doesn't take care about overhead :(. I didn't know that DVD muxing cause that... but I'll think about it :).

Requant Calc v0.0.3 (http://easysvcd.free.fr/RequantCalc.zip)

Great. Tested it looks like there is still a problem.


Use Reauthorist to calculate size for my movie only:
4693190210 DVD size

14:50:56 VTS03 PGC01 angle 0 original muxed video size = 6012438537
14:50:56 Calculating size...
14:50:56 Audio+Subs = 387663963
14:50:56 VIDEO_TS = 0
14:50:56 Original muxed video = 6012438537
14:50:56 Initial reduction = 0.716142
14:50:56 Finished auto sizing...
14:50:56 VTS03 (raw: 4595494695) (muxed: 4693190210)
14:50:56 VIDEO_TS Size (0)
14:50:56 Total DVD Size (raw: 4595494695) (muxed: 4693190210) (total: 4693190210)
14:50:56
14:50:56 Encoding list:

"C:\..\VTS03\VTS__03_P01.16~9_1.AVS",0,9352,4947,0,5

This will give me a resulting DVD that almost always fit's on one DVD+R. Compression ratio calculated is 71.6142% CCE bitrate 4947

Used RejigCalc:
Samed DVD size so 4693190210

It gives me a percentage of 72.9% CCE bitrate 4928. Resulting DVD will be to big.
Edit:
To see if I am right I will try muxing later when the new version of Rejig arrives.

Edit2:
Add the CCE bitrates. Which seems to be very odd because the calculated bitrate by RejigCalc is lower the that of Reauthorist.

Nic
26th November 2003, 02:08
http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip

Missed out 0.4f, went to release it but my ISP was down, so made 0.4g instead with IFOEdit authoring support. Can now automate IFOEdit to author the DVD. Put IFOEdit 0.96 in the same directory as ReJig.exe.
(IFOEdit support just controls IFOEdit, it works on my English Win2000 but may not work on different operating systems...will need feedback to fix)

Also includes the new transcoding algorithm. At present you can't turn it back to the old one, however the old is used when:
1) Using percentage (1-pass) mode from the main dialog, unless you are encoding from a raw .m2v
2) In IFO Mode if using percentage (1 pass) encoding.

In all other cases the new encoding is used.

-Nic

The_Flash
26th November 2003, 02:32
Originally posted by Nic
http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip

Can now automate IFOEdit to author the DVD. Put IFOEdit 0.96 in the same directory as ReJig.exe.


Awesome! Thanks!

2COOL
26th November 2003, 02:34
Originally posted by Nic
Can now automate IFOEdit to author the DVD. Put IFOEdit 0.96 in the same directory as ReJig.exe.
(IFOEdit support just controls IFOEdit, it works on my English Win2000 but may not work on different operating systems...will need feedback to fix)
@Nic

It's great that IfoEdit can now be automated for authoring but like I previously posted, IfoEdit doesn't do too well with NTSC. Here is a past thread (http://forum.doom9.org/showthread.php?threadid=37953) on IfoEdit 0.95 authoring discrepancy. I guess it goes along with what you found too. http://forum.doom9.org/showthread.php?s=&postid=391721. :(

I'm doing Matrix Reloaded R1 right now using my method (http://forum.doom9.org/showthread.php?s=&postid=403103#post403103) I posted earlier and I'll see if I got audio and video sync. If successful then a full backup is possible with everything intact.

DMagic1
26th November 2003, 04:38
Funny you say that 2Cool. I was doing the same movie and I used Ifoedit. The result was jerky playback with my pc dvd player. It would not skip to chapters thru the menu or with controls. This was run with Ifoedit dvd player function and WinDVD. I don't know if it was an Ifoedit problem or Rejig yet. I'm about to use your method.

2COOL
26th November 2003, 04:52
To all,

If you want to shrink your menus using ReJig, substitute the original menu file with your ReJig's one after renaming and use Menu Extras in IFOedit to correct. Open your IFO in question, do a stripping of your VOB IDs, and KEEP EVERY VOB id. Replace old files with newly created ones and get VTS Sectors. Works for me. ;)

Update: Just got done with Matrix Reloaded with everything kept like original. No audio and video outof sync and it looks great IMHO. :D Thanks to all and I even get to retain my subtitles!:D:D:D

@DMagic1

If you are not using FAT32, decrypt your main movie or titleset vobs to a single VOB. I used DVD Decrypter with no splitting in file mode. This way you can get ReJig's m2v to remux in one session using VOBedit. You don't have to join cells using VOBedit, just rename the vobs accordingly and create new IFOs for them.

daddy_fizz
26th November 2003, 05:24
so can you use ifoedit to do full back up (not just main movie) if so i don't suppose you want to do a step by step 2cool :D

~Fizz

Mug Funky
26th November 2003, 05:36
am i insane, or is that latest download rejig 0.3b?

2COOL
26th November 2003, 05:40
Originally posted by daddy_fizz
so can you use ifoedit to do full back up (not just main movie) if so i don't suppose you want to do a step by step 2cool :D

~Fizz When I did Matrix Reloaded, I had used ReJig 0.4d. I'll see what I can do after trying the movie again using 0.4g. The only problem I can get is trying to calculate accurate sizes so that my remux titleset is where it supposed to be. This goes for eveything else like menus and other titlesets. I just need a big picture on the whole DVD on what sizes I can set them to. Other than that, my method seem to work. I'm 3-0 now. Though I used IFOedit in my small guide, the big player is VOBedit in the remuxing department.

2COOL
26th November 2003, 05:42
Originally posted by Mug Funky
am i insane, or is that latest download rejig 0.3b? Just downloaded not too long ago and am using it right now. It does show 0.4g in the window title. Even says so in the ReadMe.txt

Mug Funky
26th November 2003, 06:41
wow... i gotta have a chat with my computer. it's been doing odd things lately. i downloaded it twice...

[edit]

seems to work now. strangeness.

[edit edit]

hmm... i seem to have found a little bug.
http://www.sharemation.com/mugfunky/hideki.jpg

what do you suppose those interlacy blocks are?

some stats - Chobits v3, R1, NTSC (of course:(), and i think this bit is IVTC, but the intro alternates quite a bit so i'm not concrete about that. it may be interlaced.

oh, yeah. rejig settings - put the vob file in (not ifo mode) and set it to flat 1-pass 50% recompress.

tried it in 2-pass mode (filesize set to 50% of the original) and it worked fine.

daddy_fizz
26th November 2003, 07:42
wierd...

just tryed matrix reloaded

if i play it in powerdvd, perfectly smooth, if i play it in zoomplayer, playback is very choppy.

quality is good, and fits very well to dvd!!! just about every last mb used :D

also for some reason even though i authored with i can not turn them on in powerdvd...???

~Fizz

2COOL
26th November 2003, 07:47
Originally posted by daddy_fizz
also for some reason even though i authored with i can not turn them on in powerdvd...???
@daddy_fizz

Turn what on? subtitles?
if i play it in powerdvd, perfectly smooth, if i play it in zoomplayer, playback is very choppyI tried with Zoom Player Porfessional 3.20 final and I didn't see any choppiness.

2COOL
26th November 2003, 07:59
Update: Just did Matrix Reloaded again with ReJig 0.4g doing my single combined movie vob at 2pass @ 3000MB. Total DVD size on DVDR is at 4.32 GB (4,644,859,904 bytes). Looks awesome to me! Sweeeet!:D:D Kept everything, even the Warner Bros intro logo and FBI warnings. Again, I have my subtitles.:D Imagine if I stripped out all unwanted stuff like even French 6ch audio. The video quality would be even better.

Hmmm...maybe I'll do a LoTR movie next.

daddy_fizz
26th November 2003, 08:32
yes subtitles, cannot turn them on in powerdvd,if i use zoomplayer then i can see them flash but they are a green color and look fuzzy...

~Fizz

2COOL
26th November 2003, 08:36
Originally posted by daddy_fizz
yes subtitles, cannot turn them on in powerdvd,if i use zoomplayer then i can see them flash but they are a green color and look fuzzy...

~Fizz Works perfectly for me in PowerDVD 5.0. Umm...how did you go about doing your DVD?

daddy_fizz
26th November 2003, 08:55
i used the automatic reauthor with ifoedit... should i use vobedit?

~Fizz

jhmac
26th November 2003, 09:48
@2Cool

Would you please do up a guide for us newbies?

bb
26th November 2003, 10:01
This thread is now 25 pages long :eek: . What do you think about opening a new thread for every major new version? Imagine someone searches for a ReJig topic, and sure he'll find... this thread! So he's still got up to 25 pages to browse until he finds the part he's interested in.

bb

JvD
26th November 2003, 11:35
OK, havent been able to try the new version yet but I do have som qustions and answers.

Nic: When I make my full-movie-backups (dif4u, Rejig, Reauthorist and Scenarist) and load rejigdata in Rejig, there are calculated % for each videofile in the 1-pass-window. But the 2-pass option isnt calculated for me. It says 0 (atleast in 0.4e). NIC, this is what I mean "calculate by hand". Is this corrected or did I miss something (as usual ;-)

Eyes (and Nic): there would be better that DIF4U use the 2-pass-option as standard instead of 1-pass as it is now. Since DIF4U can autorun Rejig this would be a great option that the % number for 2-pass also is put into the MB-field. Is this a bug or has it allready ben taken care of. (or is it ME AGAIN!)

Nic (and others): In the new version 0.4g there is a possibility to tell IFOedit to author the movie for me. Since I am still at work I havent tried this feature yet (eager to get home) I am curious about this. Can ReJig do a full-movie-backup in this way or do i have to take one PGC at the time, as before? Since i think IFOedit is faster and FREE it IS a better alternative than Scenarist.

bb, dont you think there is a point in only having one thread, read Nics ReadMe.txt. But for a new guy, yeas it could be hard to read trough the full thread. But then again, it is good reading and you can learn alot. For those that been around since the start i find this 25 pages tread OK. If thera are one new thread for each new version ther will be alot of ReJig threads, dont you think. And you have to remember in which thread you last posted you qustion or answer, and so on. There could be a sticky witch updated with every new version and release notes, what is new and what is fixed. And people who have specific qustions about ReJig can start new threads to get ansvers, BUT the development of Rejig suits well in this format. But then again, thats just my thoughts ;-)

Nic
26th November 2003, 12:07
By Full Movie I assume you mean Full DVD type backups (i.e. all the extras).
The current ReJig and DoItFast4U will be changed by mmgrover and Eyes' I hope, to work better with each other. I hope that will happen soon and leave it to them.

IFOEdit is only used currently to make movie only back ups at present.

I think when DoItFast4U support is added properly and the last bugs in the current version have been removed. Then Ill start a new thread and collaborate with people to write a few guides. So people that have been over awed by the size of this thread can start a fresh.

-Nic

ffroms
26th November 2003, 13:19
Hi to all !!!!
I'm reading these thread for sometime now (even have direct link in my Favorites) and I'm realy amazed how fast and good ReJig works.
Now, I have a little question. Will it be possible (in some future version) ReJig video but to use diffrent compression level for diffrent part of same movie?
For example:
If I use IFO mode and set 2 pass to 4000MB and then define for end credits to use only 30%, for action part to use 100%, for slow part 60% and so on.
This option will be much better for achieving the best possible picture for movie. I know that something like this can be done by spliting vobs to cells but that is to much work. There is something like that in DVDShrink but I would love to do all my work using ReJig.
BTW, is it OK now to use ReJig for menu part?
Thanks again to all for hard work.

FFS

P.S. IfoEdit do have problems with authoring NTSC DVD so maybe it would be better to use some other (free) program for authoring (although I use ifoedit for everything besides authoring).

E-Male
26th November 2003, 14:50
on a good dvd te bitrate already is distrubuted well
and rejig just keeps this distribution

mmgrover
26th November 2003, 14:51
@Nic


I added rejig to web site :-)
I am working on making changes to code for DoItFast4U right now :-)

mike

E-Male
26th November 2003, 16:35
just for my curiousity:
has anyone of you programmer looked into that gpl authoring tool(s)??

Nic
26th November 2003, 16:50
@E-Male: Yup, lots. Main problem is a viable clean way of getting subtitles into vobs. Ill keep you posted on developments...

E-Male
26th November 2003, 16:52
thx for the info

i'm i right when i think that this is the last missing part for a complete gpl dvd-backup tool?

jdobbs
26th November 2003, 16:55
I would think that with subtitles all you need to do is keep them intact from the original source (packetized) and remerge them into the output stream at the proper time based upon the SCR. That way you could save all that time (in some methods) pulling them out and recreating them. Anybody know a reason why that can't be done?

Nic
26th November 2003, 17:37
@jdobbs: Thats what im looking into, I don't know of any code existing that's capable of doing it. I've asked Andrew Steven's of the mplex project his opinion on the matter. It's very doable, it's just a matter of writing the code in the best way.

@E-Male: Yup that would make it all GPL. Seeing that IFOEdit contains GPL code in the Authoring section, I was hoping Derrow would release at least that part under GPL. But to no avail as yet.

-Nic

jdobbs
26th November 2003, 17:50
@nic,

I'm currently working on something similar. It's aimed at remerging CCE output into the original stream. I'll hack it and test it later today and see if the captions appear properly.

E-Male
26th November 2003, 18:07
Seeing that IFOEdit contains GPL code in the Authoring section, I was hoping Derrow would release at least that part under GPL. But to no avail as yet.

doesn't GPL mean that you can use the code but MUST publish the new source???

Nic
26th November 2003, 18:15
@E-Male:
"doesn't GPL mean that you can use the code but MUST publish the new source???"
You'd think so wouldn't you...but not in Derrow's eyes....

@jdobbs:
I hope your considering to make it opensource/GPL :) If so that's great news :)

-Nic

mmgrover
26th November 2003, 19:40
I have uploaded 0.4h to web site for the the new DoItFast4U
It can read both new and old REJIGData.txt files.


Nic, I update the version info to 0.4.8.0 for programs like
DoItfast4U etc,etc


mike

Doom9
26th November 2003, 19:59
doesn't GPL mean that you can use the code but MUST publish the new source???
Not exactly. But you must make it available upon request. You are even allowed to charge an amount to cover your cost of providing the source (but that amount must really only cover the delivery, you cannot make money off it).

E-Male
26th November 2003, 21:11
ok, but still he has to show the code, that's what i mean

VILLA21
26th November 2003, 23:28
Originally posted by mmgrover
I have uploaded 0.4h to web site for the the new DoItFast4U
It can read both new and old REJIGData.txt files.


Nic, I update the version info to 0.4.8.0 for programs like
DoItfast4U etc,etc


mike

means that DoItFast4U 1.3.5 is out?

mmgrover
27th November 2003, 00:45
@VILLA21

I'm not sure when eyes`only will release his next version.



mike

dragongodz
27th November 2003, 04:36
wow. go away for awhile and look at those pages grow. :)

Nic - for authoring i still think the dvdauthor package is the way to go. it can mux video and audio plus create ifo's including chapters etc. ok the subs are not the best at the moment but it is still being worked on and is open for anyone to grab and change. to see some of things being done check here

http://www.dvdrhelp.com/forum/viewtopic.php?t=180017&postdays=0&postorder=asc&highlight=dvdauthor&start=0

so you have a duron and no dvd burner and no standalone player ? hey thats me too. :)

Doom9 - yes you are right, you must make available source on request. you also must state that your program is using GPL source code in it and the program must be released under GPL aswell. i dont know about anyone else but this is the first i have even heard of ifoedit using GPL source. i have to wonder why then it has never said so on his site or that the source is available by request etc.

Doom9
27th November 2003, 08:24
i have to wonder why then it has never said so on his site or that the source is available by request etc.Well.. I didn't know about this either until very recently. But it appears that the issue will be resolved shortly..

DVDRFreak
27th November 2003, 08:29
Originally posted by mmgrover
@VILLA21

I'm not sure when eyes`only will release his next version.



mike

@mmgrover

I tried to use it but somehow it does not work with DIF 1.3.4. Maybe I should enable the copying of unused VTS files but that is not what I want because those files I will blank out anyway.

Will this new version also include an option that it will not create the DVD2AVI files. For ReJig these are not needed and it takes a while to create them.

ffroms
27th November 2003, 08:36
Originally posted by E-Male
on a good dvd te bitrate already is distrubuted well
and rejig just keeps this distribution

I don't know if this was answer to my question but I didn't mean that. I was thinking more like in Xvid where you have option to set fixed quanta for end credits there for you end up with more space for main movie. Same thing can be used for diffrent parts of movie.

FFS

jhmac
27th November 2003, 12:11
Happy Bird Day all...

mmgrover
27th November 2003, 14:19
HAPPY TURKEY DAY ALL :-)





@DVDRFreak

What errored out?

mike

JvD
27th November 2003, 16:52
Happy bird!? (from a vegeterian point of view ;-)

Yeah, right, and He is the the leader of the free world? Sure.
http://www.whnpa.org/events/thanksgiving.jpg

Happy Thanksgiving!

rasta21
27th November 2003, 17:07
...sorry but does anybody know how to compile the new version in linux

...i tryed

gcc main.c -o requant -lm

...but i got the error

main.c:71: error: invalid register name for `outbitbuf´

unixfs
27th November 2003, 17:13
you have to undefine the REGISTER_<SOMETHING> macro at the beginning,
that is PPC specific.
And don't forget to #undef DEMO and to add -O3

rasta21
27th November 2003, 17:24
...thanx a lot...now it works

DVDRFreak
27th November 2003, 17:55
Originally posted by mmgrover
@DVDRFreak

What errored out?

mike [/B]

Wel DIF4U 1.3.4. says it starts ReJig but finishes right away and there is no ReJig.txt file created. I figure it has something to do with the option to copy unused VTS files to VIDEO_TS. I did disable it in my previous test because I do not want to include those in my final DVD.

mmgrover
27th November 2003, 18:46
@DVDRFreak

Ya, Copy Unused VTS Sets must be checked...
I always check every vts in DoItFast4U and run ReAuthorist to
Put dummy video clips in the ones I don't want then remove from
ReJigData.txt the ones I blanked out :-)


mike

mmgrover
27th November 2003, 18:54
A nice trick is to open the REJIGData.txt

look at your percentages

"M:\Star Trek The Next Generation Season 1 Disc 3\VTS02\VTS__02_P01.P.4~3_1.m2v", 2, 52"

Look at your m2v file and get 52 percent of it file size.

Then change line to:

"M:\Star Trek The Next Generation Season 1 Disc 3\VTS02\VTS__02_P01.P.4~3_1.m2v", 2, 52, 890"

this will cause rejig 0.4h to use desired file size instead of
percentage.

mike

DVDRFreak
27th November 2003, 20:25
@Nic

The new engine produces bad quality in comparison to the old one.

I did a test on a movie at 71%. The new engine produces a picture with a lot of scenes in them where the pulsating pixel problem is very noticable. The old engine however produces a picture without these anoying artifacts.

Also there are macro blocks in the beginning of the picture with the new version that are not there with the old one.

Did anyone else do a quality comparison yet ?

Nic
27th November 2003, 20:47
Did you use ReJig to do the testing?

-Nic

DVDRFreak
27th November 2003, 22:27
Originally posted by Nic
Did you use ReJig to do the testing?

-Nic

Yes, did do a few test on different movies using

ReJig 0.4g new requant engine
ReJig 0.4c old requant engine

In both cases I used raw M2V files. With the same ratio (71.765%).

Good example is Indiana Jones and the temple of doom I just bought. The beginning the old version shows no blocking or artifacts in the studio logo. The new version show pulsating and macro blocks. A little later in the movei when Indy is having a argument with the girl the wall that is yellow/brown is pulsating in the new version in the old version it is not.

E-Male
27th November 2003, 23:35
i was goign to do some back-ups at teh WE anbyway
i'll do the encoding twice to compare the results aswell

The_Flash
27th November 2003, 23:39
Originally posted by DVDRFreak
@Nic

The new engine produces bad quality in comparison to the old one.



I have to agree. I ran some comparisons on the new engine and have found that it tends to macroblock more often, especially at the beginning of films. I also concur with the above mentioned pulsating findings.

Nic
27th November 2003, 23:44
http://nic.dnsalias.com/ReJig.zip
http://nic.dnsalias.com/ReJig_src.zip

Load it up once then check the registry:
LOCAL_MACHINE\Software\ReJig

You'll be able to turn on the Original Engine there (it's only checked at start up, so only change before loading ReJig). Please let me know the quality of the two. Makira sent me a patch for libmpeg2 to test PSNR values, and assures me it's better quality. Ill do my own testing soon.

-Nic

@mmgrover:
Could you add a link to the dvdremaster website on www.rejig.org. Maybe one on the frontpage too, they are giving a lot of support. I think they'd appreciate it. Cheers :)

mmgrover
27th November 2003, 23:48
@Nic

I'll do that right now :-)

mike

Nic, It's on the main page and the links page.
Check if you could to see if it looks ok?


mike


I added 0.4i to web site

Fabiano
28th November 2003, 02:14
Hi,

Does anybody know what is the compression ratio between I,P and B-frames given a certain recompression factor ?

I've noticed with the old engine if you use a recompression factor of 90% only B-frames are compressed.

Fabiano
28th November 2003, 02:20
@NIC

Is the 2-pass working with the new engine for a m2v file? (Rejig 0.4i)

I've tried setting the output to 4300MB and 4200MB and both of them gave me an output 60MB less than the original file. The original file is 4660MB.

Edit 1:
I just tried 1-pass 92%, and again it gave me a file 60MB less than original.

I used AviSynth to compare both files (subtract frames), they are the same.

Am I missing something ?

Is 9x% too high to recompress using the new engine ?

Edit 2:
Just tried 80%, same output!

I think the new engine does not like my Alias HDTV files ! :(

dragongodz
29th November 2003, 03:30
i have just sent a new mod to the old engine to mike at rejig.org so hopefully you should see a new version of 0.4i up soon. it should be better/closer to resize ratio again. this is probably as far as it can be pushed using these changes, really what it needs is P frame quantisation aswell after a percentage of B frame quant is applied. that would produce even better size and should be better quality. if you want a more detailed explanation of what i mean just say.

speaking of quality....on static scenes the new engine does produce more blocks but on motion scenes the old engine can produce worse blocks that go good after a second. this is because the main brunt of reduction is being put on B frames. that is B frames are having the most done to them so when a lot of reduction is required they are made very bad.

unixfs
29th November 2003, 08:42
Originally posted by dragongodz
what it needs is P frame quantisation aswell after a percentage of B frame quant is applied. that would produce even better size and should be better quality. if you want a more detailed explanation of what i mean just say.


yes, please :)

Once I applied the changes you proposed to the reaction parameters to make m2vrequant compress more:

in requantengine.cpp change the react_delay values. so -2.5f becomes -1.0f, -5.0f becomes -2.5f. then change -60.0f to -10.0f and -80.0f to -20.0f. make sure to change all instances

but the result was the same; is there anything else (that can be made with sumple variable assignment) that I can do to make the program compress to less than 33%?
I'd really appreciate it!
Thanks.

DVDRFreak
29th November 2003, 10:10
Originally posted by dragongodz
speaking of quality....on static scenes the new engine does produce more blocks but on motion scenes the old engine can produce worse blocks that go good after a second. this is because the main brunt of reduction is being put on B frames. that is B frames are having the most done to them so when a lot of reduction is required they are made very bad.

The new engine however produces the enoying pulsating picture effect that is veru vissible on my TV. The old engine does not seem to have this problem if you use a percentage >= then 70%. Could this be caused by compressing the P-frames to much.

For now I'm sticking with the old one.

Nic
29th November 2003, 11:29
Thanks for the feedback, I might make the old engine the default for now then...

Ill try to get makira to come look at the thread, maybe he can post a comment.
He last wrote to me saying:
"It is a definite improvement. The bitrate controller is simply better."

Maybe it is my port or implementation that is causing an issue, ill look into it.

Last night I was writing a program that could copy the subtitle colors from one IFO to another IFO (like IFOEdit can do). Ive also written into a program called replex the ability to do:
replex in.vob in.sup out.vob
Which will mux sup files. Tried out dvdauthor too, works great with those files.

Got a dvd writer now too ;)

-Nic

E-Male
29th November 2003, 12:22
seems my exitement about this project was morethan justified

so rejig now can rip, transcode and author movie-only

i assume it's not much work finding out the length of the video and the bitrate of audio streams

so it shouldn't be hard to let rejig calculate the right final file-size for the video

let's say we use 4.2 GB
and subtract the size of the audio streams (=length * bitrate) and subtitles (can their size be easily calculated?)
then we got the video size

so after selecting which streams should be kept rejig could do the complete movie only backup automatically

thoughts on this?
anything difficult i overlooked?

CU
E-Male

p.s. it would be cool if on the window where i seletc which streams to keep rejig would directly show the needed percentage of the video compression, so i get an idea how many stream i can keep without causing too much quality loss

p.p.s. if no additional compression by rejig is needed it should of course skip it

p.p.s. will post quality test results on sunday or monday

dragongodz
29th November 2003, 14:12
unixfx - i also lower quant reaction and added an extra quant increase if further behind. easiest way to see all the changes is look at the requantengine.cpp and search for dragongodz. they are in the current version of rejig aswell. but please try my modded verion 0.4i when mike puts it on rejig.org (should be in development section) aswell. you will need to do the registry change to use old engine as Nic said earlier.

ok quick explanation of what i was talking about with the new engine.
now i have not gone looking through the code so am going on what was said comparing it to dvd2one(on dvdremaster site). it says basically that the new engine is a CBR engine, thats Constant Bitrate Reduction. so if you want to reduce the video by 30% then all frame types are reduced 30%. pretty straight forward. problem being i do not think that is the best since once you get to 30% you are doing quite a bit of damage to frames that should not be.
i think a weighted by frame type reduction would produce better quality. first i should say this is done a GOP at a time rather than a frame for size accuracy.so using the example of 30% reduction you reduce B frames 30%+30% of reduction amount(meaning 30% of 30%) so B frames would be reduced 39%. does this reduce the GOP to the 30% reduction ? unlikly, only when you are doing only a tiny amount of reduction would B frames alone be enough. so second step is to reduce P frames up to the point that the 30% reduction of GOP size is obtained. except if P frame reduction reachs the 30% and GOP reduction is still not done. only then reduce I frames aswell. since extra reduction was done on B frames I frames should only need to be reduced a little and never the full 30%.
so B frames would be reduced the most( reduction amount + 30% of that), P frames reduced to the reduction amount at most and I frames always less than reduction amount.
weighted frame reduction based on type as i said. :)

Nic - cool about the subs and dvdauthor. what dvd burner did you get ?

e-male - skipping reduction if not needed should be really decided by rejig itself, that way the engine is never called and frames are simply copied. i asume thats what you mean ?

JvD
29th November 2003, 14:32
Originally posted by Nic
Last night I was writing a program that could copy the subtitle colors from one IFO to another IFO (like IFOEdit can do). Ive also written into a program called replex the ability to do:
replex in.vob in.sup out.vob Which will mux sup files. Tried out dvdauthor too, works great with those files.

Got a dvd writer now too ;)

-Nic

Congrats to the new writer, at last ;-)

How about those programs, are they free to try out?

E-Male
29th November 2003, 19:51
Originally posted by dragongodz
e-male - skipping reduction if not needed should be really decided by rejig itself, that way the engine is never called and frames are simply copied. i asume thats what you mean ?

i just mean if ((target size) >= (original size)) then rejig should basicly function only as a ripper (and reauthorer) but not as a transacoder, which would make no sence in this case
basicly i shouldn't have said that, I'm sure Nic thinks of sooo basic stuff himself :)

Nic
30th November 2003, 02:01
Have to be quick, wrote two little programs today. One which I wrote from scratch this morning called SupMux which works in the form of:
SupMux c:\in.vob c:\out.vob c:\english.sup 0x20 c:\dutch.sup 0x21

You can guess what it does :) Works real well.

Also CLUTCopy, written from scratch, which works like:
CLUTCopy c:\original.ifo 0 c:\new.ifo 0
which copies the original subtitles colors from original.ifo PGC0 to new.ifo PGC0

Also, incase you didn't know, Derrow has agreed to release the authoring code of IFOEdit. Although he has to seperate it from IFOEdit (im guessing), so this may take a while to surface.

But I dont think we need it. I tried my new programs with mplex -f8 and dvdauthor and did Reloaded with two subtitle languages and one audio language. Came out perfect and right size :)

So ill be adding all that in soon,
-Nic

TCmullet
30th November 2003, 07:20
Nic,

Do you think you'll be modifying ReJig to shrink P frames? If so, do you know approximate when?

And yes, the new engine always shows worse for me than the old. I am embroiled in capturing volleyball games from cable. Using the new engine (default in 0.4i) the players have a 'pixelation force-field' around them when they are moving. With the old engine, that artifact is much more negligible.

And yes, I vote to have this 1 big thread, not a lot of little threads--no matter how big it gets.

Your program is changing my life... and I don't even have a DVD player. Thanks so much! :)

TC

DVDRFreak
30th November 2003, 15:33
@Nic

New version of the engine is available. No idea what has changed however.

Nic
30th November 2003, 16:07
Cheers, Ill release a new build tonight.
Im going to make a new seperate prog that will come with ReJig that will do DVD Authoring, ill try to make it look like IFOEdit's DVDAuthor Dialog. It will use mplex, dvdauthor, supmux, clutcopy all built in. So if I go quiet on ReJig for a bit, it will be because im writing that.

-Nic

echooff
30th November 2003, 16:19
Wow! You rock. Keep up the great work. Love this stuff.

TCmullet
30th November 2003, 16:54
Originally posted by Nic
Cheers, Ill release a new build tonight.
Im going to make a new seperate prog that will come with ReJig that will do DVD Authoring ... So if I go quiet on ReJig for a bit, it will be because im writing that. -Nic Great! However, is there any chance you could do P-frame reduction first? We've got lot of mpeg PS files that have to be cleared off, and I'd hate to do them prematurely because I couldn't wait for the P-frame enhancement. However am running out of space, so will have to use .4i if P-frame enhancement is not soon. Hope you understand.

If you KNOW you won't tackle P-frames soon, could you please say so? Thanks! TC :)

TCmullet
30th November 2003, 17:00
Originally posted by DVDRFreak
@Nic
New version of the engine is available. No idea what has changed however. Nic, for us idiots out there, could you please make it clear in the docs which engine will be which? I'm now settled on the idea that the registry switch should be set to 1 to use 'the old engine'. Now that there is 'a new version', will there be 3? Or just 2, and which 2? Will the 'new' one replace the "OLD new one" leaving the "old OLD one" intact? I hope you see why this is a bit confusing.

Nic
30th November 2003, 18:02
@TCMullet: P-Frames do get compressed, just perhaps not as well as they should be. I wont be looking into in much detail soon. Ill be hoping makira and metakane will be doing that for us ;)

There will only be a maximum of two engines so:
Use Old Engine = 1 means using the old engine
Use Old Engine = 0 means using the latest engine

As far as I can tell this new update doesn't help matters...Ill email makira and see what he thinks (I can still see the blocking on the first few frames, etc)

(Currently im checking for SUP creation bugs...)

-Nic

ps
grrr...found the bug in sup creation. VobEdit has it too, hence I never noticed it....

E-Male
30th November 2003, 22:40
EDIT: question removed
found the reg key, will test now

Eyes`Only
1st December 2003, 03:34
DoItFast4U! 1.3.5 has been rlsed for use with Rejig 0.4h+. I've been sick (crazy winter viruses!) lately so it took me a while to code, test, and feel comfortable with the newest bugfixes/additions.

Sorry I haven't been active on this thread but I honestly feel like DoItFast4U! issues should be discussed in the Big3 section of this forum, and I don't want to discuss most of the things that have been asked in this thread as I feel it is better left to other discussion. On the other hand, don't feel like you can't ask questions about DoItFast4U! and Rejig integration in the Big3 forum, because you can, and I openly welcome you to. I talk with mmgrover about integration often and he is very active in this thread so I feel he's a good liason for this thread. If anyone disagrees, I'm open to opinions.

DVDRFreak: Your assumption of not needing d2vs is incorrect. The d2v and avs files are still needed for accurate duration assessment and so they will still be created.

TCmullet
1st December 2003, 06:59
@Eyes only, and everyone else,
While I haven't been talking about doitfast4u, dvdshrink, etc. I have been looking into them. Or perhaps I should say it was a couple long weeks ago I was recommended to look for dvdshrink and related utilities that I somehow found Rejig. The big question on my mind is: Are there programs other than Rejig that will accept an mpeg2 program stream (.mpg) or elementary stream (.m2v) and create an output stream like ReJig? I've tried Dvdshrink, but could not make it open my .mpg or .m2v files. What good are those programs if they won't open the mpeg2 files on which DVD is based? (I suspect they are working with DVD-authored files of which I am still ignorant as I have no DVD player yet or any DVDs--but I'd appreciate y'alls feedback and/or orientation.)

My background is that in late 2000, I got a Dazzle DVCII and have been active at times on the discussion board www.dazzlegeek.com. I've both received and given a lot of help. There's been a lot of great on-point and slightly off-point discussions as well. Others have occasionally visited the board and commented on how great it is both in attitude and content in comparison to other boards. My own personal experience is limited to burning PS files to CD-R and a few SVCDs. Some (or many) of the other users there are into DVD authoring and burning, but I'm behind the times. This is the only Doom9 thread I've jumped into--twas a challenge to wait out those 5 days, but am glad to be here. As a whole I found it very helpful to read the entire thread up to this point. Many thanks to Nic and everyone. :)

Eyes`Only
1st December 2003, 07:24
TCMullet: CCE is my tool of choice for reencoding .m2v files. You can get excellent quality even at low bitrates (something no transcoder can do currently). Though there's an upside (quality) there's also a downside (speed) so it's basically dependent on how much you value quality. I personally don't mind the extra time for the output I get. However, this topic definitely doesn't belong in a pro-Rejig thread :)

For more info see: http://www.doom9.org/mpg/cce-advanced.htm

DVDRFreak
1st December 2003, 08:09
Originally posted by Eyes`Only
DVDRFreak: Your assumption of not needing d2vs is incorrect. The d2v and avs files are still needed for accurate duration assessment and so they will still be created.

Thanks for clearing that up. I thought it was nly used for reencoding with CCE.

Eyes`Only
1st December 2003, 08:12
DVDRFreak: no problem ;)

dragongodz
1st December 2003, 11:36
Nic - do you have a working email for rejig.org ? i have done a little more tweaking (to both engines) and thought people would like to try/test them out. basically original engine should down size more accuratly(and lower) while new engine should look better(less blocky) and still hold goof sizing for 70%(but 50% is FUBAR more than it already was). since mike never put the last changes and he hasnt messaged here for a while i was wondering if sending it to you via rejig.org email would be possible so you could put it on the development page ?

the question about P frame quantisation probably came about because i said it isnt done. well with the old engine P frame non-intra does not change quant but drops last coefficient. so i basically said proper requant of P frames should help produce better sizing and better quality by taking some of the work/reduction off B frames. yes the new engine does do it but too heavily which is causing the blockyness. sorry for any confusion over this. :)

dragongodz
1st December 2003, 11:40
"However, this topic definitely doesn't belong in a pro-Rejig thread"
not at all. its the truth that transcoders will not and can not give the same quality for high compression amounts. if you are talking reducing the size a small amount then transcoders can do a fantastic and fast job but for large compression proper re-encoding is the only real way to get the best results.

JvD
1st December 2003, 11:42
Just sitting here waiting, nothing to do (accept working ;-) so it would be nice to try it out.

dragongodz
1st December 2003, 11:51
hahaha well jvd if you email me (my email is on rejig.org) i will send it to you.

its 0.4i modified meaning you need to do the registry change to change which engine to use of course.

please dont everyone ask for it though unless maybe you have somewhere you can make a link for others to download from until its put on rejig.org.

JvD
1st December 2003, 12:25
Well, I sent u an mail but all versions should be up on rejig.org for everyone to evaluate (as soon as possible). Ill try the same move with the old end the new (your) version and compare the too.

dragongodz
1st December 2003, 12:54
jvd - you've got mail. :)

yes i agree it should be on rejig.org for all who want to to try. problem is i cant do that. mike(mmgrover) started the site and put the first version i made changes to (0.4b) online but he hasnt been around and never put up trhe last changed version i did. i remember nic asking for access to do it so hopefully he has it. i will try emailing it to his rejig.org email in hopes that he can put it up anyway.

Nic
1st December 2003, 15:09
@dragongodz: You can always get me at nic@nic.dnsalias.com nic@rejig.org should work and get to that address too, but nic@nic.dnsalias.com is the direct one.

As DVDRFreak said, they seemed to update source on Saturday, have you looked at making changes to that one? I didn't do a diff so I cant tell the difference between the newest and the one in Rejig...

-Nic

ps
Uploaded to development section at www.rejig.org

mmgrover
1st December 2003, 16:00
@dragongodz

I have been sick so I haven't been able to add your code to the
development section.


@Nic

Thanx for uploading that
Yes, I hope to feel better today :-)


mike

@dragongodz, JvD
Yes, Nic has full access to rejig.org to make changes as he see's
fit.

Nic
1st December 2003, 16:25
Did a diff of the version released on the 30th of november by metakine...

Directly after the line:
else threshold = greedyFactor;

This has been added:
if (threshold < 1024) threshold = 1024;

Thats the only difference :(

Adding that line into dragongodz code will bring it up to date, ill add that in tonight into a new release
(Was up until half past midnight fixing the SUP stuff (PTS reset/wraparound issue) all fixed now :) )

@mmgrover: Hope you get better soon :)

-Nic

TCmullet
1st December 2003, 18:19
Originally posted by Eyes`Only
TCMullet: CCE is my tool of choice for reencoding .m2v files. You can get excellent quality even at low bitrates (something no transcoder can do currently). Though there's an upside (quality) there's also a downside (speed) so it's basically dependent on how much you value quality. I personally don't mind the extra time for the output I get. However, this topic definitely doesn't belong in a pro-Rejig thread :)
Actually it kinda does. I'm here (in ReJig-land) because on the Dazzle board I was remorsing that I had just finished reencoding some big CBR files down to smaller VBR ones via Tmpgenc, had deleted the originals, then found out that my CD-R dealer had half-lied to me about the capacity of a DVD-R. He said they are 4.7GB. What he should have said was 4.7 billion or 4.37GB. I haven't corrected him yet, but my Dazzle friends helped me to see that "all is not lost". And here I am.

Now as far as reencoding... Isn't CCE many hundreds of $? I have very close to absolute zero. Also, my experience with reencoding is that the bitrate of the source has to be significantly greater than the target bitrate. It's not the speed of Rejig that I crave so much (although every bit of speed helps!), it's the idea of throwing away all that valuable encoded data by decoding to raw video and totally encoding from scratch. A LOT of picture quality is lost by that. (As well as time.) This is why the idea of ReJig is so thrilling to me--keeping most of the 1st generation encoded data. I think I realize that using Rejig with a low percentage (30-50%) is probably a lost cause (someone prove me wrong), but at least above 80%, it appears to be a godsend.

So back to my original question.. Is rejig the only transcoder (that doesn't totally reencode like CCE, Tmpgenc, and bbMpeg) that can accept mpeg2 PS or ES streams?

JvD
1st December 2003, 20:58
OK guys, now I have tested dragongodz version and compared it to the new one. First the size. I did a movie only, with one audio stream and one subpicture stream, both at approx 69%. The old engine produced a complete set at 4370MB, and the new (dragongodz version) end at 4300MB (2-pass). So according to my little test, the old engine is still better to give an accurate result (size)
.
Then the picture.

Old engine (use old engine=1): http://www.morck.se/old.jpg

new engine (use old engine=0): http://www.morck.se/new.jpg

This is in a medium-fast-moving scene (from the movie 9 Queens). In this frame the old version still produces a less blocky picture. Sorry, i didnt have the time to watch the to versions on my standalone so I cant really say anything about an overall impression. These pictures are exampels.

dragongodz
2nd December 2003, 05:14
jvd - thanks but this is the sort of information i am after.

old engine(nic build) compared to old engine(my build) resizing accuracy. so what is the original .m2v size, what ratio used, what each size each build produced.

new engine(nic) compared to new engine(me) blockyness. that means which build produces blockier output ? does mine look better or the same ? no quality will not be as good as old engine yet but if there is a noticable improvement then it lets me know i am working on the correct area.

Nic - cool, i will send any other changes to both you and mike when i make them. oh and yes i had a quick look after there was the mention of the new engine changed but didnt notice any thing(no time to do a diff then) so didnt worry about it for now.

MMgrover - hi mike, hope you are feeling better. i was just explaining why my changed version was not on rejig.org. :)

E-Male
2nd December 2003, 08:15
judging from my own tests (not many) i'll stick to the old engine for now

one thing i noticed is that rejigs quality depends highly on the source:

-noisy, badly filtered input ==> ugly output but i daubt reencoding would have gotten much more of that source (really watchable on TV)
-lil grainy input ==> some noise-/artefact-patterns (should look fine on TV) [depends on original bitrate and quality of the original encoding]
-clean input ==> quality varies between good and perfect (should always be great on TV) [and i'm talking about <60% here!]
(all sources where "real" movies, no aniamtion of any kind]

about the rejig vs CCE discussion, i don't have the time/resoruces/nerve for CCE, i either use rejig or split the disc, depending on what DVD it is

EDITed after testing the transcode of the bad source on TV

JvD
2nd December 2003, 08:45
dragongodz, this was only a small test of the version you sent me. I ran your version with the variablem "use old engine" set to either "1" or "0". I can compare it later today with other versions?

mmgrover
2nd December 2003, 15:54
I'm feeling better today, back at work :-)

let see if I can catch up to what's going on.. lol


mike

TomSem
2nd December 2003, 21:55
hi,

i use rejig and ifoedit author.
The movie plays fine on windvd.
But my homeplayer pauzes a the end of EVERY chapter.
I have to press next to continue to next chapter and at the end i have to press next again to see chapter three ... and so on ..
This is my second movie that has this problem.
Both movies Fast forward and fast rewind also doesn't work.

Anybody can help me out ?

layer3maniac
3rd December 2003, 04:23
NTSC?

Rombaldi
3rd December 2003, 05:02
A Question for the Transcoding Gurus.....

Is it POSSIBLE to modify any of the video parameters while transcoding... in specific the change the black level?? I've
got a coupla of hundred hours of MPEG2 files that were
recorded with the black level set to high, I would like to be
able to subtract 7.5 IRE globally thru the entire file...

(I suppose that the same question could be asked for any of
the RGB values as well.. be able to do any modifications
to them either??)

int 21h
3rd December 2003, 09:13
Originally posted by Rombaldi
A Question for the Transcoding Gurus.....

Is it POSSIBLE to modify any of the video parameters while transcoding... in specific the change the black level?? I've
got a coupla of hundred hours of MPEG2 files that were
recorded with the black level set to high, I would like to be
able to subtract 7.5 IRE globally thru the entire file...

(I suppose that the same question could be asked for any of
the RGB values as well.. be able to do any modifications
to them either??)

Sorry, no.

JvD
3rd December 2003, 10:07
Yesterday, i did the test again to try to keep as many factors as possible constant. Since i was sitting on a train (and nothing else to do) i wrote all info down in html and published it this morning. Its really nothing new but since i done it i might even publish it ;-) As stated before, the old engine is still quiet good and gives very good size (when remuxed).

Go here for the results (http://members.fortunecity.se/jvd1/index.htm)

Since it soooo quiet in this thread i assume you guys are doing some hard working on Rejig. Or are you suffering from a cold?

unixfs
3rd December 2003, 10:13
I didn't know of such parameter: "black level".
Can anyone explain what it is, please?
Is it responsible for those nasty greyish blocks that
appear in black areas using ffmpeg?

Thanks.

dragongodz
3rd December 2003, 12:00
JvD - thanks that tells me more. hmm was that my build or Nics that you used for old engine ? can you try the other build old engine aswell ?
well i can see a little more fine detail in my build new engine (nose and ear are slightly blurred more with Nics build) but they are still very similar. i will do some more playing with it tommorow.
as for output size, hmm strange for the new engine to undersize so much. try using 1 pass with new engine set to 68.48% and see what that gives you please.

i havent been working on it because i have been busy with other things and really didnt want to do anything until i got some feedback. Nic no doubt has also been busy, read all the things he has been working on in previous posts.

unixfs - did you try the resizing with the old engine in my build ? resize smaller ?

Mug Funky
3rd December 2003, 12:02
@unixfs:

black level isn't an MPEG issue... just a matter of what level the darkest luma value is. (ie. 8 for CCIR, 0 for regular RGB, and if something's captured wrong or there's generational level clamping you could get up to 24-32 as a black level).

kinda like "noise floor" i suppose...

unixfs
3rd December 2003, 12:07
Originally posted by dragongodz

unixfs - did you try the resizing with the old engine in my build ? resize smaller ? [/i]

Yes, but the smallest size is still 33% of the original (sorry, I forgot to report).

I made sure to enable the old engine.

TomSem
3rd December 2003, 12:35
to layer3maniac
yes , you're right.
I ve problems running NTSC on my player
No problems with original NTSC discs.
Only troubles after rejig and ifoedit author.

Anybody having same problem ?

JvD
3rd December 2003, 13:07
Originally posted by dragongodz
well i can see a little more fine detail in my build new engine (nose and ear are slightly blurred more with Nics build) but they are still very similar. i will do some more playing with it tommorow.
as for output size, hmm strange for the new engine to undersize so much. try using 1 pass with new engine set to 68.48% and see what that gives you please.

Ill try it later today. Ill run a one-pass with the new engine tonight and fill that page with more information. The undersizing problem, is it because of the second pass?
As I said before, I havent made an overall judgement on a standalone player.

Nic
3rd December 2003, 13:14
Yup im busy on writing a backup wizard for the impending 0.5 release...

A real Newby question: Are NTSC disks always the same framerate? if so what is that exact number? (I dont own any NTSC disks...so I dont have any first hand evidence)

-Nic

unixfs
3rd December 2003, 13:16
there are NTSC discs that change back and forth to and from 23.976 and 29.976

JvD
3rd December 2003, 13:21
Cant remember what you guys said before but if I use the one-pass option in the latest version do rejig use the old engine or the new? When I did tests I assumed that Nics and dragongodz versions containd the SAME "old" version? Or are there different "old" versions?

Nic, looking forward to the new version. *very excited* ;-)

Rombaldi
3rd December 2003, 17:14
Might I make two (probably not so small, but I can hope) suggestions.

1) mayhap a simple 'check off' on the interface as to which engine to use? (pair of radio buttons where one or the other must be checked). Perhaps simpler than reg hacks.

2) I suppose I'm in the minority, but I'm using ReJig mostly (99%) for M2V files. Archiving TV down to disc and it's handy to give them a light squeeze (no more than 10% on most) to get a better stacking of episodes (the difference between putting 5 and 6 eps on a disc is sometimes less than 500mb). It would be nice if you could just DRAG/DROP files into the window (I may do 10 or 15 files at once). If you open multiple files in the OPEN dialog, it concats the files together and it makes one big output file instead of 10 individual ones). There a bunch of folks that have found ReJig and are using it for non-dvd backups, but just as a 'raw' file compressor.

int 21h
3rd December 2003, 19:41
Originally posted by Nic
Yup im busy on writing a backup wizard for the impending 0.5 release...

A real Newby question: Are NTSC disks always the same framerate? if so what is that exact number? (I dont own any NTSC disks...so I dont have any first hand evidence)

-Nic

NTSC generally come in 3 flavors that I've seen commonly:

24fps progressive with pulldown for 29.97 (i.e. FILM)
29.97fps interlaced (TV stuff, low budget things, animation)
24fps and 29.97fps mixed (TV stuff, things with visual effects sometimes)

sundance
4th December 2003, 08:44
@nic:
...and while we're at suggestions:
Maybe it's easy to implement an option (like the one in DVD-Decrypter) which allows you to reset the time stamp of the m2v file generate to 0:00:00. That could make life a lot easier to import those files (into Maestro e.g.) together with chapter marks/subs.
If that's a tough one then forget it, since it's just "nice to have"; there are several work-arounds for that issue...

TCmullet
4th December 2003, 23:43
Please help me out somebody. I don't understand how it can be meaningful to concatenate .m2v files. When I want to rejig my program stream, I demux out the .m2v video stream and the .mp2 mpeg audio stream. Then I rejig the .m2v multiple times to my satisfaction, then I mux it back together with the .mp2 to form a new smaller mpeg program stream. I know of no way to concatenate mp2 streams. I only can use mpegvcr, or Tmpgenc tools to concatenate PS files, not elementary files. What good is m2v concatenation if there's no way to also do the mp2 files so I can mux the joined audios back in as one step?

unixfs
5th December 2003, 00:08
with TMPG you can merge 2 mp2 files in a single PS and then demux the resulting mp2.

E-Male
5th December 2003, 00:23
can't besplit do that in one step?

dragongodz
5th December 2003, 03:50
new mod(3) of version 0.4i has been sent to Nic and mike so should be up on rejig.org soon.
should be slightly better quality for old engine and slightly better quality for new engine aswell.
for tests can you check actual playback and not just a single frame ? this will be better to judge quality.

JvD - can you also compare the last version using playback rather than the 1 frame ?

and people some more feedback would be nice even if you only do a couple of short tests.

E-Male
5th December 2003, 04:09
i'm low on time, but i'll try to do some comparison with different sources

i'm right when i think that the amount of grain is the main factor for the "transcodeability" of a source?

TCmullet
5th December 2003, 04:25
Originally posted by dragongodz
new mod(3) of version 0.4i has been sent to Nic and mike so should be up on rejig.org soon.Can we trust that the version number will be bumped up, such as 0.4j?

mmgrover
5th December 2003, 05:03
@TCmullet

I released dragongodz's version and called it 0.4i-mod3.


mike

JvD
5th December 2003, 08:46
@dragongodz: Ill do some testing as soon as possible.

I did some more testing using the one-frame-method and the result is not too exiting. I tested IC8, DVDShrink (with and without deep analisys) and Nero Recode and looked on the exact same frame*. My only conclusion was that that method is really bad in saying something about the overall picture quality of the movie. One single frame doesnt say much, you have to look at several frames and different kind of scenes. The best way IS to watch the movie on the standalone or the monitor, then you can make an overall judgement. Ill do that in the future. I might also pick a movie that is considered to have REALLY GREAT image (any suggestions?).


*By this simple (read not-too-good) comparisment IC8 gave the best picture, very close to the original. But then again, it cost money and is rather slow (and I dont like the interface).

E-Male
5th December 2003, 09:19
as i already said
i think the better the soruce the easier the transcoding

for example fightclub transcoded much better then thunderbolt because of it's (MUCH!) cleaner image

EDIT (forgot my conclusion):
so movies with great image quality are not the best sources for tests, well not alone at least
for good test sources of different quality are required i think

Nic
5th December 2003, 11:31
@dragongodz et al:
http://nic.dnsalias.com/PSNRCheck.zip

Use PSNRCheck infile1.m2v infile2.m2v

Feed it two raw M2V files (one the original and one newly rejiged) and it will give you a PSNR rating.

Code by Makira, ported to win32 and newest libmpeg2 by me :)

Should be useful in testing quality, but of course PSNR isn't a definite value of quality, but it's a start...

-Nic

ps
Im not sure how accurate/useful this will be...the numbers out don't seem quite right...hmmm

JvD
5th December 2003, 15:01
@Nic: What is it PSNRCheck really do and what does it measure? What "factors" are important?

dragongodz
5th December 2003, 16:32
Nic - PSNR can be funny at times so maybe using SSIM would be more acurate. i will have a look at PSNRcheck tommorow anyway and see what it does.

JvD - in simplest terms it compares 2 images/frames(original and compressed) to see how similar they are. the closer they are they better the compressed picture should look(since closer to original) so higher PSNR. problem is that something like a near black picture or static scene can have more done to it and still look good but can get a low PSNR value(as example) so it isnt always to be trusted. thats why i said watch an actual scene play, your own eyes are generally the best judge.

E-Male - it depends also on how the oriuginal was compressed(not just noise etc). so yes multiple examples is better than 1.

TCmullet
5th December 2003, 23:44
ReJig is giving me information I haven't seen in my 3 years of using the Dazzle DVCII. Specificly, when I add a program stream to the work list, it shows the 2 elementary streams in the upper right window. Because my program streams are often the output of an older (and buggy) version of Mpegvcr (that I haven't been able to upgrade yet), the 2nd line says "MPA Audio Stream - StreamNo: 0xC0 - AudioDelay: -67". A more normal stream would not have the "AudioDelay" clause. Every file that is output from this mpegvcr, when loaded into ReJig, shows either -34, -67, or -101. (I may have seen a -100.) These number are interesting in a side-respect: They virtually equal to 1, 2 and 3 whole frames respectively (assuming the numbers refer to milliseconds).

But here's my main concern. How should I apply my awareness of this number when remuxing the elementary streams back together with bbMpeg? That is, how should we interpret the '-67'? It either means "the audio starts 67 ms earlier than the video" or "the audio starts 67 ms later than the video". In the context of bbMpeg remuxing, the video and audio delay defaults are 180 and 180. I'm inclined to think I should change the audio delay to 113 (which is 180 minus 67, which is 'advancing' the audio). I tried adding 67 getting 247, but the audio was definitely delayed too much. I also tried leaving it alone. (I'm using a volleyball game with those ball smacks as material for testing this sync issue.) 113 seems to sound the best to me of the 3.

So if my original file says '-67' in ReJig, how should I change the value of 180 for bbMpeg's audio delay?

int 21h
6th December 2003, 00:35
PSNR values should be between 20 and 40. A value of 40 will be nearly identical to the source. In general the MPEG committee specifies that any difference less than 0.5db is to be considered insignificant. Just remember higher numbers do not necessarily mean better quality, just that its closer to the original source.

dragongodz
6th December 2003, 03:14
Nic - PSNRcheck just crashes for me. function trying to access illegal area of memory.

my system - duron 1ghz, 256meg ddr400(100mhz fsb for duron of course), motherboard is gigabyte 7s748(sis748 chipset), windows xp

E-Male
6th December 2003, 06:22
crashes for me aswell
i'm using win xp pro (no SP)
i ripped/demuxed chapter 2 of Das Boot superbit rc1 disc 2 with dvddecrypter and rejiged it to different percentages
psnrcheck gives 0 values of teh secodn file doesn't exist and crashes on any second file, even if it's ther same as the first, but only when both files are .m2v

EDIT: same with Ice Age pal riped/demuxed with rejig

EDIT2: tried another disc and i'm now sure it's not source related
a result containign just -0 is given when on-existing or non-m2v files are used, but when there are 2 m2v file used and teh program should give a result, then it crashes

Nic
6th December 2003, 13:45
:( Dont know why it crashes...then again I only tested it on 4 minute files (the numbers where wrong anyway I think...).

@TC: The delay value will be correct. I think your assumption of how to correct it is right. I dont know bbmpeg well, your best bet is to try and see if you can tell the difference...

-Nic

dragongodz
7th December 2003, 06:04
ok a quickish way to get some psnr results

create .d2v's with dvd2avi for original and rejiged .m2v's

create avisynth script like this

LoadPlugin("MPEG2Dec3.dll")
source=MPEG2Source("g:\test\original.d2v")
test=MPEG2Source("g:\test\rejiged.d2v")
test=converttoYUY2(test)
source=converttoYUY2(source)
compare(source,test,"","result.txt")

then load the script(.avs) in mediaplayerclassic(as example) and play.

you need nic's mpeg2dec3.dll aswell of course available from his website.

note i converted to yuy2 but you could convert to rgb aswell though you get lower values then. :)

not wholly satisfactory but a start. quick test with new engine versions showed slightly higher overall PSNR with wider range for my changes. quickly did old engine compared to new(both my latest changes versions) and old engine had slightly higher values.

really needs someone to do some full comparisons which i am afraid i dont have time for at the moment. i only tested a 3 second clip so not really anywhere near enough.

also there is the SSIM avisynth plugin which would be interesting to see what results that gave aswell(requires YV12).

JvD
7th December 2003, 11:27
Originally posted by dragongodz

really needs someone to do some full comparisons which i am afraid i dont have time for at the moment. i only tested a 3 second clip so not really anywhere near enough.


OK, tried your method Dragongodz and it seems to work better. I compared original m2v to a 1-pass rejiged file and Original to a 2-pass rejiged file. Its a 20 min part of a french movie Jean de Florette (1989 and not so good picture quality). The Rejifd files is at 80% compression. Its a queit slow move, not any wild action scenes. Below I cut and past the results.

-----------------------------------------------------------
Original vs 1-pass Rejig
Minimum Average Maximum
Mean Absolute Deviation: 0.0000 0.2388 1.6864
Mean Deviation: -0.2518 -0.0138 +0.0779
PSNR: 35.1470 70.6946 107.3187
Overall PSNR: 49.1752
-----------------------------------------------------------
Original vs 2-pass Rejig
Minimum Average Maximum
Mean Absolute Deviation: 0.0000 0.2108 2.3003
Mean Deviation: -0.2525 -0.0126 +0.2056
PSNR: 34.0277 71.8277 107.3187
Overall PSNR: 49.7356
-----------------------------------------------------------

I am not shure how you can make the test more efficient. If I run throug a full movie all extreme values get lost. Is it better to pick some hard parts of the movie and then do the comparisment?

jdobbs
7th December 2003, 11:43
I've always found it best to save the values and then import it and create a line chart in Excel. That way you can see the deviations graphically over time. The averages sometimes throw you off -- you can get huge variations in high-movement scenes and virtually none in low motion.

E-Male
7th December 2003, 12:52
does anyone know a source that gives more details on psnr?
because comparing a divx to itself give >105db and with undot it gives ~60 which is a huge difference for such i mild filter IMO

dragongodz
7th December 2003, 13:58
jdobbs - the script i gave above saves to the result.txt file ibcluding PSNR for every frame but even so the end pieces that JvD posted do show minimum value it got to etc.

what would be interesting is to take 3 30 second clips, A being all high motion, B being nearly static/low motion and C a combination high and low. then run each through comparing old and new engines etc plus comments about what they actually look like to the human eye.

E-Male try doing the same test using SSIM(its in the avisynth section somewhere) and see what that gives you. as i said SSIM is meant to be a better test anyway so if i get the time i will see if i can get that up and working for the .m2v's(unless some avisynth guru would like to ? :) ).

JvD
7th December 2003, 14:07
dragongodz, ill do that kind of testing later today. Have to spend some time with my family :-)

E-Male
7th December 2003, 17:58
tried the ssim plugin
values make much more sence

since the result is written to a log-file it would be great to have possibility to play the avs file at max speed without showign the picture
is that possible?

JvD
7th December 2003, 23:29
OK guys, i did som testing. Didnt have that much time but anyway. I put it all on a html-page for you to read (the adress i temporary so Ill chaning it later). I only had time (for now) for two scenes and with one and two pass on dragongodz latest modification. Also included som pics.
Here we go! (http://www.morck.se/psnr/)

TheXung
9th December 2003, 05:02
Does anyone know of any projects working on frequency domain filtering?

dragongodz
10th December 2003, 04:03
JvD - thats cool. i too have a family and generally only get near my pc at night when they have gone to bed or the occasional(like now) hour of an afternoon. interesting results though, not bad. how did the actual clips look to your own eys though ? any flickering, any noticable blocking ?

e-male - open the .d2v and there is a "framerate =" , just double the value after that and your clips should play double time. :)


hmm tried the ssim plugin and just get an access violation. what the ????

JvD
10th December 2003, 10:05
Hard to tell any difference between the two clips. Maybe the really rapid scenes looked better with the latest ReJig. In more calm and slow secens its really hard to tell the difference between the two, picturewise and I didnt experience any strange behaviour, no flickering. Will do some more testintg later (my only contributin since i dont have the skills in programming like you guys) on this week when I get more time.


PS. Why is it so quiet around here? Any new versions in sight? DS.

JvD
10th December 2003, 13:54
OK, didnt notice this before But when I try to use the ifomode and pick wanted streams (video, audio and subpic) and dont get subtitles to work the last part of the movie. Tried in two movies and whats them through on my computer, everything looks nice but somewhere in the second half the subs disappear. WHY? I author it back usingin ifoedit (+exported chaptimes). Havent noticed it before? Am I doing something wrong or is Rejig pulling my leg?

dragongodz
10th December 2003, 14:12
Jvd - ye new engine looks better to me for action scenes, smoother/less blocking. the last changes i made introduced a little blocking for increased P frame quality so may knock that down a touch and smooth it back out a bit.

quiet ? well Nic said he has been working on dvdauthor and muxxing subs etc so that would make him very busy. when he is happy with everything i am asuming rejig will jump to 0.5 as he hinted. :)

i will try out subs in the next few days and see if that happens for me aswell.

jj59
10th December 2003, 15:12
On page 28 of the thread Nic mentioned a bug in sup creation, probabely something with the change of a vob_id, he also mentioned he fixed the bug. So we have to wait for the fix in the next release.

E-Male
10th December 2003, 16:37
if yo ugot problems with authoring the dvd (including subs) in ifoedit try using "remux m2v" instead of "author new dvd"

Nic
10th December 2003, 20:06
@JVD: Yup theres was a problem in SUP Creation...when a PTS gets reset back, it throws things around. That should be accounted for in 0.5 (well it works in Matrix: Reloaded :) )
(Funny thing is, VobEdit doesn't extract the SUP right either...has the same problem, once I realised that, I didnt feel too bad ;) )

0.5 is nearly ready...far from perfect, but a nice start in the right direction. And I know where I want to take 0.6 now as well.
Just got to do more testing in 0.5 (as well as write a HTML helpme) and then ill release it (which means ill probably have this thread closed and start a fresh :) )

Cheers,
-Nic

E-Male
10th December 2003, 20:09
you could release the "almost ready" versiosn as alphas
if you tell what needs most testing we could try it, so you'd get results from variouse systems and discs
would be chance for people like me to contribute

JvD
10th December 2003, 20:14
Nic: Looking forward trying it out end testing it Nic. VERY excited to see it. Any adjustment in the engine or just those added features?
Nic and you other guys, yeas ive read about the problem now. Forgot about it, this tread IS long :D

2COOL
10th December 2003, 20:34
@E-Male

Originally posted by E-Male
if yo ugot problems with authoring the dvd (including subs) in ifoedit try using "remux m2v" instead of "author new dvd" From experience, I had audio delay issues remuxing with IfoEdit.

The only good part on using IfoEdit's remuxing is that you can remux the whole new m2v into the whole titleset's VOBs. But I get audio delays after playback.

For you to remux the m2v, the whole movie, with VobEdit, you would have to join the whole Titleset VOBs as one and then remux. Any stream stripping would have to be done prior to remuxing. It's a longer process when you have more than one titleset VOB. Of course, you could get the m2v from each VOB separately and then mux it back with VobEdit. If I had 5 VOBs to contend with, it can be really bothersome.

E-Male
10th December 2003, 21:34
well, i had no problems until now, but that's all i can say
everything i recommand is based on personal experience and might of course be incomplete or even incorrect

2COOL
10th December 2003, 22:17
Maybe you were working with movie with 0 audio delays. Have you tried Matrix Reloaded? That had audio delays of 100.

E-Male
10th December 2003, 22:35
of course it's possible that i was just lucky

don't have matrix reloaded, so can't try that

robshot
11th December 2003, 00:53
Here's another shot on trying to find what's wrong with ifoedit remux (if there is), and other stuff.

I've been collecting Stargate SG-1 R2 DVDs. Now I'm trying to do backups. SG-1 R2 discs are PAL, 4 eps per disc, with trailers, 4 audio tracks including director commentary for each episodes and all.
Basically 1 disc would be around 7 - 8 GB. I love MGM for not skimping :).
Doing a rejig for the episodes (in VTS_01_XXX.VOB), quality v.s. filesize, would need around 85% rejig. But still it won't fit 1 DVD-R since the motion menu (uglies as they are) would take around 300mb to 400mb.

Initially i was planning on backing up 1 dual layer to 2x DVD-R. But I explored the possibilities of putting all the eps, take out the trailers and documentaries. Still there's about 500mbs overheads. So, i decided to REPLACE the motion menu with STILL MENU.

Ok, now the process:

Ifoedit remux "hates" it when there's a still VOBIDs in your movie VTSs. In SG-1 movie VTSs, the first VTS_01_1.VOB has 4 STILL VOBIDs. This need to be taken out, and i use IFOEDIT VOBID stripping. All goes well afterwards. Rejigging the 8 VTSs, then remuxing with IFOEdit, creates sync a/v. (The same thing I did with Region 1 RIDE WITH THE DEVIL - where i kind of FOUND OUT the ifoedit muxing problem lies from this STILL VOBIDs).

All set with the rejigged episodes (yeah, quality nice nice), the 300+mb overhead challenged me. They're the motion menus! This, requires MenuEDIT, VOBRATOR, VOBEDIT and REMPEG2 :).

I open the VTS_01_0.VOB (the menus), and voila, 32 VOBIDs, with some has multiple CELLS.
I then open a copy of the same file with VOBRATOR, for analysis. I found the VOBIDs i wanted to take out. I extracted the VOBIDs with VOBRATOR, and REPLACE the video stream with STILL VIDEO i made using REMPEG2 (under the mpeg2 tools). This new STILL VOBID needs to be stripped of its audio, so i open VOBRATOR again, then extract that VOB without the audio. Voila, i got a perfect NEW STILL VOBID complete with Subpictures.

This NEW VOBIDs then got injected with MenuEDIT. Now, there's also issue when you want to inject CELLID. Same as above, extract the VOBID with VOBRATOR, then open the VOBID (which contains at least 2 CELLIDs) with VOBEDIT. Demux by CELLID, and you get VOB files of the CELLIDs. Insert this into MenuEdit project, and fix whatever button you need to fix with menuedit.

While this seems complicated, I think i've solved the ifoedit remuxing issue, and at the same time, i was able to find a way to replace motion menu with still menu without so much as reauthoring. the only time i need to encode is when i want to make the new STILL MENU to replace the motion menu (filesize consideration).

I don't have matrix reloaded with me to test, but some of the nasty anime DVDs i have, and the Region 1 (NTSC) discs (TNG BOX SETS), are now muxed correctly with ifoedit.

So, in short:
1 Dual-Layer PAL/NTSC with Motion Menus ---> 1 DVD-R PAL/NTSC STILL MENU:

1. ReJig (hehehe... part I)
2. IFOEdit (hehehe... part II)
3. MenuEdit (menu manipulations and pic grabber for still menu)
4. Vobrator (analysis and vobid extraction)
5. VOBEdit (demuxing by CELLID)
6. ReMpeg2 (remux still m2v to existing VOBID)
7. Any mpeg2 encoder for making still menu.

I'm thinking of making how-to, but it's already morning.

cheers
robshot

robshot
11th December 2003, 01:08
2COOL(the nick says it all),
Got a question that i haven't been able to answer after reading your many-wonderful Cheatlists :)

You ever encounter R2 discs where the first menu is Language options for multiple language MENUS? For example, Brotherhood of the Wolves (2 language options French and English - will reroute to specific DVD MENU in French or in English). or the MANY Stargate SG-1 Region 2 (from UK) DVDs.
Is there a way to skip this (and use english as default language menu) using IFOEdit? So far my tests failed (based on the cheatlists), so i still have to put this on the backups (but i did replace the motion menu from and after this language option, to still menu. bitbudget for backups are important factor).

cheers
robshot

VILLA21
11th December 2003, 08:38
@VILLA21: Anyone tried the latest DoItFast4U with Rejig? I,always, get oversized DVD files in scenarist, around 4800Mb.

@Eyes`Only: Yeah, I don't know when they're going to have that fixed. DoItFast4U! passes the correct values to Rejig, but the output from Rejig doesn't match the size that it should with the parameters that are passed if the bitrate is low (ie. extras). Hopefully someone fixes it soon, there's nothing I can do about it.

So, is there any solution so far?

E-Male
11th December 2003, 13:35
i did some size tests and what you can take for sure is this:
no matter how compressable the source is (i took Ice Age as ideal source) going below 30% in rejig won't work, stuff hardly get's that small, so if DIF4U try to compress some high bitrate extras to very low bitrates i might cause the trauble with this
just an idea

mmgrover
11th December 2003, 15:18
Hi all...

I'm still here, Just In Boston right now :-)

I havn't forgot about this!

mike

dragongodz
12th December 2003, 11:32
mike - nice to hear from you. :)


what you must understand for high amount of compression there is a saturation point. that is a point where all quants for B frames and all coefficents etc are already being done. once that point is reached rejig can not currently do any more. yes there are ways to reduce even more such as skipped frames etc but the current engines do not support that. they are really designed for lighter compression.

Fabiano
12th December 2003, 22:04
Hi, is there a reason for Rejig not compress HDTV MPEG-2 ? :confused:

Rejig just removes stuffing but does not compress at all.

I tried 1920x1080i and 1280x720p, but no luck!

Nic
13th December 2003, 10:52
An email from Makira himself (creator of the transcoding engine):

I've just read the doom9 thread. Unfortunatly, I can't reply ("You are not allowed
to post
or reply until you have been registered for at least 5 days.").

I've seen the screenshot sent by JvD. The point is, the new engine will make some
frames
look worse than the old. But it will also make bad looking frames better. In other
words,
the goal is not to have a big gain in overall psnr, but to reduce the variance of
the psnr.

So we take bits from some pictures and give them to others. This is most noticeable
with
a high motion scene followed by a very slow motion scene. With the old engine the
first
scene will look bad, but the second will be perfect. With the new engine, the first
will be
much better, at the detriment of the next. The overall quality experience should be
better.

Here's a very interesting read: "Two-pass mpeg2 vbr encoding" research paper by ibm
http://www.research.ibm.com/journal/rd/434/westerink.html

Let me quote an important part:

" Apparently, the overall visual quality of a video is rated not so much by the high
quality
of certain scenes, but more by the scenes of the lowest visual quality, the ones that
might show obvious artifacts and thus stand out."

This is the main basis for the changes between the old and new engine. That being
said,
there is a lot of room for experimentation. If I had more spare time, I would love
to clean
m2vrequantiser's code and make it easier to test different algorithms. With my current
schedule, that'll have to wait till after christmas.

Feel free to repost this on the thread, since I can't.

Regards,
Makira

dragongodz
13th December 2003, 12:52
yep which just basically backs up all i said before, old engine is better quality static or slow/low motion scenes while new engine handles high motion better. :)

problem was that too much degradation was put on P frames and showed up blocks from them rather than the B frames (which is what the old engine suffers from). thats what my experimentation with both engines has been all about. check the old engine in my mod 3 and it looks better(less blocking) than the original and the new engine doesnt suffer from P frame blocks but loses some sizing accuracy when compressing below 70%.

i will make a couple of more slight modifications(such as upping the P frame compression level a bit) for that bit extra compression space etc. though you may have to wait for rejig 0.5 to try it out. :devil:

Amnon82
14th December 2003, 14:34
Hi Guys!

Thanks to all who created ReJig!

I want to do some to get ReJig in Germany also popular like here.:sly:

So I translated it to german.

You can find the modded version on my Homepage (http://www.dvdrpage.dl.am)

I used Nic's 0.4i version.

Also I found a bug. Maybe it is not ReJig's fault. (But I think so!)

I always got 'Too many frame drops' in IFOEdit 0.96.
So I started to fix it.

Here is the way to solve this problem:

Rip the DVD in IFOmode in ReJig without the subs.

Open VOBSub Configure and klick on 'Open'.
Open the IFO of the mainmovie and klick twice 'OK'.

VobSub is no indexing all subs.

Open SUB2SUP and choose the idx-file created by VOBSUB.
SUB2SUP convert now all subs to sups.

Author now Your DVD with IFOEdit with the new subs.
Now it will work.

I hope this will be fixed soon...

Amnon82
14th December 2003, 15:46
Here is the BugFix 0.99a for ReJig v.0.4i-de:sly:

Download file (http://rj-elektronik.de/avideo/files/BUGFIX099a.exe)

Amnon82
14th December 2003, 17:13
Now is the german Guide for ReJig v.0.4i-de final!

:p Avalon's german ReJig Guide (http://rj-elektronik.de/avideo/main.php?set=shotan)

Nic
14th December 2003, 17:46
Ive created a new thread for ReJig, so this one can be closed. It's too mammoth for beginners to get into and should probably be closed. Please post new posts into the ReJig 0.5 thread. Thanks :)

@Amnon82: Thanks for your updates & page, haven't been able to look into it properly yet for 0.5....

-Nic