Author Topic: Batch Convert files?  (Read 1447 times)

Peter3

  • Newbie
  • *
  • Posts: 1
Batch Convert files?
« on: April 30, 2017, 08:22:27 PM »
Hi, recently I started using Avidemux 2.6. I use it to convert .wmv files to .avi, converted to x264 codec and works fine.
Now I tried to batch convert bunch of short .wmv files to .avi
I used this script:
Code: [Select]
set avidemux="C:\Program Files\Avidemux 2.6 - 64 bits\avidemux_cli.exe"
set videocodec=x264
set audiocodec=MP3
for %%f in (*.wmv) do %avidemux% --video-codec %videocodec% --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%f.avi" --quit

I wander how can I stop Avidemux to ask confirmation "Using H264/H265 in AVI is a bad idea, MKV is better for that."?
What to change in a script so confirmation dont show anymore?

I tried using xvid in a script but they sim worse quality, also I tried ffmpeg but that files are not readable in Virtualdub.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5986
Re: Batch Convert files?
« Reply #1 on: May 01, 2017, 07:32:40 AM »
If avidemux_cli does not asks for an input/response: nothing you can do.

If on windows this would require a redirection from a file. Like a reply: Yes or No or Enter
Code: [Select]
<yes.txthas as content: Yes

Code: [Select]
<no.txthas as content No

Code: [Select]
<return.txthas as content ascii 13 (linefeed)

btw, Why would you insist on using dated .avi container

« Last Edit: May 01, 2017, 07:47:22 AM by Jan Gruuthuse »

EEMcGee

  • Jr. Member
  • **
  • Posts: 61
Re: Batch Convert files?
« Reply #2 on: May 01, 2017, 02:47:24 PM »

EEMcGee

  • Jr. Member
  • **
  • Posts: 61
Re: Batch Convert files?
« Reply #3 on: May 01, 2017, 02:49:15 PM »
I think it is easier to do it this way with a .py file that you can modify or switch the whole .py file out for a different process.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5986
Re: Batch Convert files?
« Reply #4 on: May 02, 2017, 06:17:59 AM »
>8 >8

I wander how can I stop Avidemux to ask confirmation "Using H264/H265 in AVI is a bad idea, MKV is better for that."?
What to change in a script so confirmation dont show anymore?

>8 >8

How you can you catch this within a script?

It requires every time a user interaction when saving h264/h265 into .avi container!

aldoniel

  • Newbie
  • *
  • Posts: 2
Re: Batch Convert files?
« Reply #5 on: April 23, 2018, 12:13:40 AM »
you catch this by reading the stdout of avidemux_cli or, you invoke avidemux.exe and write a script which clicks OK on the message box.

I have done this there : http://avidemux.org/smif/index.php/topic,18312.msg83954.html#msg83954