Last active
August 29, 2015 14:14
-
-
Save kirosvi/9fbe9e3f20082ce70493 to your computer and use it in GitHub Desktop.
Revisions
-
kirosvi revised this gist
Jan 26, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ ffmpeg = "/usr/local/bin/ffmpeg" # path to ffmpeg params = "-strict experimental -acodec vorbis -aq 100" # settings of converting which in command after source file and before output file spec_sym = ")(][}{" # special symbols """ if spaces and special symbols in name, it was changed to "_" """ for file in os.listdir(sourcedir): os.rename(file, file.replace(" ", "_")) for i in range(len(file)): -
kirosvi revised this gist
Jan 26, 2015 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,10 @@ f_extnew = ".ogg" #extension of output file ffmpeg = "/usr/local/bin/ffmpeg" # path to ffmpeg params = "-strict experimental -acodec vorbis -aq 100" # settings of converting which in command after source file and before output file spec_sym = ")(][}{" # special symbols """ if spaces and special symbols in name, it was renamed """ for file in os.listdir(sourcedir): os.rename(file, file.replace(" ", "_")) for i in range(len(file)): if file[i] in spec_sym: os.rename(file, file.replace(file[i], "_")) -
kirosvi revised this gist
Jan 26, 2015 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,10 +8,12 @@ f_extnew = ".ogg" #extension of output file ffmpeg = "/usr/local/bin/ffmpeg" # path to ffmpeg params = "-strict experimental -acodec vorbis -aq 100" # settings of converting which in command after source file and before output file spec_sym = " )(][}{" # special symbols """ if spaces or special symbols in name, it was renamed """ for file in os.listdir(sourcedir): for i in range(len(file)): if file[i] in spec_sym: os.rename(file, file.replace(file[i], "_")) for file in os.listdir(sourcedir): -
kirosvi revised this gist
Jan 26, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ ffmpeg = "/usr/local/bin/ffmpeg" # path to ffmpeg params = "-strict experimental -acodec vorbis -aq 100" # settings of converting which in command after source file and before output file """ if spaces in name, file was renamed """ for file in os.listdir(sourcedir): os.rename(file, file.replace(" ", "_")) -
kirosvi revised this gist
Jan 26, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/usr/bin/python import os, subprocess os.chdir(os.getcwd()) sourcedir = "./" convert_list = [] f_ext = ".flac" #extension of source file -
kirosvi created this gist
Jan 26, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/usr/bin/python import os, subprocess sourcedir = "./" convert_list = [] f_ext = ".flac" #extension of source file f_extnew = ".ogg" #extension of output file ffmpeg = "/usr/local/bin/ffmpeg" # path to ffmpeg params = "-strict experimental -acodec vorbis -aq 100" # settings of converting which in command after source file and before output file """ if spaces in name, it was renamed """ for file in os.listdir(sourcedir): os.rename(file, file.replace(" ", "_")) for file in os.listdir(sourcedir): if f_ext in file: convert_list.append(file) for file in convert_list: child = subprocess.call(" ".join((ffmpeg, "-i", file, params, file.replace(f_ext, f_extnew))), executable='/bin/bash', shell=True)