Created
November 21, 2015 14:08
-
-
Save devpruthvi/740fbae2a25f4aa0d00c to your computer and use it in GitHub Desktop.
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 characters
from mutagen.mp3 import MP3 | |
import subprocess,math | |
filepath = 'H:/Music/temp/' | |
filename = 'notafraid.mp3' | |
a = MP3(filepath + filename) | |
parts = int(math.ceil(a.info.length / 60)) | |
for each in range(0,parts): | |
command = 'ffmpeg -ss {} -i {} -c copy -t {} {}{}'.format(each*60,filepath+filename,60,each,filename) | |
subprocess.call(command,shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment