News:

--

Main Menu

[2.6.4] Convert a whole folder

Started by mean, May 10, 2013, 06:16:10 AM

Previous topic - Next topic

mean

The attached tinypy script does the following :

* Take all the files in inputFolder ending with ext. The default paramaters are : take all files in "/capture/links" ending by "mpg"
* Only take the one beginning by 'B'
* Output file ="outputfolder"+name+".mkv", for example /capture/links/foo.mpg will become /capture/manage2/foo.mpg.mkv
* If the output file already exists skip
* Let all the audio tracks as they are and re-encode video to 1024*576 x264 AQ=20 (PAL 16:9)
* Save as mkv

For windows, you might have to change the "/" to "\", not sure

Jan Gruuthuse

#1
Nice one. Just learned yesterday, if you want to use sub folders one level down in that folder you can do so with
for i in /capture/links/*.ts /capture/links/**/*.ts; do ....; done
Not clear how to incorporate this in your script.

Clarification:
/capture/links/*.ts in links itself
/capture/links/**/*.ts all sub folders one level below
/capture/links/**/**/*.ts all sub folders two levels below and so on /**/**/**/*, ...

mean

Update the script, a badly placed comment was making it abort