Log in

View Full Version : Difficulties encoding an entire TV series


dpmott
31st March 2004, 16:38
Hi all --

First time caller, short time listener, so forgive me if I ask something that's already been answered.

I really like AutoGK, it works well. I've had a few difficulties with it, though, and I'm wondering if my expectations are just wrong, or if I'm misusing the tool. I've most recently used the 1.09 beta release.

I'm trying to encode an entire TV series, and I'd like to have the following attributes when I get done:
1. Same width and height (I chose a width of 576)
2. Same resizer matrix (i.e. don't use a softer resizer)
3. 2-pass encoding
4. Similiar bitrate, assuming here that similiar bitrates will
yield similiar quality for episodes with similiar content.
5. In the absence of the ability to set a similiar bitrate,
a similiar output filesize is desirable.

So, I cracked open AutoGK, went to the advanced properties, and set up a *fixed* width of 576, chose the DivX encoder, and chose VBR MP3 @ 128 kbps. Then I went back to the main page and chose a custom size of 450MB for my 48 minute episodes. I queued up the first five and went to bed.

The first one came out perfectly, the width/height/size/quality were all exactly what I wanted.


Unfortunately...

Ep 02:
[3/27/2004 6:37:04 PM] Compressibility percentage is: 49.12
[3/27/2004 6:37:04 PM] Chosen resolution is: 512x400 ( AR: 1.28 )

Ep 03:
[3/27/2004 9:22:31 PM] Compressibility percentage is: 68.93
[3/27/2004 9:22:31 PM] Chosen resolution is: 608x480 ( AR: 1.27 )

Ep 04:
[3/28/2004 12:24:41 AM] Compressibility percentage is: 67.62
[3/28/2004 12:24:41 AM] Chosen resolution is: 608x480 ( AR: 1.27 )

Ep 05:
[3/28/2004 3:33:10 AM] Compressibility percentage is: 76.48
[3/28/2004 3:33:10 AM] Chosen resolution is: 640x496 ( AR: 1.29 )

So... since there's an option for *minimum* and *fixed* width, I figured that fixed width would lock it down? But that's not what I saw. Bug?



Update: The above log entries are a result of mis-configuring my advanced options. I discovered the problem after posting, sorry. Please disregard the section in small font.

For Ep 02, I apparently didn't give it a big enough output size to yield the desired output resolution, so it reduced the resolution for me. Knowing that, I could re-encode all of the episodes at a higher output filesize, and presumably Ep 02 would just have a little less quality (this assumes that the fixed width worked like I think it should). I actually expected it to use the softer resizer in this case, since that's what the AutoGK 1.0 release did, and that's what I was looking for in the logfile output.

I also wonder if the compressibility test (which is run over, what, about 5% of the file?) is always accurate. If I had an option to set it to use 100% of the file during the compression test, I'd play with it to see if the results ever changed.

So, to recap, how do I get all of my output files to have the same attributes? I find myself wishing for another option in the "Step 3: Select Output Size" section where I could specify a specific bitrate for a two-pass encode. That would make me *very* happy. Also, if I understand how thing work under the hood, it would also eliminate the need for the compressibility test in that mode of operation, right?

Thanks in advance for any responses!

-Dave

manono
31st March 2004, 18:29
Hi and welcome to the forum.

We'll need to see a log file for one of those wrong resolution episodes. If, as you say, you chose a fixed 576 width for all 5 episodes, you may have spotted a bug.

Assuming that the episodes are the same length, and the audio is the same size, then bitrate is analogous to file size. Having the ability to set the bitrate won't help you.

4. Similiar bitrate, assuming here that similiar bitrates will
yield similiar quality for episodes with similiar content.

You've proven your assumption wrong. These various episodes compress very differently.

It looks to me as if you may be trying to put 10 episodes on a DVD-R. If so, if I were you, I'd go for a quality based encode, with 65% maybe as the percentage and 576 as the horizontal width. That's the way to get similar quality for the various episodes at the same resolution.

dpmott
31st March 2004, 19:25
Originally posted by manono
Hi and welcome to the forum.

We'll need to see a log file for one of those wrong resolution episodes. If, as you say, you chose a fixed 576 width for all 5 episodes, you may have spotted a bug.


I'll post one of them in a separate post for you.


It looks to me as if you may be trying to put 10 episodes on a DVD-R. If so, if I were you, I'd go for a quality based encode, with 65% maybe as the percentage and 576 as the horizontal width. That's the way to get similar quality for the various episodes at the same resolution.

That'd be fine, I guess, but I really wanted a 2-pass encode. My understanding is that a 2-pass encode increases the quality of high-motion scenes by providing a higher bitrate during those parts of the video, while slower scenes have a lower bitrate. This helps to keep the quality the same from scene to scene. Feel free to correct me if I'm wrong...

Okay, I'll go post one of those logs now...

dpmott
31st March 2004, 19:38
Ummm... after having read the log files, and the output window again, I realized that I had re-run AutoGK on my files again, on the chance that I had not set up my Advanced Options correctly.

The log files and the most recent entries in the AutoGK log window do indicate that my chosen fixed width was applied to the output files, so please disregard that part of my previous post. Sorry about that.

However, I do note that for this episode (Ep 02), where the comp test yields a very small value, a softer resizer was not chosen. With AutoGK 1.0, my experience was that it would use a softer resizer when I fixed the output resolution, in order to increase quality.

So, I guess I'm just asking, is it working the way that it should?

Thanks,
-Dave


-----------------------------------------------------------------

[3/28/2004 10:44:01 PM] Input dir: C:\Movies\X-files\Season 1\01-02 - Deep Throat
[3/28/2004 10:44:01 PM] Output file: C:\Movies\X-files\Season 1\01-02 - Deep Throat\01-02 - Deep Throat.avi
[3/28/2004 10:44:01 PM] Audio: English
[3/28/2004 10:44:01 PM] Subtitles: none
[3/28/2004 10:44:01 PM] Codec: DivX
[3/28/2004 10:44:01 PM] Target size: 450Mb
[3/28/2004 10:44:01 PM] Custom resolution settings: fixed width of 576 pixels
[3/28/2004 10:44:01 PM] Custom audio settings: VBR MP3 with average bitrate: 128Kbps
[3/28/2004 10:44:01 PM] Started encoding.
[3/28/2004 10:44:01 PM] Demuxing and indexing.
[3/28/2004 10:44:55 PM] Analyzing source.
[3/28/2004 10:44:55 PM] Writing the following script to C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\lastjob.vcf
===========================================================
VirtualDub.Open("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\gk_tmp\\_.avs",0,0);
VirtualDub.RemoveInputStreams();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\gk_tmp\\_.avi");
===========================================================
[3/28/2004 10:48:27 PM] Source has percentage of interlacing in motion areas: 36.97
[3/28/2004 10:48:27 PM] Source has percentage of telecined patterns: 94.07
[3/28/2004 10:48:27 PM] Source has percentage of progressive patterns: 4.57
[3/28/2004 10:48:27 PM] Source has percentage of interlaced patterns: 1.36
[3/28/2004 10:48:27 PM] Source is considered to be FILM.
[3/28/2004 10:48:27 PM] Found 65694 frames
[3/28/2004 10:48:27 PM] Encoding audio.
[3/28/2004 10:56:28 PM] Audio size: 43,039,832 bytes (41.05 Mb)
[3/28/2004 10:56:28 PM] Overhead: 4,240,128 bytes (4.04 Mb)
[3/28/2004 10:56:28 PM] Video size: 424,579,240 bytes (404.91 Mb)
[3/28/2004 10:56:28 PM] Target bitrate is: 1240kbps
[3/28/2004 10:56:28 PM] Running compressibility test.
[3/28/2004 10:56:28 PM] Writing the following script to C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\01-02 - Deep Throat_comptest.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\filters\mpeg2dec3dg.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\decomb.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\undot.dll")

function getOrder(clip c) {
order = GetParity(c) ? 1 : 0
return order }

movie = mpeg2source("C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\01-02 - Deep Throat.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=35)
c_width = width(cropclip)
c_height = round(height(cropclip) / 0.911392405063291)
input_par = float(c_width)/float(c_height)
fixed_aspect = input_par > 1.4 ? 0.911392405063291 : 0.888888888888889
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 576
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=35)
Telecide(order=getOrder(movie),guide=1,post=2).Decimate(mode=0)
Undot()
LanczosResize(out_width,out_height)
SelectRangeEvery(280,14)
===========================================================
[3/28/2004 10:56:28 PM] Writing the following script to C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\lastjob.vcf
===========================================================
VirtualDub.Open("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\gk_tmp\\01-02 - Deep Throat_comptest.avs",0,0);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.SetCompData(505,"OAEAAAAAAAABAAAAZOoSAAAAAEABAAAAAAAAAAAAAAAAAAAA8AAAADIAAAAgEWoAAAAwAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACamZmZmZnJP5qZmZmZmck/AAAAAAAAAAAAAAAAgAIAAOABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAABkAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAA/////wIAAAABAAAAAAAAAAEAAAACAAAAQzpcTW92aWVzXFgtZmlsZXNcU2Vhc29uIDFcMDEtMDIgLSBEZWVwIFRocm9hdFxna190bXBcMDEtMDIgLSBEZWVwIFRocm9hdF9jb2RlYy5sb2cAYzpcdGVzdC5kaXZ4AEM6XE1vdmllc1xYLWZpbGVzXFNlYXNvbiAxXDAxLTAyIC0gRGVlcCBUaHJvYXRcZ2tfdG1wXDAxLTAyIC0gRGVlcCBUaHJvYXRfY29kZWMubXYAYzpcbmV3cmMudHh0AA==");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\gk_tmp\\01-02 - Deep Throat_comptest.avi");
===========================================================
[3/28/2004 11:01:49 PM] Duration was: 5 minutes 20 seconds
[3/28/2004 11:01:49 PM] Speed was: 10.26 fps.
[3/28/2004 11:01:49 PM] Compressibility percentage is: 39.80
[3/28/2004 11:01:49 PM] Chosen resolution is: 576x448 ( AR: 1.29 )
[3/28/2004 11:01:49 PM] Predicted comptest value is: 39.80
[3/28/2004 11:01:49 PM] Running first pass.
[3/28/2004 11:01:49 PM] Writing the following script to C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\01-02 - Deep Throat_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\filters\mpeg2dec3dg.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\decomb.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\undot.dll")

function getOrder(clip c) {
order = GetParity(c) ? 1 : 0
return order }

movie = mpeg2source("C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\01-02 - Deep Throat.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=35)
c_width = width(cropclip)
c_height = round(height(cropclip) / 0.911392405063291)
input_par = float(c_width)/float(c_height)
fixed_aspect = input_par > 1.4 ? 0.911392405063291 : 0.888888888888889
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 576
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=35)
Telecide(order=getOrder(movie),guide=1,post=2).Decimate(mode=0)
Undot()
LanczosResize(out_width,out_height)
===========================================================
[3/28/2004 11:01:49 PM] Writing the following script to C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\lastjob.vcf
===========================================================
VirtualDub.Open("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\gk_tmp\\01-02 - Deep Throat_movie.avs",0,0);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.SetCompData(505,"OAEAAAAAAAACAAAAZOoSAAAAAEABAAAAAAAAAAAAAAAAAAAA8AAAADIAAAAgEWoAAAAwAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACamZmZmZnJP5qZmZmZmck/AAAAAAAAAAAAAAAAgAIAAOABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAABkAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAAAAAAA/////wIAAAABAAAAAAAAAAAAAAACAAAAQzpcTW92aWVzXFgtZmlsZXNcU2Vhc29uIDFcMDEtMDIgLSBEZWVwIFRocm9hdFxna190bXBcMDEtMDIgLSBEZWVwIFRocm9hdF9jb2RlYy5sb2cAYzpcdGVzdC5kaXZ4AEM6XE1vdmllc1xYLWZpbGVzXFNlYXNvbiAxXDAxLTAyIC0gRGVlcCBUaHJvYXRcZ2tfdG1wXDAxLTAyIC0gRGVlcCBUaHJvYXRfY29kZWMubXYAYzpcbmV3cmMudHh0AA==");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\01-02 - Deep Throat.avi");
===========================================================
[3/28/2004 11:53:15 PM] Duration was: 51 minutes 26 seconds
[3/28/2004 11:53:15 PM] Speed was: 21.29 fps.
[3/28/2004 11:53:15 PM] Running second pass.
[3/28/2004 11:53:15 PM] Writing the following script to C:\Movies\X-files\Season 1\01-02 - Deep Throat\gk_tmp\lastjob.vcf
===========================================================
VirtualDub.Open("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\gk_tmp\\01-02 - Deep Throat_movie.avs",0,0);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.SetCompData(505,"OAEAAAAAAAADAAAAZOoSAAAAAEABAAAAAAAAAAAAAAAAAAAA8AAAADIAAAAgEWoAAAAwAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACamZmZmZnJP5qZmZmZmck/AAAAAAAAAAAAAAAAgAIAAOABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAABkAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAAAAAAA/////wIAAAABAAAAAAAAAAAAAAACAAAAQzpcTW92aWVzXFgtZmlsZXNcU2Vhc29uIDFcMDEtMDIgLSBEZWVwIFRocm9hdFxna190bXBcMDEtMDIgLSBEZWVwIFRocm9hdF9jb2RlYy5sb2cAYzpcdGVzdC5kaXZ4AEM6XE1vdmllc1xYLWZpbGVzXFNlYXNvbiAxXDAxLTAyIC0gRGVlcCBUaHJvYXRcZ2tfdG1wXDAxLTAyIC0gRGVlcCBUaHJvYXRfY29kZWMubXYAYzpcbmV3cmMudHh0AA==");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\gk_tmp\\01-02 - DEEP THROAT AC3 T01 2_0ch 192Kbps DELAY 12ms.mp3",0x00000202,1);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,12);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.SaveAVI("C:\\Movies\\X-files\\Season 1\\01-02 - Deep Throat\\01-02 - Deep Throat.avi");
===========================================================
[3/29/2004 12:34:39 AM] Duration was: 41 minutes 23 seconds
[3/29/2004 12:34:39 AM] Speed was: 26.46 fps.
[3/29/2004 12:34:39 AM] Job finished.

Hobojobo
31st March 2004, 19:45
3. Output size: You could choose custom size for the episode, in other word costom size/frames = bitrate

4. Episode can quite differ in terms of "compressibility" (nice word,eh)
Either you go for the same quality for each episode,
then would end up with different file sizes, provided that you use the same fixed frame size, say 640x xxx.
Or you choose the size/bitrate and you get different quality in your episode, using a fixed frame size.


BTW:
I would like to see a feature to choose a fixed frame size, 640x480 for episodes, for example, to get the same frame size for all episodes. I wouldn't mind to loose some pixel on the borders , to avoid AR error.

manono
1st April 2004, 05:02
Hi-

So, to recap, how do I get all of my output files to have the same attributes?

If by "same attributes", you mean same quality at the same resolution, then I already told you. Use Quality based encoding with a predefined horizontal width. You lose file size control, but based on your posts, that's not all that important to you. The only advantage to using 2-pass encoding is that it will give you your desired file size. But for the same resolution, the resulting quality among the different episodes can vary wildly.

I also wonder if the compressibility test (which is run over, what, about 5% of the file?) is always accurate.

It's reasonably accurate, to within 5% or so. The error can get compounded after AutoGK starts adjusting the resolution, matrix and resizer. But I've been pleasantly surprised as to how accurate it is even after those changes have been made.

I find myself wishing for another option in the "Step 3: Select Output Size" section where I could specify a specific bitrate for a two-pass encode. That would make me *very* happy.

Just choose a larger final file size. It's the same thing.

My understanding is that a 2-pass encode increases the quality of high-motion scenes by providing a higher bitrate during those parts of the video, while slower scenes have a lower bitrate. This helps to keep the quality the same from scene to scene. Feel free to correct me if I'm wrong...

Yes, 2-pass encoding will do that, given the constraints of the final file size you set. But that has nothing to do with the relative quality of the different episodes when you set them all for the same size. Again, Quality based encoding is the way to go if you want all the episodes to have the same quality. It also boosts the bitrate for the action scenes, and lowers it for the static scenes, and does it better than 2-pass encoding does. Although, because of the way that AutoGK limits quants, the end results will be about the same, assuming the final filesizes are also the same. That is, if the final file size for the Quality based episode is the same as for a 2-pass encode, then the quality of the 2 will be very similar.

I didn't just make up all this stuff, you know. :) Hobojobo said pretty much the same things, and used fewer words to say them.