User Tools

Site Tools


mkv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mkv [2021-01-01 11:58:04]
mi
mkv [2024-01-27 11:07:45] (current)
mi [Extract subtitles]
Line 30: Line 30:
   mkvinfo --summary "​$f"​ | head -10 \   mkvinfo --summary "​$f"​ | head -10 \
   | perl -nle 'if ( /^Track (\d+): subtitles, codec ID: ([A-Z_]+).*extract track ID: (\d+)(?:, language: (\S+))?/ ) {   | perl -nle 'if ( /^Track (\d+): subtitles, codec ID: ([A-Z_]+).*extract track ID: (\d+)(?:, language: (\S+))?/ ) {
-      warn "​$_ ​  $1: type=$2, xtrack=$3, lang=$4\n";​ print "$2 $3 $4" }' \+      warn "​$_=$1:​ type=$2, xtrack=$3, lang=$4\n";​ print "$2 $3 $4" }' \
   | while read type t lang; do d=$(dirname "​$f"​);​ b=$(basename "​$f"​); ​   | while read type t lang; do d=$(dirname "​$f"​);​ b=$(basename "​$f"​); ​
-      echo "# mkvextract tracks \"​\$f\"​ $t:'​$d/​$t-$b-$lang.$type'";​ done+      echo "#Run this:# mkvextract tracks \"​\$f\"​ $t:'​$d/​$b-$lang-$t.$type'";​ done
  
 <​HTML><​blockquote><​pre>​ <​HTML><​blockquote><​pre>​
Line 53: Line 53:
  
   mkvpropedit $mkvfile --chapters $mkvile-chapters.txt   mkvpropedit $mkvfile --chapters $mkvile-chapters.txt
 +
 +* Create chapters file from 2 columns tab-delimited list of timecode and name :
 +<​code>​perl -ne '​BEGIN{$fps=24};​ $c=sprintf("​CHAPTER%02d",​ $n++);
 +  ($tc, $name)=split(/​\t/​);​
 +  $tc =~ s!:​(\d\d)$!sprintf("​.%03d",​$1*1000/​$fps)!e;​
 +  print "​$c=$tc\n",​
 +    "​${c}NAME=$name"'​ $My_ChaptersList_File
 +</​code>​
  
/docs/dokuwiki/data/attic/mkv.1609498684.txt.gz ยท Last modified: 2021-01-01 11:58:04 by mi