Newbie : How to Copy Video & Audio folder from MKV to MP4 Script

Started by jonwren, March 24, 2018, 02:09:01 PM

Previous topic - Next topic

jonwren

Hi
I hope someone can help me....
I need a script to copy a Folder of MKV Videos to MP4 Videos, with the same Video and Audio Copy, So its basically just changing all the Videos inside the folder from MKV to MP4, with unchanged Video Format and Audio Format quality.
Does anyone have a script for me to use please, or teach me how to do this?

Many Thanks

eumagga0x2a

If you are not afraid of doing own research and thinking logically filling in missing bits of the solution, http://avidemux.org/smif/index.php?topic=17187.0 could give you pretty much everything needed to find your own.

Please be aware that the parameters of the Mp4 muxer have been extended since 2.7.0 release to allow to force display aspect ratio, mp4 container is generally much more restrictive than MKV WRT codecs so that conversion may easily fail.

In any case you are much better off using the latest Avidemux nightly instead of the outdated 2.7.0 release. Alternatively, use just ffmpeg directly (Avidemux adds no benefits in your use case).


jonwren

Quote from: eumagga0x2a on March 24, 2018, 05:06:32 PM
If you are not afraid of doing own research and thinking logically filling in missing bits of the solution, http://avidemux.org/smif/index.php?topic=17187.0 could give you pretty much everything needed to find your own.

Please be aware that the parameters of the Mp4 muxer have been extended since 2.7.0 release to allow to force display aspect ratio, mp4 container is generally much more restrictive than MKV WRT codecs so that conversion may easily fail.

In any case you are much better off using the latest Avidemux nightly instead of the outdated 2.7.0 release. Alternatively, use just ffmpeg directly (Avidemux adds no benefits in your use case).


Thanks got it all working BUT I get an error message, Which is below...
I have to select ok for every file loaded for it to do the conversion, The conversion works great, apart from having to select ok for every file loaded.

TinyPy: Exception
Exception : (tp_load) cant get filesize
BackTrack: File:py2bc.py,line50

Here are my Bat file Settings

set avidemux="C:\Program Files\Avidemux 2.7 - 64 bits\avidemux.exe"
for %%f in (*.mkv) do %avidemux% --load "%%f" --run pui.py --save "%%~nf.mp4" --quit

Here are my Py file Settings

adm = Avidemux()
adm.setContainer("MP4", "muxerType=0", "useAlternateMp3Tag=True", "forceAspectRatio=False", "aspectRatio=1")

Any idea what is wrong

Thanks


eumagga0x2a

Basically it means that ADM_fopen fails, I'll try to look into it later today.


jonwren

Quote from: eumagga0x2a on March 25, 2018, 11:07:44 AM
Basically it means that ADM_fopen fails, I'll try to look into it later today.

Would this be because of the current software version?

eumagga0x2a

I don't think so. Why do you use the GUI version instead of the CLI one?

(The release is really not an option because you lose the last few frames of the video if it contains B-frames)

eumagga0x2a

Could you please create a directory with just a single MKV video in it, run your batch and post admlog.txt resulting from this run if you get the same error?

jonwren

Quote from: eumagga0x2a on March 25, 2018, 12:09:09 PM
Could you please create a directory with just a single MKV video in it, run your batch and post admlog.txt resulting from this run if you get the same error?

Where do I post admlog.txt?


eumagga0x2a

If possible, compress it and attach it to your reply. If it doesn't work due to antispam measures, please send it by a personal message.

jonwren

Quote from: eumagga0x2a on March 25, 2018, 12:43:25 PM
If possible, compress it and attach it to your reply. If it doesn't work due to antispam measures, please send it by a personal message.

The script is now running since I chance to CLI, BUT now with the input video MKV file size 1.30GB, when it converts to MP4 the finished file size is 32.6KB

I don't know how or where to get the admlog.txt

Thanks for helping me

eumagga0x2a



eumagga0x2a

I'm sorry, could you please attach a ZIP compressed version? I don't have unrar on my smartphone.