Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Jan Gruuthuse on January 31, 2012, 01:09:30 PM

Title: batch processing: append (linux / windows)
Post by: Jan Gruuthuse on January 31, 2012, 01:09:30 PM
Linux:
sometimes the dialog window pops up, asking if files needs to append. There is an --append switch forcing appending of files. Can there be a provision for a --noappend to circumvent the append detection/question: yes/now? Or --append 0 for no appending action?

#!/bin/bash
for FIL in `ls *mp4 | sort` ; do
  /usr/bin/avidemux3_qt4 --force-alt-h264 --load "$FIL" --run /home/jan/mp4TOmkv.js --save ${FIL%.*}.mkv --quit
done
Title: Re: batch processing: append
Post by: SeventyPlus on June 01, 2012, 05:56:33 AM
Quote from: Jan Gruuthuse on January 31, 2012, 01:09:30 PM
sometimes the dialog window pops up, asking if files needs to append. There is an --append switch forcing appending of files. Can there be a provision for a --noappend to circumvent the append detection/question: yes/now? Or --append 0 for no appending action?

#!/bin/bash
for FIL in `ls *mp4 | sort` ; do
  /usr/bin/avidemux3_qt4 --force-alt-h264 --load "$FIL" --run /home/jan/mp4TOmkv.js --save ${FIL%.*}.mkv --quit
done


To "automate" the response to this dialog window pop-ups, I provided in the command line a redirection of StandardIn to a file (say: No.txt). the contents of that file is one single line = "no". This helped for me (my working environment is Windows, not Unix)
Title: batch processing: append
Post by: Jan Gruuthuse on June 01, 2012, 07:59:33 AM
#!/bin/bash
for FIL in `ls *mp4 | sort` ; do
  yes n | /usr/bin/avidemux3_qt4 --force-alt-h264 --load "$FIL" --run /home/jan/mp4TOmkv.js --save ${FIL%.*}.mkv --quit
done

would reply no when input is expected.

If the question is not asked to autoload / append found video parts that look sequential, these methods would not work as there is no request for input.

More info on yes command:
man yes
Title: Re: batch processing: append
Post by: SeventyPlus on June 01, 2012, 08:21:48 AM
Quote from: Jan Gruuthuse on June 01, 2012, 07:59:33 AM
#!/bin/bash
for FIL in `ls *mp4 | sort` ; do
  yes n | /usr/bin/avidemux3_qt4 --force-alt-h264 --load "$FIL" --run /home/jan/mp4TOmkv.js --save ${FIL%.*}.mkv --quit
done

would reply no when input is expected.

If the question is not asked to autoload / append found video parts that look sequential, these methods would not work as there is no request for input.

More info on yes command:
man yes

Have not touched Unix for more than 20 years now, but I thought redirection of StandardIn would be something like this:

/usr/bin/avidemux3_qt4 --force-alt-h264 --load "$FIL" --run /home/jan/mp4TOmkv.js --save ${FIL%.*}.mkv --quit  <file_for_input_with_no_in_it

Please forgive if I am totally wrong.
Title: Re: batch processing: append
Post by: Jan Gruuthuse on June 02, 2012, 08:39:42 AM
yes n | / is not file redirection, it is command that inserts the option following yes.
I've read that sometimes redirection over StandardIn did not work, that was the reason for creation of yes command.