News:

--

Main Menu

batch processing: append (linux / windows)

Started by Jan Gruuthuse, January 31, 2012, 01:09:30 PM

Previous topic - Next topic

Jan Gruuthuse

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

SeventyPlus

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)

Jan Gruuthuse

#!/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

SeventyPlus

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.

Jan Gruuthuse

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.