Skip to content

Instantly share code, notes, and snippets.

@yono
Created December 19, 2010 14:21
Show Gist options
  • Save yono/747359 to your computer and use it in GitHub Desktop.
Save yono/747359 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import commands
files = commands.getoutput('ls -1 *.mp4').splitlines()
for afile in files:
print afile
chapter = afile.replace('.mp4','') + '_chapters.xml'
print chapter
commands.getoutput('MP4Box afile %s -chap %s' % (afile, chapter))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment