gmencoder does not respect file size limits when encoding file
(btw why is default audio quality and algo set to min 9)
Fix: video.c:19
Original: if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(strPrincipal.chkTamanioFijo)))
Fixed: if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(strPrincipal.chkTamanioFijo)))
Fix 2: Better Formula video.c:48
Replace: TamanioCD *= (1024*8); Tiempo = DameTiempo (); if (Tiempo) { BitrateA = CalculaBitrateA (); BitrateV = (TamanioCD / Tiempo) - BitrateA;
With: Tiempo = DameTiempo (); if (Tiempo) { BitrateA = CalculaBitrateA (); float size; size = (((((BitrateA / 1024) * Tiempo) / 1.024) / 8) / 1.024); size = TamanioCD - size; BitrateV = (((size * 8.388608) / Tiempo) * 1024) - BitrateA;
Note: The bitrate doesn't support decimals so it can't set the filesize precisely on the specified filesize.
PS: it is set to 9 probaly because it's the fastest setting for audio
Log in to post a comment.
Fix:
video.c:19
Original:
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(strPrincipal.chkTamanioFijo)))
Fixed:
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(strPrincipal.chkTamanioFijo)))
Fix 2: Better Formula
video.c:48
Replace:
TamanioCD *= (1024*8);
Tiempo = DameTiempo ();
if (Tiempo)
{
BitrateA = CalculaBitrateA ();
BitrateV = (TamanioCD / Tiempo) - BitrateA;
With:
Tiempo = DameTiempo ();
if (Tiempo)
{
BitrateA = CalculaBitrateA ();
float size;
size = (((((BitrateA / 1024) * Tiempo) / 1.024) / 8) / 1.024);
size = TamanioCD - size;
BitrateV = (((size * 8.388608) / Tiempo) * 1024) - BitrateA;
Note:
The bitrate doesn't support decimals so it can't set the filesize precisely on the specified filesize.
PS: it is set to 9 probaly because it's the fastest setting for audio