Avidemux > Experimental 2.6, very experimental
Have problem with CLI and Scripts on Windows build 2.6 versions
SeventyPlus:
My working environment is Windows XP SP3.
I use avidemux_cli + JS scripts in a Visual Basic GUI project to join multiple .MOD MPEG2 files into a single MPEG2 Program Stream output file (the input files are capture files from a Panasonic SDR-S150 video camera and are plain SD format MPEG-PS, frame size 704x576, aspect-ratio 4:3, with display size 540x576 in Sequence Display Extension header, 25 fps, GOP length 12, 3 P-frames per GOP).
In my project, the join is "raw": Avidemux_cli + JS scripts do basically "copy" (load and appends), no cutting or trimming of input segments is involved at this stage.
Because I have a problem with stable Avidemux v2.5.6 (produces output with the 2 missing B-frames at the end of each segment (*); this happens with both Avidemux GUI manually joins and with Avidemux_cli + script automated joins), I gave the Avidemux Experimental 2.6 builds a try.
The good news is: the 3 experimental V2.6 versions I tried (Grunster builds r7959, r7989, r7990) entirely solve my '2 missing B-frames' problem.
With the Avidemux GUI of these versions, I produce complete and clean joined output when I manually load+append and copy to PS-MPEG output.
The bad news is: with none of the 3 tested experimental V2.6 versions I tried, I was capable to make my avidemux_cli + scripts work (not even the most simple test script, based on a 'template' saved as a project with a avidemux V2.6 GUI version).
This is what happens:
(1) Javascripts fail with a message "Avidemux is not defined" (example) :
--- Code: ---run-->1
[Script] SpiderMonkey INFO - Compiling "C:/My Programs and Doc/MyMpegJoiner/TEMPLATES/TestScript_BetaVersion.js"...
[Script] SpiderMonkey INFO - Done.
[Script] SpiderMonkey INFO - Executing C:/My Programs and Doc/MyMpegJoiner/TEMPLATES/TestScript_BetaVersion.js...
[Script] SpiderMonkey ERROR - ReferenceError: Avidemux is not defined
[Script] SpiderMonkey INFO - Done
quit-->0
--- End code ---
Probably error when Spidermonkey starts reading my script that begins like this (example):
--- Code: ---//AD <- Needed to identify//
//--automatically built--
//--Project: E:\PANASONIC_CAPTURES\STEP_3_JOIN_AVIDEMUX_AVI\VARIA1\Avidemix_Join_project
var app = new Avidemux();
--- End code ---
(2) Python scripts are partially executed, but I never got an output file : neither with the '--save(fullPathNameOutputFile)' argument in the CLI command line, nor with a (example) 'adm.save("E:/PANASONIC_CAPTURES/STEP_3_JOIN_AVIDEMUX_AVI/VARIA1/OUTPUT_123.MPG")' command in the .py script file;
There is also always this error(?) message in the (very verbose) StdOu/ErrorOut (example):
--- Code: ---[switchToSegment] Switched ok to segment 0 (dontdecode=0)
[start] admPreview,starting
*********** BACKTRACE **************
PythonEngine::runScript(std::string, IScriptEngine::RunMode) <+0x6DBF> [D:\users\hv\AVIDEMUX\avidemux_2.6_r7990_win32(no_installer)\libADM_coreScriptPython.dll]
unknown function <+0x6DBF> [unknown module]
*********** BACKTRACE **************
Cleaning up
[deleteAll] [Editor] Deleting all videos
--- End code ---
This situation is rather frustrating (because I managed relatively well with scripting in the V.2.5.6 version) and I have the feeling I am doing somewhere a basic mistake.
So: if someone could point my nose in the right direction, I will be very, very grateful.
Remark: actually, all my avidemux experiments - both with stable v.2.5.6 version and experimental v.2.6 versions are done with 'no-windows-installer' win32 builds.
I have also a question about apparent difference in scripting syntax between V2.5.6 Javascript and V2.6 Python script:
(1) In V2.5.6 JavaScript (examples auto-generated scripts in the GUI) the following commands have 'frameNumbers' as parameter-values:
--- Code: ---app.addSegment(segmentIndex,beginFrameNumber,endFrameNumber)
app.markerA=beginFrameNumber
app.markerB=endFrameNumber
--- End code ---
(2) In v2.6 Python scripts (examples also auto-generated scripts in the GUI) the same commands seem to have 'beginTime' and 'endTime' as parameter-values (instead of frameNumbers):
--- Code: ---app.addSegment(segmentIndex,beginTime,endTime)
app.markerA=beginTime
app.markerB=endTime
--- End code ---
and from what I have seen in the StdOut/ErrOut when I do a 'load' or 'append' of an PS MPEG2 source file in such a Python script , the procedure followed by v2.6 avidemux to find the beginTime and EndTime seems not so simple (looking for PTS and DTS at the begin end end of the file, doing extrapolations and adjustments).
My question is:
(a) Do Python scripts in V2.6 accept 'addSegment' , 'markerA' and 'markerB' commands with frameNumber parameter-values (instead if 'time' values) ?
(b) I yes, is the syntax different or is there an 'option' parameter to make the choice ?
(c) If no, is there a simple application command (something like maybe 'amd.video.duration') to find the length (in time) of an MPEG2 Program stream source file?
(d) What is the time unit and exact syntax of those 'timeBegin' and 'timeEnd' parameter-values in V2.6 Pyton scripts.
I saw some remarkable 'endTime' values in auto-generated v2.6 Python scripts; example :
--- Code: ---
--- End code ---
adm.clearSegments()
adm.addSegment(0,0,55680000)
adm.addSegment(1,0,18942222)
adm.addSegment(2,0,10080000)
adm.markerA=0
adm.markerB=84702222
[/code]
where '18942222' of segment #1 source is a rather unexpected value for a source file with a total of 466 frames at 25 fps = 18.640000 sec (or maybe this type of camera captures in variable frame-rate, and not in variable bit-rate [joke] ;)).
(*) The '2 missing B-frames in output' problem has also been mentioned in another forum (see: http://forum.doom9.org/showthread.php?p=789053 post #25)
Thank you for being so patient and read until the end of this story. I hope someone will comment.
Jan Gruuthuse:
Can't help you much on these issues: one question: you do use avidemux3_cli.exe for 2.6 trials?
mean:
If you dont do edit at all, just dont use the clearSegment/addSegment
As for saving if you do
avidemux3_cli --runpy foobar.py --save foo.mpg
with foo.mpg a very very simple path, does it work ?
SeventyPlus:
--- Quote from: Jan Gruuthuse on May 31, 2012, 06:59:48 AM ---Can't help you much on these issues: one question: you do use avidemux3_cli.exe for 2.6 trials?
--- End quote ---
The V2.6 Windows win32 builds from grunster I tested (r7959, r7989, r7990) all contain an executable with name = 'avidemux_cli.exe'. But what is in a name ?
I also downloaded 'nightly' win32 builds r7989-win32 and r7989-dev-win32 from www.avidemux.org/nightly but those packages contains no '_cli' executable at all (not an avidemux_cli.exe, not an avidemux2_cli.exe, not an 'avidemux3_cli.exe).
(btw: what is the difference between the 'rxxxx-win32' and the 'rxxxx-dev-win32' packaging ?)
So, where should I look to find an v2.6 'avidemux3_cli.exe' executable (with matching libraries) ?
mean:
Same thing, it's just that on windows it's called avidemux_cli, on linux avidemux3_cli
Navigation
[0] Message Index
[#] Next page
Go to full version