Skip to content

Instantly share code, notes, and snippets.

@mhl
Created December 11, 2009 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhl/254394 to your computer and use it in GitHub Desktop.
Save mhl/254394 to your computer and use it in GitHub Desktop.
Fix Ogg Vorbis files with vcut
#!/bin/sh
# If you have a lot of Ogg Vorbis files with lengths that are wildly
# wrong or have incomplete data at the start, you may be able to fix
# them with this script. I invoked this for a whole directory of
# files with:
# find . -iname '*.ogg' -print0 | xargs -0 -n 1 fix-ogg-length.sh
set -e
echo Fixing "$1"
t=`mktemp`
vcut "$1" /dev/null "$t" 1 && mv "$t" "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment