Author Topic: Avidemux always crashing when storing job/save project as, with PCM audio  (Read 24228 times)

cesm1980

  • Newbie
  • *
  • Posts: 5
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 ?
« Last Edit: January 01, 2012, 09:59:21 AM by cesm1980 »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: Avidemux always crashing when storing job with PCM audio
« Reply #1 on: January 01, 2012, 08:29:04 AM »
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

cesm1980

  • Newbie
  • *
  • Posts: 5
Re: Avidemux always crashing when storing job with PCM audio
« Reply #2 on: January 01, 2012, 09:58:55 AM »
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.

Agent_007

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3163
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

  • Hero Member
  • *****
  • Posts: 6060
is this the message in the info screen?
Quote
Crash

Segfault
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

adm=Avidemux()
#** Video **
# 01 videos source
adm.loadVideo("/media/datas/avidemuxTest/mean/subtitle/timelapsefotografie640x360.mp4")
#01 segments
adm.clearSegments()
adm.addSegment(0,0,208291000)
adm.markerA=0
adm.markerB=208291000

#** Postproc **
adm.setPostProc(0,0,0)

#** Video Codec conf **
adm.videoCodec("Copy")

#** Filters **

#** Audio **
adm.audioReset()
adm.audioCodec("PCM",128)

#** Muxer **
adm.setContainer("AVI","odmlType=1")

#End of script
« Last Edit: January 01, 2012, 05:48:24 PM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
tested with 2.6 r7722
« Reply #5 on: January 01, 2012, 12:29:08 PM »
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
« Last Edit: January 01, 2012, 05:48:47 PM by Jan Gruuthuse »

cesm1980

  • Newbie
  • *
  • Posts: 5
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
app.clearSegments();
app.addSegment(0,0,28656);
app.markerA=0;
app.markerB=28655;
app.rebuildIndex();

//** Postproc **
app.video.setPostProc(3,3,0);

app.video.fps1000 = 25000;

//** Filters **

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

//** Audio **
app.audio.reset();

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.reset();
app.audio.codec("Aften",128,8,"80 00 00 00 00 00 00 00 ");
app.audio.normalizeMode=0;
app.audio.normalizeValue=0;
app.audio.delay=0;
app.audio.mixer="NONE";
app.setContainer("AVI");
setSuccess(app.save("c:/sdfsd.asd"));
//app.Exit();

//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 **
app.audio.reset();
app.audio.codec("PCM",128,0,"");
app.audio.normalizeMode=0;
app.audio.normalizeValue=0;
app.audio.delay=0;
app.audio.mixer="NONE";
app.setContainer("AVI");
setSuccess(app.save("c:/test.avi"));
//app.Exit();

//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

  • Hero Member
  • *****
  • Posts: 6060
2.5.6 main menu:
File
 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

« Last Edit: January 01, 2012, 05:19:02 PM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
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\
    \avidemux\

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

cesm1980

  • Newbie
  • *
  • Posts: 5
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)

Goodbye...

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

  • Hero Member
  • *****
  • Posts: 6060
Re: Avidemux always crashing when storing job/save project as, with PCM audio
« Reply #10 on: January 01, 2012, 06:24:08 PM »
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.

jsbid

  • Newbie
  • *
  • Posts: 1
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_assert(currentEncoder<ListOfAudioEncoder.size());
      ADM_audioEncoder *encoder= ListOfAudioEncoder[currentEncoder];
+*bitrate = 128;
+if( encoder->getBitrate )
      *bitrate=encoder->getBitrate();
+*extraDataSize = 0;
      if(encoder->getConfigurationData)
         return encoder->getConfigurationData(extraDataSize,extradata);
      else return 1;
@@ -378,6 +381,7 @@
     }
      ADM_assert(currentEncoder<ListOfAudioEncoder.size());
      ADM_audioEncoder *encoder= ListOfAudioEncoder[currentEncoder];
+if( encoder->setBitrate )
      encoder->setBitrate(bitrate);
      if(encoder->setConfigurationData)
         return encoder->setConfigurationData(extraDataSize,extradata);