{"id":33,"date":"2009-05-13T13:07:00","date_gmt":"2009-05-13T12:07:00","guid":{"rendered":"http:\/\/www.mod16.org\/hurfdurf\/?p=33"},"modified":"2010-07-25T17:00:33","modified_gmt":"2010-07-25T16:00:33","slug":"useful-perl-scripting","status":"publish","type":"post","link":"https:\/\/mod16.org\/hurfdurf\/?p=33","title":{"rendered":"Useful Perl scripting"},"content":{"rendered":"<p>If you&#8217;re one of those people who cut your transport streams in YMC (or Avisynth in general) and want to keep the original audio, this script is for you. It will read a given Avisynth script, look for the first trim line (or the first one labeled by a configurable label), generate a list of timecodes (based on the framerate, assumed to be 30000\/1001 fps but also configurable), run mkvmerge to split a given file (usually the .aac given to you by DGindex; the &#8220;DELAY Xms&#8221; syntax is supported) at the given timecodes and finally (if so desired) attempt to merge the parts you wanted back together.<\/p>\n<p>If you&#8217;re not me you probably got fed up with doing this manually months ago and wrote your own variant, but I thought I&#8217;d share mine anyway (because I hadn&#8217;t posted anything here in like three months and it&#8217;s getting time for the quarterly contribution). <\/p>\n<p>Download: <b><a href=\"http:\/\/www.mod16.org\/fansub\/split_aud_0.22.7z\">split_aud_0.22<\/a><\/b>.<\/p>\n<p>Example usage:<br \/>\n<tt>perl split_aud.pl -mr -i \"someaudio DELAY -15ms.aac\" -o test.mka trimfile.avs<\/tt><br \/>\nWhere trimfile.avs has a line somewhere that looks like<br \/>\n<tt>trim(u,v)+trim(x,y)+trim(...)<\/tt><br \/>\netc.<\/p>\n<p>Use -h to get help. Switches can be grouped (i.e. -v -r means the same thing as -vr).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re one of those people who cut your transport streams in YMC (or Avisynth in general) and want to keep the original audio, this script is for you. It will read a given Avisynth script, look for the first trim line (or the first one labeled by a configurable label), generate a list of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7,14],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-coding","category-encoding","category-fagsubbing"],"_links":{"self":[{"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":7,"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mod16.org\/hurfdurf\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}