Avidemux always crashing when storing job/save project as, with PCM audio

Started by cesm1980, January 01, 2012, 07:35:29 AM

Previous topic - Next topic


It's strange that in the newest builds this doesn't get fixed ever, do the coders know this problem or it's something it's that difficult to solve ?

Meanwhile the only temporary solution i have found is to first store the jobs in another audio codec format and then manually editing in notepad to place PCM instead of the other audio codec, and now the job is run and encodes the file without problems with audio in PCM mode, but this isn't pratical for obvious reasons, are they aware of this problem ?

Jan Gruuthuse

The developers rely on feedback and Bug reporting. If the developers can't reproduce what you are doing, it is like looking for a needle in a haystack. The more detailed your feedback the more likely the developers have a look at it. If the time is there and it is possible that problem maybe solved. My greatest respect for the developers doing this project on their own time.

Upload sample file(s), saved job, changed job, explain steps taken settings, used version, what OS, version, 32- or 64-bit, any specifics on your particular system, ...
Please read this: Avidemux DokuWiki: Reporting bugs <- click


Yes but this is so easy to reproduce, maybe it's not necessary all those details because this happens with EVERY job i try to do, try like this :

- prepare any job and make sure that you're able to store it without problems on the job list with your prefered encoding settings
- after you test it and it's stored in the job list without crash, just try creating the job again or a new job with the same settings, except that this time ONLY changing the audio to PCM, try to store that job now and that's all it takes to make the crash, all just because the audio codec chosen was PCM.

There is another way of triggering this problem :

- this problem also happens if you try to "Save project as..." with the audio codec in PCM even without trying to store it as a job, it seems it's the same bug.

Everytime i tried this, the job file isn't even completly written, it stops at the audio encoder section, clearly the routine to write the job file isn't prepared for the PCM audio option BUT if i save the same job using any other audio codec and manually change the job file in notepad to PCM the job is run without problems when running jobs.

Also as i said above trying to save a project with PCM audio gives the exact same problem, i forgot to mention this in the original post.

Before asking me to give more details (which might not be necessary) can you or anyone try this to see if the same thing happens to any of you? If it doesn't, only then i will give more details according to the link you indicated, because i am assuming this happens to everyone and not just me because i have seen other complaints about this on google.

Oh by the way, if i try to render the file directly without storing in a job or saving in project it DOES get encoded without problems, this problem seems to happen only when avidemux is writing job or project files with PCM chosen, but it has no problems encoding the video with pcm as output.


Did you test with AVIdemux 2.6 nightly builds? Because PCM doens't crash in there when saving.
I am away between 15th of May - 15th of June. (yes, I am playing D3)

Jan Gruuthuse

is this the message in the info screen?

at line 0, file ??ADM_backTrack
solved in avidemux 2.6.0 r7723
and would the job.py be something like this?
Quote#PY  <- Needed to identify#
#--automatically built--
#--Project: /home/jan/Videos/pcmtest.py

#** Video **
# 01 videos source
#01 segments

#** Postproc **

#** Video Codec conf **

#** Filters **

#** Audio **

#** Muxer **

#End of script

Jan Gruuthuse

January 01, 2012, 12:29:08 PM #5 Last Edit: January 01, 2012, 05:48:47 PM by Jan Gruuthuse
Seems to be reproducible.
Quote[videoEncoder6_GetConfiguration]  No configuration data for this encoder
  [saveAsPyScript]  Audio source 0

*********** BACKTRACK **************
/usr/lib/libADM_core6.so(ADM_backTrack+0x5c) [0x7f947fca02fc]:0:<ADM_backTrack>:-2
/lib/x86_64-linux-gnu/libc.so.6(+0x36420) [0x7f947ba34420]:1:<>:-2
*********** BACKTRACK **************
load video file, change audio to PCM save: works. File: tinyPy Project: Save as pyProject.
Load the save pyProject: File: tinyPy Project: Run pyProject
with the resulting above crash .
solved in avidemux 2.6.0 r7723


Jeez i just tried the new builds, but it's a bit confusing to me, it's the first time i use it and i can't even find the part to add/run jobs, for now i can't use the current stable version (2.5.6) since i do lots of encoding and i really need a stable version.

But wait, did someone tested on the current stable 2.5.6 version ? The last replys i see here about the error seems to talk only about the new version. Here's what i get in 2.5.6. version and below :

The script i get (incomplete) after trying to store a job is : (that's not the usual video codec i use, i just tried a quick job)

Quote//AD  <- Needed to identify//
//--automatically built--
//--Project: C:\Users\Administrador\AppData\Roaming\avidemux\jobs\/sdfsdfsd.js

var app = new Avidemux();

//** Video **
// 01 videos source
app.load("F:/Videos capturados por encodar/verificados/dexter29-12-2011 em 31-12-2011 das 15.22.06 ÃÆ'Ã,¡s 15.41.13 (AsusT1).mpg.idx");
//01 segments

//** Postproc **

app.video.fps1000 = 25000;

//** Filters **

//** Video Codec conf **
app.video.codec("YV12", "CQ=1000", "0 ");

//** Audio **

Note that part at the end, jobs or projects saved with PCM always stops at app.audio.reset, because after storing jobs using other audio codecs, the next line should be "app.audio.codec(" for example here's how it saves with ac3 aften :

Quote//** Audio **
app.audio.codec("Aften",128,8,"80 00 00 00 00 00 00 00 ");

//End of script

So i have to manually change in notepad the js files a single line, the app.audio.codec line to : app.audio.codec("PCM",128,0,"") and keep the rest of the lines, and i save it like this at the end :

Quote//** Audio **

//End of script
And like this it WORKS, but it's tedious having to always replace that single line in any job or project i save... (even tough i managed to get macros for this so i can wait)

By the way when i say avidemux crashes, it doesn't even say any error at all, it just closes it self, and next time i run it, it prompts to run the last crash file and thats all. (which also ends at "app.audio.reset();")

Jan Gruuthuse

2.5.6 main menu:
Load/Run Project...
Save Project
Save Project as

Can't help you any further with this, 2.5.6 does not work with my H.264 content

Jan Gruuthuse

Quote from: cesm1980 on January 01, 2012, 04:14:34 PM
By the way when i say avidemux crashes, it doesn't even say any error at all, it just closes it self, and next time i run it, it prompts to run the last crash file and thats all. (which also ends at "app.audio.reset();")

When crash occurs there should be a file: admlog.txt. This would be located in in this folder:

C:\Documents and Settings\
  \Jan\       <- replace this by your username
   \Application Data\

If using a localized version of Windows the folder(s) name(s) could be translated in local language.
you need to enable showing hiding files and folders found under Extra in window menu


Yes i am aware of that, i already seen the file but there's no clue in there about this, here's the end of the log, shortly before i select the PCM mode and then try to save the project :

Quote********** Automation ended***********
[AudioEncoder] Selected PCM for index 6, tag 0x1

**Saving script project **
Conf size: 0
Saving crash file to C:\Users\Administrador\AppData\Roaming\avidemux/crash.js

**Saving script project **
Conf size: 0
Cleaning up
[lavc] Killing decoding threads
[lavc] Destroyed
Deleting post proc
Waiting for Spidermonkey to finish...
Cleaning up Spidermonkey.
End of cleanup

Images stat:
Max memory consumed (MB)     : 7897
Current memory consumed (MB) : 1215
Max image used               : 13
Cur image used               : 2
Global mem stat
   Memory consumed: 6 (MB)


No need to copy and past the crash.js file, it's the same as always, it ends always at app.audio.reset();

Now, for the avidemux coders take a lot at this, is this post is enought (probably they check these foruns) or is there a more direct way to send them a bug report ? Of course, in such case i would be more specific, but i need to know first since on the link you posted above it only mentions these foruns.

Jan Gruuthuse

Think part containing the needed information is between the two:  *********** BACKTRACK **************
like this:
Quote*********** BACKTRACK **************
/usr/lib/libADM_core6.so(ADM_backTrack+0x5c) [0x7f947fca02fc]:0:<ADM_backTrack>:-2
/lib/x86_64-linux-gnu/libc.so.6(+0x36420) [0x7f947ba34420]:1:<>:-2
*********** BACKTRACK **************
If there and no privacy information is in it post here, if no backtrack let know here.


This fixed it here on FreeBSD for avidemux_2.5.6 (warning: copy'n paste patch):

--- avidemux/ADM_audiofilter/audio_encoderPlugin.cpp.orig       2009-11-07 09:43:04.000000000 +0100
+++ avidemux/ADM_audiofilter/audio_encoderPlugin.cpp    2013-03-10 13:30:27.000000000 +0100
@@ -361,7 +361,10 @@
      ADM_audioEncoder *encoder= ListOfAudioEncoder[currentEncoder];
+*bitrate = 128;
+if( encoder->getBitrate )
+*extraDataSize = 0;
         return encoder->getConfigurationData(extraDataSize,extradata);
      else return 1;
@@ -378,6 +381,7 @@
      ADM_audioEncoder *encoder= ListOfAudioEncoder[currentEncoder];
+if( encoder->setBitrate )
         return encoder->setConfigurationData(extraDataSize,extradata);