Re: Automatic Media Conversion (Ipod / Iphone)
Posted: December 18th, 2008, 4:48 am
my mistake, in the for, you need to quote "%dirname%"
Code: Select all
set name=%3
set name=%name:"=%
set dirname=%1
set dirname=%dirname:"=%
for /R "%dirname%" %%f in (*.avi) do ffmpeg.exe -y -i "%%f" -f mp4 -vcodec libx264 -level 30 -s 480x272 -r 30000/1001 -b 768k -bt 768k -bufsize 2000k -maxrate 768k -g 250 -coder 0 -acodec libfaac -ac 2 -ab 128k "%dirname%\%name%.mp4"
for /R "%dirname%" %%f in (*.mkv) do ffmpeg.exe -y -i "%%f" -f mp4 -vcodec libx264 -level 30 -s 480x272 -r 30000/1001 -b 768k -bt 768k -bufsize 2000k -maxrate 768k -g 250 -coder 0 -acodec libfaac -ac 2 -ab 128k "%dirname%\%name%.mp4"
for /R "%dirname%" %%f in (*.wmv) do ffmpeg.exe -y -i "%%f" -f mp4 -vcodec libx264 -level 30 -s 480x272 -r 30000/1001 -b 768k -bt 768k -bufsize 2000k -maxrate 768k -g 250 -coder 0 -acodec libfaac -ac 2 -ab 128k "%dirname%\%name%.mp4"
I've never done that. what's the command? justRXP wrote: Awesome script! Thanks for this. Any chance of getting something similar to join *.ts files?
just by chance, I downloaded a multi-part ts last night, so this is what you need to join them -RXP wrote: Awesome script! Thanks for this. Any chance of getting something similar to join *.ts files?
Code: Select all
set name=%3
set name=%name:"=%
set dirname=%1
set dirname=%dirname:"=%
copy /B "%dirname%\*.ts" "%dirname%\temp.newts" && del /q "%dirname%\*.ts" && rename "%dirname%\temp.newts" "%name%.ts"
I would think sticking this on the end of the "for" lines would workjl0810 wrote: This is a highly useful thread
One quick comment/request - any way to add a simple command to delete the original file once ipod conversion is complete via ffmpeg?
Thanks in advance!
Code: Select all
&& del %%f
easier to create the mp4 in that directory. just replace the %dirname% at the end of the ffmpeg line with your directory. will even speed up the process if it's on another hard drivejl0810 wrote: Thanks - think thats going to work. Testing now but FFMPEG take a while on my pentitum 4. This may be slightly off topic but if I wanted to then move the converted mp4 file say to a dedicated directory ("C:\ConvertedVids"), is that easy as well?
Awesome! Thank you so much. I tried the script last night and it works, but only one problem - it joined every single ts file in my download directory into one big file lol. Anyway to only get it to process the file that's been downloaded?doubledrat wrote:just by chance, I downloaded a multi-part ts last night, so this is what you need to join them -RXP wrote: Awesome script! Thanks for this. Any chance of getting something similar to join *.ts files?
this should join the files into a new one. delete the old ones and rename the new one. (the && means only do the next command if the previous one succeeded)Code: Select all
set name=%3 set name=%name:"=% set dirname=%1 set dirname=%dirname:"=% copy /B "%dirname%\*.ts" "%dirname%\temp.newts" && del /q "%dirname%\*.ts" && rename "%dirname%\temp.newts" "%name%.ts"
I imagine there are other progs out there to do this, but this is how i'd do it using built-in commands.
you'll need to get sabnzbd to create a new directory for every item it downloads, otherwise there's no real way of knowing what files relate to the download! It's easy to do...
Awesome! Thank you so much. I tried the script last night and it works, but only one problem - it joined every single ts file in my download directory into one big file lol. Anyway to only get it to process the file that's been downloaded?