Batch transcode problem

*nix specific usage questions
rmvb
Blank Cone
Blank Cone
Posts: 47
Joined: 19 Oct 2011 11:14
Operating System: Linux

Batch transcode problem

Postby rmvb » 05 Dec 2016 13:17

Hi guys
I'm trying to adapt the wiki tutorial here for my need (batch convert flac to ogg) but I get either white space stripped out file names ... or new line in file names where white space were in input file name.
I tried basename with -a too, and/or -z (this last removes spaces)
The goal is to get
01 - Neal And Jack And Me.ogg
instead of
01?-?Neal?And?Jack?And?Me.ogg #or
01 - Neal And Jack And Me.flac.ogg #or
01-NealAndJackAndMe.ogg

Code: Select all

#!/bin/bash vcodec="VIDEO_CODEC" #acodec="AUDIO_CODEC" acodec="vorb" bitrate="VIDEO_BITRATE" #arate="AUDIO_BITRATE" arate="320" #ext="OUTPUT_EXT" ext="ogg" #mux="MUXER" mux="ogg" vlc="/usr/bin/vlc" #fmt="INPUT_EXT" fmt="flac" for i in *$fmt; do f="`basename -s .${fmt} ${i}`" echo -e $f #$vlc -I dummy -vvv "$i" --sout "#transcode{vcodec=$vcodec,vb=$bitrate,acodec=$acodec,ab=$arate,channels=6}:standard{mux=$mux,dst=\"$f.$ext\",access=file}" vlc://quit $vlc -I dummy -vvv "$i" --sout "#transcode{vcodec=none,acodec=$acodec,ab=$arate,channels=2,samplerate=48000}:standard{mux=$mux,dst=\"$f.$ext\",access=file{no-overwrite}}" vlc://quit #$vlc -I dummy -vvv "$i" --sout "#transcode{vcodec=none,acodec=$acodec,ab=$arate,channels=2,samplerate=48000}:standard{mux=$mux,dst=\"$f.$ext\",access=file}" vlc://quit done
Many thanks for help

rmvb
Blank Cone
Blank Cone
Posts: 47
Joined: 19 Oct 2011 11:14
Operating System: Linux

Re: Batch transcode problem

Postby rmvb » 05 Dec 2016 19:14

f=${i%%.${fmt}}


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 8 guests