View Full Version : Thread on individual encoding method
DDogg
16th February 2002, 22:12
Ok, this is way rough and rambling but here are a few notes about my individual method. First, I encode for the TV I will be viewing on. In my case that is a 32" 10 year old JVC that I build a very expensive cabinet for. I am kind of stuck with this TV because of that. The point is people with a high tech, high Def TV would need to be more particular than I am.
First you will need this plug-in for DVD2AVI as well as V 1.76 DVD2AVI.
http://www.doom9.org//Soft21/Rippers/OpenDVD.zip
http://www.doom9.org//Soft21/Decoders/DVD2AVI_176.zip
Install the plug-in in your DVD2AVI directory as the readme states. We will use this to preview the DVD to start building some data in our head for later decisions we will be making. It will work on most DVDs unless multi-angle. If it is multi-angle, or if it will not preview for some other reason, see notes at the bottom of this post.
1> Open the DVD in PowerDVD or WinDVD to validate, and then kill it.
2> Open Dvd2AVI > Help menu > DVD plug-in > Key Operation
3> This will allow direct viewing of the VOB on the DVD
4> Open the first 1,048,574 VOB in a chain. DVD2AVI will suggest a group of VOBs. OK
5> Press F5 and let it run for a 10-20 seconds. Do I have some dumb placard or other lame non germane interlaced intro tacked on to the front before the movie starts? If so I would jot down the ending time of the intro and put that time in "Movie offset seconds" in the BBmplex tab of DVD2SVCD.
6> I also want to scroll around and randomly look at various frames Nothing scientific here; I am just trying to get an idea or general feeling of how the source looks and put that in my memory bank (my head) for later use.
a. Is it a bright movie or darker? Brighter will take more bitrate
b. Is there a lot of saturated bright color? Will need more bitrate.
c. Does it look "clean" or grainy? Grainy will take more bitrate because it will not compress well..
d. Do I notice a lot of extended action scenes?
e. If so are they bright with a lot of saturated color? Or darker?
7>OK, now we bring up DVD2SVCD and go directly to the misc tab and set our directory where we want to store the working files. Do this first! While I am there, I select the DVD2SVCD radio button and select idle priority.
8> Go to the cd image tab and select VCDXBuild . Check Title Pic, Change CD Pic and DVD chapter method of your choice. Right click in the Title pic line and select "Get picture from IMDB". Put a main word from the title or the whole title and accept the download.
9> Now go to the conversion tab and press the disk icon. When it is finished validating select the drop down movie length and note the time in minutes at the bottom.
Now go to the bitrate tab. This is where you start doing some thinking.
What do I want to do and what will the output device be? Am I taking this to my bud's house that has a projection TV with a 10 foot screen? Is this for the kids to watch on a smaller TV? I make a big deal of encoding for the "Display Vehicle". If you are a bad boy and trade with others then you would always go for the very highest quality you can turn out. In my case I don't, so I target the display.
Here are some of my general guidelines.
Remember, these posts are about how an individual does their encodes and not general guidelines.
High quality - minimum 1850 or better bitrate, Bicubic filter using .0,.50-60 to give a "pop" to the video. If you don't have enough bitrate this can cause noisy edges. If the bitrate is on the edge use .50 instead of .60. This is completely subjective on my part and I have absolutely no science to back it up :)
Mid quality - 1500 or better using SimpleResize or SimpleResize with TS 2,1. Still very good
Kid's quality - 1350 or better. Simple resize filter with TS 2,1 or maybe Bilinear or maybe even Bilinear with TS 2,1 if the bitrate is down in the weeds. This last will give you a softer look that may not be to your liking depending on the display vehicle.
Let's say I have a 120 minute movie. I'll now use the data in my head to make a decision on how many disks I want. I will nearly always start by setting the amount of disks to 2 for the time band my encode fits in.
I think most 3 CDR encodes are a waste for >me and my TV<. So, I will put 125 (5 higher than actual for safety) in the time band I am using and put 2 for the amount of disks. Now I look at the projected bitrate in the far right. Hmm, 1572, that sounds a little low but not bad, what do I do?
Hmm, change 2 to 3... now it goes to 2442. Sounds wasteful but it would depend on what I saw when I previewed. IF this was a bright, grainy action film for display on a large screen this would be a no brainer as about 45-55 minutes of that type movie is about the max you can get on a disk without tricks and still use Bicubic .0,.60 which gives the encode a little visual "pop" that I personally like. (Note: See Tigerland or Saving Private Ryan for an example of Director induced grain which attempts to produce a "reality look" and is a bitch to encode)
Scenario 1:
But, in this case the movie I previewed was darker and looked very clean without obvious grain, it had action scenes but they were not done brightly. Hmmmm, So, I think I will set it back to 2 disks and set CCE to 4 or 5 passes using simpleresize as I have a lot of time at the moment. Simple doesn't alter the video and is 20% faster than Bicubic so that will help. That should make a good encode.
Scenario 2:
Hmmmm, damn this movie looked bright and deeply color saturated with a lot of bright action scenes. It must be Doom9's idol, Austin Powers! I am going to have to throw some bitrate at this puppy to not bleach it and keep the look of the video "hot" (I can't explain that except it is like "pop" but different in my brain so don't ask :)). Ok, 3 disks for 2450 bitrate with Bicubic .0,.60 with a 4 pass CCE, drop the audio to 160 or 192. That should do it ok. If it doesn't maybe I will do another run using SimpleResize. One or the other should definitely get the job done.
Scenario 3:
Hmmmm, Damn! The kids are pestering me for a movie tonight but I have to return this rental before noon. It is 90 minutes long...No problem as two disks will give me 2124 plus I can drop the audio to 128 or 160 and open it up a little more. One pass CBR will knock it out in a few hours. Oh heck just to make sure it looks good I will add TS 2,1. That will slow me down 40% but even with TS, the encoding will only take an extra hour or so anyway; with that bitrate it will hold up fine. TS will help keep the action scenes from having any problem. They will NEVER notice any minor, and I mean very minor imperfections, IF there is any at all!
Edit:Will complete and add more later. Whew, this turned in to a pain.
Note: If DVD2AVI with the plugin will not work for you just select internal routines in DVD2SVCD and after about 10-20 seconds of ripping click on the x in the upper right. It will complete the rip then exit. Now, use DVD2AVI to preview the ripped vobs. When you run DVD2SVCD again to do the encode, just uncheck ripping in the ripping tab and select the IFO that is in your working directory. You will not need to activate the plugin in DVD2AVI to use this method.
OK, all you pros out there. Write up your own version and show them how it is really done!.
bump!
*sigh* 20 minutes to find this thread... Well... I will post here soon;)
VILLA21
24th June 2002, 16:23
"Press F5 and let it run for a 10-20 seconds. Do I have some dumb placard or other lame non germane interlaced intro tacked on to the front before the movie starts? If so I would jot down the ending time of the intro and put that time in "Movie offset seconds" in the BBmplex tab of DVD2SVCD. "
Anybody knows,The "ending time" mentioned above is the "Timestamp" on the Status field or the Elapsed time down under?
I have A/V sync problem with a movie encoded 2 weeks ago. The 2nd CD is running out of sync after 20 min. I just wonder if changing the movie offset as DDogg recomends solve the problem. The movie is the "Heaven and Earth" and in the begining there is a WarnerBros logo visible for 10 secs.
There are no title/change pics, no zero length chapters and the final images play fine with the FantomCD.
The logfile is following:
Key found: E169110200
--------------------------------------------------------
- 15/6/2002 9:33:38 ðì
- DVD to SVCD Conversion
- DVD2SVCD ver. 1.0.9 build 3 Pre 22
--------------------------------------------------------
Initializing
Initializing finished.
--------------------------------------------------------
- 15/6/2002 9:33:39 ðì
- Analyzing subtitles
--------------------------------------------------------
Subtitle found: StreamID: 0x29 Language: Hrvatski
Subtitle found: StreamID: 0x28 Language: Magyar
Subtitle found: StreamID: 0x27 Language: Turkish
Subtitle found: StreamID: 0x26 Language: Czech(Ceske)
Subtitle found: StreamID: 0x25 Language: Greek
Subtitle found: StreamID: 0x24 Language: Polish
Subtitle found: StreamID: 0x23 Language: Hebrew
Subtitle found: StreamID: 0x22 Language: Portugues
Subtitle found: StreamID: 0x21 Language: Español
Subtitle found: StreamID: 0x20 Language: English
Executing subtitle selection/verification.
Subtitle selection/verification accepted.
1 subtitle streams selected.
Saving Subtitles ini file
--------------------------------------------------------
- 15/6/2002 9:34:23 ðì
- Free on drive E: 28636.56 mb
- Internal rip
--------------------------------------------------------
Preparing vobfiles to be ripped:
- F:\VIDEO_TS\VTS_01_1.vob
- F:\VIDEO_TS\VTS_01_2.vob
- F:\VIDEO_TS\VTS_01_3.vob
- F:\VIDEO_TS\VTS_01_4.vob
- F:\VIDEO_TS\VTS_01_5.vob
- F:\VIDEO_TS\VTS_01_6.vob
- F:\VIDEO_TS\VTS_01_7.vob
Ripping: F:\VIDEO_TS\VTS_01_1.vob
Ripping: F:\VIDEO_TS\VTS_01_2.vob
Ripping: F:\VIDEO_TS\VTS_01_3.vob
Ripping: F:\VIDEO_TS\VTS_01_4.vob
Ripping: F:\VIDEO_TS\VTS_01_5.vob
Ripping: F:\VIDEO_TS\VTS_01_6.vob
Ripping: F:\VIDEO_TS\VTS_01_7.vob
Ripping finished. Speed: 7015
--------------------------------------------------------
- 15/6/2002 9:48:22 ðì
- DVD2AVI
--------------------------------------------------------
Creating DVD2AVI INI file:
- C:\Program Files\DVD2SVCD\DVD2AVI\DVD2AVI.INI
Variable settings:
iDCT_Algorithm: 32-bit SSE MMX
Executing DVD2AVI.
Executing DVD2AVI. Commandline:
"C:\Program Files\DVD2SVCD\DVD2AVI\DVD2AVI.exe" -CS=2 -YR=1 -EXIT -OF=[E:\Video\Movie\DVD2AVI_Project_file] -IF=[E:\Video\Movie\VTS_01_1.vob,E:\Video\Movie\VTS_01_2.vob,E:\Video\Movie\VTS_01_3.vob,E:\Video\Movie\VTS_01_4.vob,E:\Video\Movie\VTS_01_5.vob,E:\Video\Movie\VTS_01_6.vob,E:\Video\Movie\VTS_01_7.vob]
Framerate: 25000
DVD2AVI processing done.
--------------------------------------------------------
- 15/6/2002 9:52:51 ðì
- Free on drive E: 22894.70 mb
- Extracting the subtitles.
--------------------------------------------------------
Subtitle extraction finished. Extracted these subtitles:
SVCD Stream no: 1 Language: Greek Num. of subs: 1432
Saving Subtitle Timecodes.
Permanent subtitles.
Saving Subtitles ini file
--------------------------------------------------------
- 15/6/2002 10:05:07 ðì
- Free on drive E: 22851.38 mb
- AUDIO Extraction
--------------------------------------------------------
Found AC3 stream id: 0x80
Filename: E:\Video\Movie\Extracted_audio_1.ac3
Audio1 delay: -80 ms
Audio extraction finished.
--------------------------------------------------------
- 15/6/2002 10:14:30 ðì
- Free on drive E: 22493.88 mb
- AUDIO conversion
--------------------------------------------------------
Converting Audio to MP2. Filename: E:\Video\Movie\Extracted_audio_1.ac3
Executing BeSweet. Commandline:
"C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "E:\Video\Movie\Extracted_audio_1.ac3" -output "E:\Video\Movie\Encoded_audio_1.mp2" -logfile "E:\Video\Movie\Encoded_audio_1.log" ) -azid( -L -3db -c normal -g max ) -ota( -d -80 ) -2lame( -e -b 128 -m s )
Audio conversion of E:\Video\Movie\Extracted_audio_1.ac3 finished.
Audio conversion finished.
--------------------------------------------------------
- 15/6/2002 10:39:48 ðì
- Free on drive E: 22374.70 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------
Executing Cinema Craft Encoder.
StreamSectors: 1868663328
AudioSectors: 126755608
VideoPAPO: 26983080
ScanOffsetBytes: 234284
SeqAligningBytes: 14890075
DVDBytes: 0
VideoEndHeader: 8
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 1.00
PureMPEGStream: 1699800272.40
Seconds: 7816.48
CalcMPEGStream: 1699800272.40
Frames: 195237
CDSize: 896.00
Cut point 891.00
Variable Settings:
Frames: 195237
Anti Noise Filter: Off
Passes: 4
Image Quality: 17
VAF file creation: On
Video Encoding Mode: Multipass VBR
Min. bitrate: 300
Max. bitrate: 2530
Avg. Bitrate: 1739
Aspect Ratio: 16:9 (borders added, encoded as 4:3)
---AVS Begin---
LoadPlugin("C:\PROGRA~1\DVD2SVCD\MPEG2Dec\MPEG2DEC.dll")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.DLL")
mpeg2source("E:\Video\Movie\DVD2AV~1.D2V")
BicubicResize(352,432,0.00,0.75)
AddBorders(0,72,0,72)
AvisynthSubtitler("E:\Video\Movie\Subs\","permsubs.txt")
----AVS End----
Closing program
CCE Max Speed: 1.000
Video Encoding finished.
--------------------------------------------------------
- 15/6/2002 9:42:54 ìì
- Free on drive E: 20708.24 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 15/6/2002 9:42:56 ìì
- Free on drive E: 20708.24 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 15/6/2002 9:42:58 ìì
- Free on drive E: 20708.24 mb
- Multiplexing and cutting
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
Offset in Seconds: 2
Executing bbMPEG.
Variable Settings:
Movie offset: 2 seconds
Cut point: 891 mb
Executing RunbbMPEG. Commandline:
"C:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "E:\Video\Movie\bbMPEG_Muxed_File.mpg"
Length of E:\Video\Movie\bbMPEG_Muxed_File00.mpg
3748 Seconds
Offset in Seconds: 3750
Executing bbMPEG.
Variable Settings:
Movie offset: 2 seconds
Cut point: 891 mb
Executing RunbbMPEG. Commandline:
"C:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "E:\Video\Movie\bbMPEG_Muxed_File.mpg"
Multiplexing and cutting finished.
--------------------------------------------------------
- 15/6/2002 9:55:20 ìì
- Free on drive E: 18928.33 mb
- Determining length of audio
--------------------------------------------------------
Analyzing: E:\Video\Movie\bbMPEG_Muxed_File00.mpg
3750.216 seconds E:\Video\Movie\bbMPEG_Muxed_File00.mpg
Analyzing: E:\Video\Movie\bbMPEG_Muxed_File01.mpg
4059.336 seconds E:\Video\Movie\bbMPEG_Muxed_File01.mpg
Analyzing finished.
--------------------------------------------------------
- 15/6/2002 9:56:45 ìì
- Free on drive E: 18928.33 mb
- Creating CD-Images using VCDXBuild
--------------------------------------------------------
- No. of chapters to create: 21
CD image #1: CD_Image_File_CD1.bin
Executing VCDXBuild. Commandline:
"C:\Program Files\DVD2SVCD\VCDImager\vcdxbuild.exe" --verbose --cue-file="E:\Video\Movie\CD_Image_File_CD1.cue" --bin-file="E:\Video\Movie\CD_Image_File_CD1.bin" "E:\Video\Movie\VCDXBuild_Script_1.xml"
--------------------------------------------------------
- 15/6/2002 9:59:44 ìì
- Free on drive E: 18025.50 mb
- Creating CD-Images using VCDXBuild
--------------------------------------------------------
- No. of chapters to create: 25
CD image #2: CD_Image_File_CD2.bin
Executing VCDXBuild. Commandline:
"C:\Program Files\DVD2SVCD\VCDImager\vcdxbuild.exe" --verbose --cue-file="E:\Video\Movie\CD_Image_File_CD2.cue" --bin-file="E:\Video\Movie\CD_Image_File_CD2.bin" "E:\Video\Movie\VCDXBuild_Script_2.xml"
CD-Image creation finished.
--------------------------------------------------------
- 15/6/2002 10:02:45 ìì
- Free on drive E: 17124.22 mb
- SVCD Creation finished!
--------------------------------------------------------
gerti67
24th June 2002, 16:38
Hi VILLA21,
the time DDogg was speaking of must have been the elapsed time - otherwise it wouldn't make any sense I guess. ;)
To your sync issues, hmm, have you already tried to convert the DVD with the latest Build - 1.0.9 Build 3 which is available in this thread:
http://forum.doom9.org/showthread.php?s=&threadid=26981&pagenumber=3
Perhaps, this will work better, and sometimes try to use the other internal supported option if the first doesn't seem to work properly - means you can also try to use vStrip instead.
Hope that helps,
Gerti
Daagar
28th June 2002, 16:54
Thanks for this post DDog. I've just started the world of mpeg encoding, and have been messing with the various ways of doing things. One way that works right off the bat, is using Kwag's templates and making VCDs. ~120min of movie on a single 80min CDR, with (for me!) perfectly acceptable quality.
There is always, of course, lots of talk about vcd vs. svcd, and how to go about doing svcd 'correctly'. Even though you don't give exact methods, just knowing the thought process helps a lot in determining how to go about setting up CCE. With Kwag's/VCD, you just let it run and pray it fits on 1 cd. If it doesn't, you do it again after changing the CQ. Can end up taking as much time as 4-5pass VBR ;)
Bach
29th June 2002, 05:21
Oh yeah. that great kwag BS template foolishing newbies....:rolleyes:
kwag
29th June 2002, 20:06
Someone seems to be in a mission :rolleyes: It's funny bach, that there are over 3,000 people now happy with KVCD, and maybe 4 or 5 ( counting you ) that always have something negative to say!
So I guess BS would be a minority. Including you :D
Bach
30th June 2002, 01:47
as far as I can verify, doom9´s forum is THE place for quality freaks. If somebody post here BS like "I can get DVD quality, at DVD resolution, of a movie with 2h time length, with a file size smaller than 2 CDs, using my wonderfull tmpeg template, and it isn't divx!", this somebody will be well known as IDIOT, and surely he deserve such title. If you have some respect in other places, well... it is an issue of their reputations. There is nothing magical in mpeg encoding. There are limits which must be known and respected to achieve a reasonable quality, otherwise it, the quality, will be lost and the result is nothing but garbage.
If there are 3000 of Mr. Magoos floating in your boat (I don't believe in this number), I am sure they are those guys that think that those downloadable files of kazaa have a reasonable quality:rolleyes: .
Tmpeg have no quality in comparison with CCE, at any bitrate. This is not because of tmpg is cheap and CCE is expensive. This is just a matter of "what algoritm the encoder have choose". If you want, I can upload the whole "swordfish" (800 MB) for you, done with CCE. It may be crappy, however it smells (looks) much better than any of yours "samples".
advice for kwag: stop to play the professional and go back to college. It seems you don´t have any technical knowledge (at least, your forum is plenty of technical questions with no answer).
advice for newbies: don't be foollished.
kwag
30th June 2002, 04:54
Originally posted by Bach
as far as I can verify, doom9´s forum is THE place for quality freaks. If somebody post here BS like "I can get DVD quality, at DVD resolution, of a movie with 2h time length, with a file size smaller than 2 CDs, using my wonderfull tmpeg template, and it isn't divx!", this somebody will be well known as IDIOT, and surely he deserve such title. If you have some respect in other places, well... it is an issue of their reputations. There is nothing magical in mpeg encoding. There are limits which must be known and respected to achieve a reasonable quality, otherwise it, the quality, will be lost and the result is nothing but garbage.
If there are 3000 of Mr. Magoos floating in your boat (I don't believe in this number), I am sure they are those guys that think that those downloadable files of kazaa have a reasonable quality:rolleyes: .
Tmpeg have no quality in comparison with CCE, at any bitrate. This is not because of tmpg is cheap and CCE is expensive. This is just a matter of "what algoritm the encoder have choose". If you want, I can upload the whole "swordfish" (800 MB) for you, done with CCE. It may be crappy, however it smells (looks) much better than any of yours "samples".
advice for kwag: stop to play the professional and go back to college. It seems you don´t have any technical knowledge (at least, your forum is plenty of technical questions with no answer).
advice for newbies: don't be foollished.
It's funny again :D you're the only one that jumps up every time someone posts something about KVCD! I'm sorry for you that you were never able to do something creative in your life, and you have to bark at others. And you're right that CCE has no quality comparison to TMPEG. We're talking about MPEG-1 in ALL KVCD templates. And you should know ( oh mighty brain :eek: ) that CCE's MPEG-1 SUCKS besides TMPEG's MPEG-1.
Advice to bach: Don't be a jerk and stay out of topics you don't intend to help. YOU just confuse people and create bad examples.
Advice to newbies: You decide what is best for you. You make your own judgments based on your own experiments and encodes. And take users feedback ( like bach's ) with a grain of salt.
kwag
kwag
30th June 2002, 06:04
Oh, BTW, I forgot to post a new sample link.
http://ns1.shidima.com/kwag/styx.mpg
This is a 30 second clip from a "Styx" concert.
It's 6MB in size, because the original material was filmed digital, so I couldn't IVTC. Only de-interlaced. Plus it's full screen.
This is the kind of sample that bach calls BS.
So if anyone cares to download it, go ahead, and feel free to comment.
It may not be SVCD quality ( that's questionable? ), but I think it's far from BS :rolleyes:
kwag
chainsaw135
30th June 2002, 10:29
KWAG,that looks fine 2 me what were the settings you used, i'm sure alot of people would like 2 know.
dvd2svcd
30th June 2002, 13:21
Bach & Kwag: Do not let your feelings turn this into another flame war. Be tolerant towards others or be striked (at least on this board). If you want a flame war there's plenty on vcdhelp. :D
Bach
30th June 2002, 17:44
Bach wrote:
advice for kwag: stop to play the professional and go back to college. It seems you don´t have any technical knowledge (at least, your forum is plenty of technical questions with no answer).
Is there no answer to this? Aren´t you a college student? High school?
could you answer some basic questions for a professional of image compression that you pretend to be?
a)What the hell a DCT is, and what it does?
b)Is there any real advantage playing with the quantization matrices? Why (talk about tresholds and limitations)?
b)Why don't FFT?
c)Does mpeg may take advantage of wavelet transform? yes? no? why? How?
btw: that sample smells bad (and I am not surprised:rolleyes: ). Beginning with a dark scene (easy to compress), using CVD resolution with average bitrate equal to 1550 kbps (is this the big deal? Are you kidding? There is nothing new with these values), washing details and edges (is that a white suit or a white shirt?), and you are after all deinterlacing... So it smells bad, because with this sample you are far from that thing that you claim:
a) it is not 2h into one CD with vcd or cvd resolution,
b) nor 1h into 1 cd with DVD resolution.
You are using in this sample the resolution of (a) and the average bitrate of (b). Very fair:eek:
This is quite interesting...Deinterlacing and keeping the quality? simply nonsence.
dvd2svcd wrote:
Bach & Kwag: Do not let your feelings turn this into another flame war. Be tolerant towards others or be striked (at least on this board). If you want a flame war there's plenty on vcdhelp.
oh yeah. I saw that "1-vbr/cq/x-vbr contest". It was good you have followed my advice "never argue with idiots...". It is because of things like that that I don´t have an account there, and I would like to see this forum free of such kind of rubbish. This is THE forum, where one can meet real wise people. Lets keep it as it is.
off topic: BRASIL IS THE WORLD CUP CHAMPION (5 TIMES NOW). THANK YOU RONALDO!
moderator:"sorry Bach. Strike one for you. I don´t admit flame wars nor cappital letters."
Bach (and other musicians):"no problem. Today I am very happy. Do it as you feel it is good!"
kwag
30th June 2002, 19:40
Originally posted by chainsaw135
KWAG,that looks fine 2 me what were the settings you used, i'm sure alot of people would like 2 know.
That sample was encoded with the standard KVCD 352x480 NTSC template. The second from left top here http://www.kvcd.net/dvd-models.html
The only change was the frame rate. I have 23.976 as default in all templates. But for this sample, I had to encode at 29.97 because the source was NTSC 29.97 interlaced. If it had been shot 24fps(FILM), it would have looked better and the file size would have been about 20% smaller.
kwag
kwag
30th June 2002, 20:19
Originally posted by Bach
Is there no answer to this? Aren´t you a college student? High school?
could you answer some basic questions for a professional of image compression that you pretend to be?
a)What the hell a DCT is, and what it does?
b)Is there any real advantage playing with the quantization matrices? Why (talk about tresholds and limitations)?
b)Why don't FFT?
c)Does mpeg may take advantage of wavelet transform? yes? no? why? How?
btw: that sample smells bad (and I am not surprised:rolleyes: ). Deinterlacing and keeping the quality... simply nonsence.
oh yeah. I saw that "1-vbr/cq/x-vbr contest". It was good you have followed my advice "never argue with idiots...". It is because of things like that that I don´t have an account there, and I would like to see this forum free of such kind of rubbish. This is THE forum, where one can meet real wise people. Lets keep it as it is.
off topic: BRASIL IS THE WORLD CUP CHAMPION (5 TIMES NOW). THANK YOU RONALDO!
moderator:"sorry Bach. Strike one for you. I don´t admit flame wars nor cappital letters."
Bach (and other musicians):"no problem. Today I am very happy. Do it as you feel it is good!"
To answer your questions:
Am I a high school student? I wish!. I got out of high school in 1977.
Where were you then? Probably an angel flying in a cloud ( or burried in the center of the earth :devil: )
Answer to A) Discrete Cosine Transform. To answer you, and so that other non-technical people here can understand in a short sentence, imagine a "pool" of filters that process information in parallel. The DCT samples an 8X8 block and creates an 8X8 block of DCT coefficients. We could go on, but it would take a longer explanation, that nobody would care.
Answer to B) Of course there is!. The problem is that the quantization vs. resolution is not linear. X matrix doesn't work the same at different resolutions. This is a hot topic right now at kvcd.net, because all templates had integrated the Andreas Q. Matrix, and we were getting different results. The default matrix, for example the one in TMPEG, is a general purpose matrix. It's not optimized for X resolution. The Andreas team did an excelent job, and I saw the results. But it's optimized for specific resolutions.
Answer to your second B (you didn't learn to spell) ) Why would you want to use FFT ( Fast Fourier Transform )?
It doesn't work well as opposed to DCT.
In short, it does a poor approximation job on a matrix.
Answer to C)Does mpeg may take advantage of wavelet transform? yes? no? why? How?
That I can't answer. Because I know very very little about wavelet transform. ;)
If it smells bad, it must be your monitor :p
kwag
dvd2svcd
30th June 2002, 20:59
Kwag, do not I repeat do not comment on others spelling. Do that again and you're out!
Bach and Kwag: Keep to facts, no namecalling, or personal attacks! I will close and delete this thread if it happens again!
=> Commentary about Kwag answer a: average Joe answer, plenty of misconceptions. There is NO filtering in DCT (discrete cosine transform). It is a completely LOSSLESS transform.
“kwag ask: Hey wise teacher, I did not know that it was lossless… Could you tell me how does it works?"
Lets describe a movie as a string of GOPs, each GOP as a group of 3 different type of frames (I, P and B), each frame as a set of 3 pictures (one picture of luminance, 2 of chrominance), each set of pictures as a sequence of slices, each slice as a group of 16x16 squares of pel (the so called macroblock) and each macroblock as a group of six 8x8 squares or blocks (4 blocks of luminance and 2 blocks of chrominance) of pel (= picture element).
Take one block of the luminance picture. Determine the brightness of each one of its 64 pel (pel may be called pixel too) and scale them to a given limit, say from 0 to 255. You may get the following array:
[f]=
120 108 90 75 69 73 82 89
127 115 97 81 75 79 88 95
134 122 105 89 83 87 96 103
137 125 107 92 86 90 99 106
131 119 101 86 80 83 93 100
117 105 87 72 65 69 78 85
100 88 70 55 49 53 62 69
89 77 59 44 38 42 51 58
Do the Discrete cosine transform, using the equation
F(u,v)=const*sum(y=0,7)sum(x=0,7)f(x,y)*cos((2*x+1)*u*Pi/16)* cos((2*y+1)*v*Pi/16)
Where sum(y=0,7) means the sum over the values of y, from y=0 to y=7; const is equal to 1/2*sqrt(2) if x or y is equal to 0, or 1/2 otherwise. The f(x,y) means the value of f at x and y position (i.e., f(2,3)=97).
The resulting DCT transform is
[F]=
700 90 100 0 0 0 0 0
90 0 0 0 0 0 0 0
-89 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
So that those 64 values are now represented by only 5 not zero values! Because The DCT always tends to compute zeroes or small values for high frequencies (which are stored in the right_botton side of the array), this matrix is transferred to the receiver in zigzag scan order, from Up_left to right_down: 700 90 90 -89 0 100 0 0 0 .... 0. The zeroes are not transferred and an End-Of-Block is coded instead of them. The decoder will read the resulting string and use the following equation called Inverse DCT
f(x,y)=const*sum(v=0,7)sum(u=0,7)F(u,v)*cos((2*u+1)*x*Pi/16)* cos((2*v+1)*y*Pi/16)
to invert the transform, so that the result are exactly the original brightness values.
So, is there any filtering after all? No! DCT is just a more smart use of bytes.
=> Commentary about Kwag answer b: again, a lot of misconceptions. There is no direct correlation between the resolution and the quantization matrix. The quantization matrix (QM) works only in each 8x8 square of transformed pixels. In our example, a QM like
QM=
8 16 19 22 26 27 29 34
16 16 22 24 27 29 34 37
19 22 26 27 29 34 34 38
22 22 26 27 29 34 37 40
22 26 27 29 32 35 40 48
26 27 29 32 35 40 48 58
26 27 29 34 38 46 56 69
27 29 35 38 46 56 69 83
will work only over the DCT coefficients F(i,j)
[F]=
700 90 100 0 0 0 0 0
90 0 0 0 0 0 0 0
-89 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
achieved from an intracoded block.
“teacher, how does this quantization animal works? Why to use them?”
The encoder applies uniformly variable values to DCT coefficients to reduce the number of bits required to represent these DCT coefficients. This is called quantization, and it works in such way that higher frequency coefficients (those at the right_botton of DCT coefficients array) will usually be more strongly quantized than lower frequency coefficients (those at the left_top). This is done to take advantage of human eyes limitation of accuracy at high frequency.
How does the encoder works the quantization?
In our example, F(u,v) is an unquantized DCT coefficient. QM(i,j) is the quantization value of our quantization matrix at i raw and j column. S is the scale factor. There is a table of values of S, and they may vary linear or non linearly (do you remember the setting “linear quantizer scale=on or off”, of CCE?). Lets assume that QF(u,v) is a quantized DCT coefficient.
For coefficients of intra coded blocks,
QF(u,v) = [(32 x F(u,v)) + (sign(F) x QM(i,j) x S)]/(2 x S x QM(i,j))
If u=v=0, QF(u,v)= F(u,v)/k,
where k is equal to 8, 4 or 2, if the precision is 8, 9 or 10 bits, respectively. For all coefficients of non intra coded blocks,
QF(u,v) = (32 x F(u,v))/(2 x S x QM(i,j))
The values of S are sent to the decoder at the macroblock level and can be changed frequently by the encoder and used by it to control the bitrate. The values of the linear range of S comes from 2 to 62. The nonlinear range from 1 to 112.
Since our aim is to decrease the value of those DCT coefficients, so that we can save bits, there are some few conclusions that we can get from these equations:
a)non linear quantizer scale is better than linear quantizer, to help quantization and, as result, help compression. We can use this advantage only in mpeg2, because mpeg1 doesn´t have non linear quantizer;
b)8 bits DCT precision is better than 10 bits to help compression;
c)since the high frequency F(u,v) DCT coefficients, those of the botton_right DCT array, already have values very small or even most of times equal to zero, there is a VERY SMALL, and even worthless advantage in increasing the value of the corresponding QM(i,j). Using those quantization matrices with dozens of 99s, we are, most of times, zeroing values which already are zeroes, or strongly decreasing values that already are small and could be decreased by the standard mpeg matrix anyway. Quit wise, don´t you think? And after all, the standard mpeg matrix already is a result of qualitative research, done to achieve the most acceptable quality of high frequencies.
To sum it up: you don´t need to play the quantization matrices game. The standard matrix already is good enough.
Commentary about Kwag answer to 2nd question B: completely wrong! FFT (fast Fourier transform) is indeed very good! It is not used in mpeg encoding because it uses much more computational cycles than DCT, so that DCT is just an economical choice. Actually, DCT is a subset of a FFT. DCT is the not-complex part of a FFT.
Commentary about Kwag answer c: no commentary.
“but teacher… please, what is the answer?”
Very lazy pupil, don´t you are? do your own research. Hints: it works much better than FFT; there are tons of papers supporting the wavelet implementation in mpeg encoding; some research groups have reached a decent image rate compression of 150:1. The highest decent mpeg rate is ~35:1.
@dvd2svcd: sorry if I piss you off.
Nice numbers Bach. Identical to the formulas starting in page 236 of the book "Video Demystified" which I read some time ago.
But please read that what I meant was "imagine a "pool" of filters"
I didn't say anything about filtering. It's a "high level" conceptual view for non-technical people to understand. For technically oriented, I meant RLL, zig-zag scan, VLE, and Q functions.
You say FFT is very good? If that's what you think, fine.
Quoting article:
"Why DCT not FFT?
DCT is like FFT, but can approximate lines well with few coeff."
Read here:
http://www.cs.sfu.ca/undergrad/CourseMaterials/CMPT479/material/notes/Chap4/Chap4.2/Chap4.2.html
Quoting:
"There is no direct correlation between the resolution and the quantization matrix"
Really? In a theoretical model no, in actual practice YES.
Ask Andreas and his team ( or read his article, if you can read German ) why they had to device new matrixes for different resolutions. So in real life, yes there is a BIG difference between quantize matrix/resolution. Encoders are not static models. They depend on too many variables.
And in the end theory != practice. It all boils down to what we see with our eyes, and not what the machine sees.
And that's why KVCD's are are now becoming very popular because there are so many users tweaking, experimenting and optimizing it. And there's no magical math involved. Just thousands of eyes which are the last and final words of acceptance. The goal of KVCD.Net is simply to fit 120 minutes of video in one 80 minute CD-R with an acceptable quality. I never said DVD quality or SVCD quality. But it's far above a standard VCD quality. Although a 352x480 KVCD @2,300Kbps MAX, as in some of the templates, against SVCD's at 480x480 @2,500Kbps MAX is questionable.
kwag
Nice numbers Bach. Identical to the formulas starting in page 236 of the book "Video Demystified" which I read some time ago.
of course a given formula is and will ever be written identically. If one find two different formulas for the same thing, there is at least one then wrong.
But please read that what I meant was "imagine a "pool" of filters"
I didn't say anything about filtering.
what? You said that it was a pool of filters, however this doesn't meant you were talking about filtering? Does it make sence?
It's a "high level" conceptual view for non-technical people to understand. For technically oriented, I meant RLL, zig-zag scan, VLE, and Q functions.
come on... the question was about DCT. There is no high level here. Also, DCT has nothing to do with zig-zag scanning, Q functions or whatever.
You say FFT is very good? If that's what you think, fine.
Quoting article:
"Why DCT not FFT?
DCT is like FFT, but can approximate lines well with few coeff."
and... Where is the end of the scentence? Oh, you don´t know:). The complete scentence is "DCT is like FFT, but can approximate lines well with few coeff, thus it is more computational friendly, increasing the spead of encoding/deconding". Could you tell me where you saw "FFT cannot make this properly"?
Read here:
http://www.cs.sfu.ca/undergrad/CourseMaterials/CMPT479/material/notes/Chap4/Chap4.2/Chap4.2.html
then, after all, you already have read about mpeg compression, but you still cannot understand it:rolleyes: tsc, tcs... borderline IQ.
Quoting:
"There is no direct correlation between the resolution and the quantization matrix"
Really? In a theoretical model no, in actual practice YES.
Ask Andreas and his team ( or read his article, if you can read German ) why they had to device new matrixes for different resolutions. So in real life, yes there is a BIG difference between quantize matrix/resolution. Encoders are not static models. They depend on too many variables.
Are you quoting Andreas? Anyway: each one new set of matrices have a result worse in comparison with the mpeg standard. This can be seen in practice, watching the movie. The picture looks good, but there is details being lost. If the quantization value given by bitrate viewer is good, this is just a side effect of those 99s in the quantization matrix.
And in the end theory != practice. It all boils down to what we see with our eyes, and not what the machine sees.
Average Joe common sence. In theory, Brasilian football is the best of the world. And guess what? In practice too:D
And that's why KVCD's are are now becoming very popular because there are so many users tweaking, experimenting and optimizing it. And there's no magical math involved. Just thousands of eyes which are the last and final words of acceptance.
acceptance! this is the word. There are levels of acceptance, and thousands of people just have a questionable level of acceptance.
The goal of KVCD.Net is simply to fit 120 minutes of video in one 80 minute CD-R with an acceptable quality. I never said DVD quality or SVCD quality.
What? LIAR. Most of those templates at kvcd.net have a "DVD quality" announce.
But it's far above a standard VCD quality.
of course it is far above standard VCD quality. Standard vcd cannot use VBR.
Although a 352x480 KVCD @2,300Kbps MAX, as in some of the templates, against SVCD's at 480x480 @2,500Kbps MAX is questionable.
MAX? what the hell MAX can buy? There is no comparison if you just have MAX. If you compare average_bitrate/blocks, there is a comparison to be done. If not, this is just rubbish. Your sample linked above have exactly the same average_bitrate/blocks of a SVCD encoded @ 2110 kbps AVERAGE. Everybody here knows that any SVCD looks good at such bitrate. It was because of this that I said your sample smells bad. It doesn´t look bad (despite there are edge details lost, I can see), but it is not an evidence of those "kvcd templates for 120minutes into 1 CD with DVD quality miracles". It is far from this. It is at CVD resolution, and just 67 min into 1 CD. So, again, where is the big deal?
chainsaw135
1st July 2002, 07:16
Ok i've had about enough of this. thread is now closed!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.