Author Topic: Avidemux 2.6.4 - H.264 encode by video size is massively broken  (Read 32305 times)

thany

  • Full Member
  • ***
  • Posts: 142
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

  • Hero Member
  • *****
  • Posts: 1077
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #1 on: August 13, 2013, 01:36:26 AM »
Well I can't resist - Add details!
Seriously - compress what and how much into 250MB using what and which settings?

thany

  • Full Member
  • ***
  • Posts: 142
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #2 on: August 13, 2013, 07:38:04 AM »
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

  • Hero Member
  • *****
  • Posts: 1077
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #3 on: August 13, 2013, 10:22:44 AM »
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

  • Full Member
  • ***
  • Posts: 142
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #4 on: August 13, 2013, 03:56:16 PM »
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.
« Last Edit: August 13, 2013, 05:45:45 PM by thany »

Izidir

  • Newbie
  • *
  • Posts: 3
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #5 on: August 13, 2013, 09:14:30 PM »
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

  • Hero Member
  • *****
  • Posts: 1077
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #6 on: August 14, 2013, 02:54:30 AM »
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

  • Newbie
  • *
  • Posts: 3
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #7 on: August 14, 2013, 09:01:22 AM »
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

  • Newbie
  • *
  • Posts: 3
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #8 on: August 14, 2013, 10:05:09 AM »
I tried the 2.6.4 r8846 64bits and it works well, seems the problem came from the 32bits version.

thany

  • Full Member
  • ***
  • Posts: 142
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #9 on: August 14, 2013, 10:11:54 AM »
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 ;)
« Last Edit: August 14, 2013, 10:15:59 AM by thany »

thany

  • Full Member
  • ***
  • Posts: 142
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #10 on: August 14, 2013, 12:53:06 PM »
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

  • Full Member
  • ***
  • Posts: 142
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #11 on: August 14, 2013, 07:37:28 PM »
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

  • Hero Member
  • *****
  • Posts: 1077
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #12 on: August 18, 2013, 08:50:17 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #13 on: August 18, 2013, 09:15:08 AM »
I could not reproduce on a small sample
If you have a small sample to shows the problem please share it

AQUAR

  • Hero Member
  • *****
  • Posts: 1077
Re: Avidemux 2.6.4 - H.264 encode by video size is massively broken
« Reply #14 on: August 18, 2013, 10:08:05 AM »
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.
« Last Edit: August 18, 2013, 10:17:44 AM by AQUAR »