Hello comunity
My Canon 50D records videos (without audio) with x264 codec and MOV container.
To edit it with VirtualDub, I have to convert the file.
Run Avidemux -> open the file -> set Video-Output to "Mpeg4 AVC (x264)" -> adjust bitrate of video -> set Ouput Format to "AVI Muxer" -> save the video as blabla.AVI
These foregoing steps work perfect, after the conversion, I am able to open it with VirtualDub.
Today, I tried to create a windows batch file to convert multiple files automatically.
set avidemux="D:\Program Files (x86)\Avidemux 2.5\avidemux.exe"
%avidemux% --force-alt-h264 --load "D:\Hund\mvi_8149.MOV" --video-codec x264 --codec-conf "x264config.json" --video-process --save "D:\Hund\mvi_8149.AVI"
pause
This script doesn't work, even with a single file. Avidemux only "renames" the file to *.Avi and that's not enough to open it with VirtualDub. Can anybody help me?
--output-format AVI (http://www.avidemux.org/admWiki/doku.php?id=using:command_line_usage)
set avidemux="D:\Program Files (x86)\Avidemux 2.5\avidemux.exe"
%avidemux% --force-alt-h264 --load "D:\Hund\mvi_8149.MOV" --video-codec x264 --codec-conf "x264config.json" --output-format AVI --video-process --save "D:\Hund\mvi_8149.AVI"
pause
or
--run myproject (http://www.avidemux.org/admWiki/doku.php?id=tutorial:batch_processing)
Make all required/needed settings in GUI.
Save as myproject. Edit myproject: remove reference to loaded video and remove maker settings
and call that project from script.
See basic usage here: 2.6 audio track switching in job.py (http://www.avidemux.org/smf/index.php?topic=10499.0)
--run myproject
set avidemux="D:\Program Files (x86)\Avidemux 2.5\avidemux.exe"
%avidemux% --force-alt-h264 --load "D:\Hund\mvi_8149.MOV" --video-codec x264 --codec-conf "x264config.json" --video-process --run myproject --save "D:\Hund\mvi_8149.AVI"
pause
I saved it as a QtScript project.
That's the "code" in the project file.
Editor.closeVideo();
Editor.openVideo("D:/Medien/Videoz/Umzuwandelnde Videos/Hund/MVI_8148.MOV");
Editor.segments.clear()
Editor.segments.add(0, 7566000, 0);
Editor.setMarkers(0, 7566000);
X264VideoEncoder.configuration.general_params = "CBR=150000";
Editor.currentVideoEncoder = X264VideoEncoder;
Editor.audioOutputs.clear();
Editor.currentMuxer = AviMuxer;
Now I have to remove the whole lin or only the path?
What do you mean with "maker settings"? Edit: Ah, you mean marker settings, ok.
Edit2: Still exactly the same issues using this:
Batch file:
set avidemux="D:\Program Files (x86)\Avidemux 2.5\avidemux.exe"
for %%f in (*.MOV) do %avidemux% --force-alt-h264 --load "%%f" --run myproject --video-codec x264 --codec-conf "x264config.json" --video-process --save "%%f.avi"
pause
File "myproject":
Editor.closeVideo();
Editor.openVideo();
Editor.segments.clear()
;
X264VideoEncoder.configuration.general_params = "CBR=150000";
Editor.currentVideoEncoder = X264VideoEncoder;
Editor.audioOutputs.clear();
Editor.currentMuxer = AviMuxer;
Batch, movie and "myproject" are in the same folder, "myproject" has no file extension.
and the 1st option?
do you see avidemux starting when the batch is called?
when setting encoder on the cli
these should be deleted from project file to:
QuoteX264VideoEncoder.configuration.general_params = "CBR=150000";
Editor.currentVideoEncoder = X264VideoEncoder;
--run myproject should best come just before --save "%%f.avi
Yes, Avidemux is starting, but it doesnt convert the file. It only saves it with .avi extension.
with 2.6 that should be:set avidemux="C:\Program Files\Avidemux 2.6\avidemux3.exe"
for %%f in (*.mov) do %avidemux% --force-alt-h264 --load "%%f" --run mov2avi.py --save "%%f.avi" --quit
mov2avi.py is attached to this posting
You can replace avidemux3.exe by avidemux_cli.exe
avidemux2.exe
QuoteYou can replace avidemux3.exe by avidemux_cli.exe
Huh? avidemux3.exe? Where should I replace it?
Anyhow, your script lets Avidemux crash.
Quote from: eightcore on October 07, 2012, 04:09:37 PM
QuoteYou can replace avidemux3.exe by avidemux_cli.exe
Huh? avidemux3.exe? Where should I replace it?
Anyhow, your script lets Avidemux crash.
After the next start, Avidemux shows following message:
QuoteI have detected a crash file. <br>Do you want to load it ?<br>(It will be deleted in all cases, you should save it if you want to keep it)
When I click "Yes", Avidemux loads the settings and when I choose "Save Video", it works perfectly.
The script crashes if run with avidemux 2.5? Script is for avidemux 2.6.
Avidemux 2.6\avidemux2.exe intended was Avidemux 2.6\avidemux3.exe
avidemux2.exe I believe to be 2.5.6 and avidemux3.exe 2.6, if same numbering is kept between Operating Systems? linux osx windows
Oh, I do use version 2.6.0. I just didn't change the directory name.
Edit: I've just installed the "installer" version of Avidemux 2.6 and the batch still results in a crash.
By the way, the directory looks like this:
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fwww.abload.de%2Fimg%2Funbenannt2kpp3.png&hash=59db478fb330ea4c95cf75ea08f71fc7307019de)
So in Windows there is no number in the file name.
Where can I get details about the crash?
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fwww.abload.de%2Fimg%2Funbenanntunqt9.png&hash=4fa090ad44fc61891be099f4f3b9f40c9bd27716)
OK no number then. there is a log @ %APPDATA%/avidemux/admlog.txt.
The nightly do have avidemux3.exe and avidemux_cli perhaps consider downloading none developer one?
32-bit: http://avidemux.org/nightly/win32/
64-bit: http://avidemux.org/nightly/win64/
guess unpack and copy into the current?
Okay, tried it with CLI version.
*** NO AUDIO ***
[renderDisplayResize] Render to 1920x1080 zoom=2
[nullRender] Starting null renderer
[renderCompleteRedrawRequest] RedrawRequest
[A_ResetMarkers] Video Total duration : 00:00:09,166 ms
[rewind] Rewinding
[switchToSegment] Trying to switch to seg 0 with startTime in reference pic= 0 m
s
[seektoTime] First frame of the new segment is a keyframe at 0ms
[DecodePictureUpToIntra] DecodeUpToInta 0 ref:0
[edCache] Flush
[switchToSegment] Switched ok to segment 0 (dontdecode=0)
[start] admPreview,starting
[updateLoaded] conf updated
run-->1
[Script] Tinypy INFO - Executing D:\Medien\Videoz\Umzuwandelnde Videos\mov2avi.p
y...
[addAudioTrack] ** Adding active track from pool **
*********** BACKTRACE **************
ADM_setCrashHook <+0x2E8> [D:\Program Files\Avidemux 2.6\libADM_core6.dll]
PoolOfAudioTracks::at(int) <+0x3B> [D:\Program Files\Avidemux 2.6\avidemux_cli.
exe]
ADM_Composer::addAudioTrack(int) <+0x3E> [D:\Program Files\Avidemux 2.6\avidemu
x_cli.exe]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
unknown function <+0x3E> [D:\Program Files\Avidemux 2.6\plugins\scriptEngines\l
ibADM_script_tinyPy.dll]
admPreview::previousKeyFrame() <+0x246> [D:\Program Files\Avidemux 2.6\avidemux
_cli.exe]
call_scriptEngine(char const*) <+0x1BB> [D:\Program Files\Avidemux 2.6\avidemux
_cli.exe]
automation() <+0x20C> [D:\Program Files\Avidemux 2.6\avidemux_cli.exe]
UI_RunApp() <+0x14> [D:\Program Files\Avidemux 2.6\avidemux_cli.exe]
startAvidemux(int, char**) <+0x65D> [D:\Program Files\Avidemux 2.6\avidemux_cli
.exe]
main <+0x6A> [D:\Program Files\Avidemux 2.6\avidemux_cli.exe]
unknown function <+0x6A> [D:\Program Files\Avidemux 2.6\avidemux_cli.exe]
BaseThreadInitThunk <+0x12> [C:\Windows\syswow64\kernel32.dll]
RtlInitializeExceptionChain <+0x63> [C:\Windows\SysWOW64\ntdll.dll]
RtlInitializeExceptionChain <+0x36> [C:\Windows\SysWOW64\ntdll.dll]
unknown function <+0x36> [D:\Program Files\Avidemux 2.6\avidemux_cli.exe]
*********** BACKTRACE **************
Cleaning up
[deleteAll] [Editor] Deleting all videos
[lavc] Destroyed
[deleteAll] [Editor] Deleting all videos
[cleanup] Deleting post proc
[deleteAll] [Editor] Deleting all videos
[Script] Tinypy INFO - Closing Python
[Script] SpiderMonkey INFO - Closing Spidermonkey
[destroy] Destroying preview
[ADM_ad_cleanup] Purging audio decoder
[ADM_vf_clearFilters] clear filters
[ADM_vf_cleanup] Destroying video filter list
[ADM_jobShutDown] Shutting down jobs database
--End of cleanup--
Images stat:
___________
Max memory consumed (MB) : 0
Current memory consumed (MB) : 0
Max image used : 0
Cur image used : 0
Global mem stat
______________
Memory consumed: 0 (MB)
Max consumed : 0 (MB)
[onexit]
Goodbye...
This is the last part.
I tried version 2.6 x86 and x64, the nightly build you told me of, x86 and x64, too.
Crashes everytime.
Just start the avidemux gui, load mov video, load the project in tinypy.
Check settings, in audio could be something missing.
Access audio not from left side menu, select in main Menu (text) Audio -> Select Track
Then save tinpy project again. open with text editor and remove the load video and set markers.
Okay, next problem:
adm.addSegment(0, 0, 9166000)
Delete the whole command -> not working
Delete the content between the brackets -> not working
Delete the content between the brackets including the brackets-> not working
Inserting 0 instead of 9166000 -> not working, of course
What do I have to insert there?
Edit: I inserted 500000000000000000000000000000, should be enough. :-)
Edit: Next problem: When I delete command in project file
"adm.loadVideo("D:/Medien/Videoz/Umzuwandelnde Videos/MVI_8164.MOV")", Avidemux only renames the file to *.avi and doesn't convert it.
What have I to write there instead of the file name?
Edit: I got it: adm.loadVideo("").
It does work now perfectly. Thanks a million for your help and effort!
nice you got everything sorted out.