Skip to content

Instantly share code, notes, and snippets.

@rewida17
Last active December 15, 2017 21:52
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 rewida17/c7e207fa1b8b65884d30a0831e388e96 to your computer and use it in GitHub Desktop.
Save rewida17/c7e207fa1b8b65884d30a0831e388e96 to your computer and use it in GitHub Desktop.
Skrypt naprawiający pliki ogg nie posiadające znacznika EOF / Simple bash script to fix ogg files w/o EOF stamp
#!/bin/bash
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <rewida17@gmail.com> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Dawid Pośpiech
# ----------------------------------------------------------------------------
GetTime=$(ffprobe -sexagesimal -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$1")
echo -e "\\nPobieram prawidłowy czas nagrania \\nNagranie trwa \\nFORTMAT CZASU:\\n[HH]:[MM]:[SS]:[MSS]\\n$GetTime"
echo "Rozpoczynam korygować czas nagrania"
ffmpeg -loglevel fatal -threads 0 -i "$1" -acodec copy -t "$GetTime" /tmp/"fix_""$1"
#After some more research I suggest don`t use too much echo`s because its break repair
#So if You want previous version you can see in revison history :)
#Tested Works :)
#Created repo for this stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment