Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# yt-to-ogg.py
# use ffmpeg to convert mp4 videos to ogv
import os
localFiles = os.listdir('./')
for file in localFiles:
if (file.find('.mp4') == len(file) - 4):
# is an mp4 and not mp4.part file
ogvName = file.replace(".mp4", ".ogv")
if (ogvName not in localFiles):
# hasn't yet been converted
os.system("ffmpeg -i " + file.replace(" ", "\\ ") + " -c:v libtheora -c:a libvorbis -q:v 7 -q:a 4 " + ogvName.replace(" ", "\\ "))