X-Git-Url: http://git.pippins.net/embedvideo/.git/static/%7Bg-%3Eurl%20arg1=?a=blobdiff_plain;f=mkv_extract_chapter;h=4653278b1e1b675e5152a664e2aa268e79031114;hb=c67ee10afd440a0f4eae901512b614e7d8c7deea;hp=9f5fd81a5949d6a70a0d71e4a712095bbd6a55c2;hpb=3a3bb78c7414ec15e6b557522792069eca34530a;p=videoscripts%2F.git diff --git a/mkv_extract_chapter b/mkv_extract_chapter index 9f5fd81..4653278 100755 --- a/mkv_extract_chapter +++ b/mkv_extract_chapter @@ -3,6 +3,13 @@ # Description: Extract the given chapter(s) from an mkv file into separate video files # Requires: Newer version of ffmpeg to be installed that supports MKV chapters +# Howto compile the latest FFMPEG from src under Linux +# FFMPEG - http://ubuntuforums.org/showthread.php?t=786095 + +# Howto eliminate the non-monotonically increasing dts to muxer error +# Comment out the error message in ffmpeg src tree in libavformat/utils.c +# http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=7&t=49 + # MOV: # major_brand : qt # Video: h264 (avc1 / 0x31637661) @@ -83,8 +90,11 @@ sub detect_ext { } } + # Quicktime/MOV if($h264 && $pcm_s16le) { return "mov"; } - if($h264_high && $ac3) { return "mts"; } + # MTS + if($h264_high && $ac3) { return "mp4"; } + # 3GP/MP4 if($h264 && $aac) { return "mp4"; } return "UNKNOWN"; @@ -130,6 +140,7 @@ foreach $line (@ffmpeg_info) { print "$cmd\n"; } else { print "\n"; + print "$cmd\n"; $errno = system("$cmd"); $errno = $errno >> 8; if($errno > 0) { die "-E- ffmpeg encountered some errors with exit code $errno\n"; }