LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Batch script for Mencoder??? (https://www.linuxquestions.org/questions/linux-software-2/batch-script-for-mencoder-391865/)

JungMin 12-12-2005 06:45 AM

Batch script for Mencoder???
 
Been looking around to see if there is a small script available to batch transcode files using mencoder???

I know that there are GUI´s that can do this....but not interested in the GUI, just want to run mencoder in the shell and use a batch process to transcode a whole directory of video files.

Any ideas???
thanks,
jungmin

acid_kewpie 12-12-2005 06:58 AM

well writing your own script isn't rocket surgery, what is this script supposed to do for you other than a simple loop for a command line that you preumsably already undersatnd?

JungMin 12-12-2005 07:04 AM

I dont doubt its easy.....not sure how to do it though. What else is it supposed to do?? Nuthin....just loop until all mencoder has finished with all the files in the directory.

acid_kewpie 12-12-2005 07:58 AM

well there will not be a script to do that as it's a one line bach command...

for i in /var/media/*.avi; do mencoder -ovc blah blah blah $i -o $i.output; done

for example.

JungMin 12-12-2005 08:20 AM

Thanks Chris....

JungMin 12-12-2005 05:23 PM

It looks like that loop command will name the output files 1.avi, 2.avi, 3.avi, 4....Is this the case???? Is there any option to put in that command to retain their original file names with an extra character added to the end?? Like homevideo.avi and homevideo1.avi???

acid_kewpie 12-13-2005 02:06 AM

my version will put .output on the end of the same input file name. you need to learn a bit of bash scripting yourself to do it how you want to do it, that example is so so trivial it's unreal...

JungMin 12-13-2005 11:43 PM

Yeah, thanks again!!!!!

maja_ldm 11-20-2011 06:13 PM

I understand even less than JungMin but I'd want to have a batch command encode multiple xvid's with 2pass (which as far as I know require 2 different commands).

how should I do it?

TB0ne 11-20-2011 07:03 PM

Quote:

Originally Posted by maja_ldm (Post 4529262)
I understand even less than JungMin but I'd want to have a batch command encode multiple xvid's with 2pass (which as far as I know require 2 different commands).

how should I do it?

The first good step would be to not reopen a SIX YEAR OLD thread, and hijack it with your own question, but rather to open your own thread. The second good step would be to identify the commands that you need to run. If you know those commands, then you can easily reference one of the THOUSANDS of bash scripting tutorials, to grab a list of files, and run the command(s) you want on each file, looping through until you're done.

Scripting tutorial is here:
http://tldp.org/LDP/abs/html/

maja_ldm 11-21-2011 03:32 AM

dear TBOne,

this post is the first result given by google for the search 'mencoder batch linux' and I think my doubt is consistent with the post argument.

anyways I'm looking into your link.
I'm sorry to disturb you but I'm from a different forum where people are helpful.

bye

acid_kewpie 11-21-2011 03:34 AM

more than likely now, someone WILL reply to this thread trying to help the OP wasting their time, as they would expect any thread they see to be less that ancient. There is no need to be so negative about it, especially as you WERE given help and advice. In order to reply you will have be presented with a screen advising you that the thread is old and you should start your own thread, but you chose to ignore that request.


All times are GMT -5. The time now is 06:34 AM.