Last active
May 15, 2019 08:37
-
-
Save tothi/5dcfc2b7c4a3b927cbd9673ee266fc0f to your computer and use it in GitHub Desktop.
fix ip camera stream timestamp recorded with ffmpeg segment option
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
#!/bin/bash | |
IFS=$'\n' ; for s in `ls stream_*.asf | head -n -1` ; do | |
ffmpeg -i ${s} -y -c:v copy -an -bsf:v h264_mp4toannexb ${s%.asf}.h264 | |
ffmpeg -r 25 -y -i ${s%.asf}.h264 -c copy ${s%.asf}.mp4 && touch -r ${s} ${s%.asf}.mp4 && rm ${s%.asf}.h264 $s | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment