Avidemux 2.6.4 - H.264 encode by video size is massively broken

Started by thany, August 12, 2013, 08:25:19 PM

Previous topic - Next topic

thany

I set the encoder to encode to a video size of 250MB, and it ended up over 5GB. There's not much to add here. I mean, 250MB is 250MB, right? So how can the resulting video grow to over 5GB?? Audio is compressed as AAC 128kbps, jsyk.

I seriously don't know what else to add. If there's anything, just let me know, I guess.

AQUAR

Well I can't resist - Add details!
Seriously - compress what and how much into 250MB using what and which settings?

thany

Input: MP4 H.264/AAC, about 800MB in size
Output video: H.264, Two-pass by video size (250MB)
Output audio: copy
Output container: MKV

Then, Ctrl+S, and save as the same file but change extention to .mkv.
First pass went by without a hitch. Second pass: the projected filesize started to add up quickly and near the end of the process it was over 5GB.

If more details are needed, then I'm terribly sorry, but I really don't know what else I could specify.

I haven't checked (yet) how reproducible this is.

AQUAR

I don't know why you get the very large video size but maybe we can find out.

There is a limit on how much you can compress a video.
So first thing is -  how long in time is this video?


thany

About a half hour or so. I can give you an exact number in 2 hours, when I'm back home ;)

If there's a limit, then it certainly shouldn't go over the original filesize.
Also, it works in Avidemux 2.5.6 (only A/V gets horribly out of sync, which is why I'm trying 2.6).

/edit
The video in question is 21 minutes, as it turns out.

Izidir

Hello, Nice topic since i've got the same problem as thany.

I was using avidemux 2.5 encoding with H.264 codec compressing from 1.4 GB brut video to 200MB. It was working very well nothing to say. Then yesterday i decided to upgrade to the 2.6.4

My config for the H.264 codec was save and the 2.6 version recognize it. Start encoding and surprised, first it take longer than before even with a full CPU work (the CPU was running around 60% before and now 98%) and the video size jump from 1.4 GB to 8.7GB !!!!

For the details:
Output container .mkv
Outpur audio: copy
Output video:
x264, Video size (two pass)

Motion: Uneven Multi Hexagonal search(7)
Motion vector search range 16
Weigh prediction for B frames
Partition only 4x4, 4x8, 8x4 P frames NOT active

Frame encoding:
CABAC
Maximum consecutive B frame 16
B frame bias 0
B frame decision optimal
B frame as reference stricly hierarchical pyramid

I frame gop size 24 to 240
I frame threshold 40

That for the codec details.
The video is 1.48 GB and 00:42:16 and Standard raw DVD for the rest

AQUAR

It works out at a video bit rate of about 1400 kb/s and that isn't an issue for this codec.

I did a 250 MB, 2 pass, video size, test run on a 21 minute clip and it encoded just fine.
Using:
MKv muxer
H.264 with default settings
Audio set to copy

Time to encode the 2 passes was a few minutes.
Stream size 244 MiB 

This is with 2.6.4 (r8840) 64 bit.

So, which version of 2.6.4 is being used with this issue?


Izidir

2.6.4 r8696 32bits for me.

I took the 32bits version cause it was say to be less buggy than the 64bits version

I will give a try with your version see what happened

Izidir

I tried the 2.6.4 r8846 64bits and it works well, seems the problem came from the 32bits version.

thany

I used the 32-bits version, because that's the version for which a proper installer can easily be found...
I think it was Aquar who previously pointed me to nightlies of the x64 version, but I'd rather only use those for testing. A proper installer is not among the nightlies, afaik.

Another problem is, I've got another box running XP where I do some nightly encodes, which cannot run 64-bits (being XP and all). So going for the x64 version is only half a solution for me ;)

thany

Okay, so I thought I'd try the latest nightly (r8871, 32-bits). Still happening. Different file even.

Another thing to note: when I aborted the encode process, I got a "file is too short" message. Not sure what that's about. After that I got a generic "encode failed" kind of message. Both those messages are unneccesary when clicking the abort button.

thany

Tried the x64 version of r8871 as well. Same problem.

Input is (yet another) 630MB MP4 around 20 minutes in length, 720p resolution. Output the same settings as mentioned earlier, and the resulting file becomes about 6.3GB in size. 10 times larger in this case :o

AQUAR

Interesting result when using "2 pass - video size" encoding.
Just did a AVC to XVID recode with (32 bit r8877) and the video size was half that specified.
I normally increase the file size by 50% to allow for the "inferior" compression of XVID over AVC.
Will fiddle a bit more and see what happens.

One for the developer?.

mean

I could not reproduce on a small sample
If you have a small sample to shows the problem please share it

AQUAR

I was afraid you were going to ask that (never uploaded to a file sharing site before).

The video is AVC in AVI and I cannot cut edit it in avidemux to create a native sample.

I did remux it into MKV, then recoded that to XVID in AVI, and this size issue crops up.
Can cut edit a sample from the remuxed version and try to upload it somewhere.

Currently recoding this with "2 pass - video bit rate" encoding, to see if the file size changes.
I did retry "2 pass -video size" encoding with a different value, and the end result was a file of identical size.
I'll recode the original avi and see if this issue is still present.