You are not logged in.
Pages: 1
Well it seems google has let me down again, so i'll ask here.
I'm using a script that converts all flash(flv) videos into mp3 audio. My only problem is that there doesn't seem to be anyway to automatically select no when asked to overwrite a file. there is an -y option that automatically overwrites everything, but not the opposite.
Offline
.....I'm using a script....
Which script?
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
FFmpeg can handle conversions directly. I'm not sure about batch conversions though
ffmpeg -i INPUT.flv -vn -acodec copy OUTPUT.m4aRauchen verboten
Offline
@inxsible, I just made a little two liner.
youtube-dl -w -l --batch-file=/home/kolby/.youtube2music/youbatch
for f in *.flv; do ffmpeg -i /home/kolby/.youtube2music/"$f" -acodec libmp3lame -ab 128k /home/kolby/Music/"${f%.flv}.mp3"; done @SS4 Well the script is making it do a batch conversion, I just need it to never overwrite anything.
Edit: i also you a nice keybinding that goes something like this
xsel --clipboard >> /home/kolby/.youtube2music/youbatch && echo >> ~/.youtube2music/youbatch this lets my echo a copied link into my batch file. I know the blank echo looks odd, but for whatever reason, xsel doesn't do a newline which seems to be fixed by echo.
Last edited by kolbycrouch (2011-01-26 18:16:49)
Offline
You can try
echo "n" | <some command to ask you y/n>Offline
You can try
echo "n" | <some command to ask you y/n>
Ahh that does the trick, I'm not very used to using pipes, maybe its because sed is so disgusting in its input that its turned me off ![]()
Offline
Ummm, I don't know what does sed have to do with pipes, but yes, sed's expressions can be pretty ... ugly.
Do you know what will happen if you select 'no'? Maybe you would like the script to create a new file named 'somefile.mp3.1' if 'somefile.mp3' already exists?
Edit: youtube-dl; has 'autonumber' option that may come in handy.
Edit2: Or it may be not needed at all as youtube-dl's '-l' option pretty much assures the filename will be unique.
Last edited by karol (2011-01-26 20:13:40)
Offline
Hi,
from ffmpeg documentation:
‘-y (global)’
Overwrite output files without asking.
‘-n (global)’
Do not overwrite output files but exit if file exists.
( source: http://ffmpeg.org/ffmpeg.html )
What you want is the second option.
Offline
Pages: 1