{"id":418,"date":"2021-02-23T03:10:35","date_gmt":"2021-02-23T00:10:35","guid":{"rendered":"http:\/\/tsoukias.eu\/wordpress\/?p=418"},"modified":"2021-02-25T01:27:49","modified_gmt":"2021-02-24T22:27:49","slug":"converting-minidv-addendum","status":"publish","type":"post","link":"https:\/\/tsoukias.eu\/wordpress\/2021\/02\/converting-minidv-addendum\/","title":{"rendered":"Converting MiniDV, addendum"},"content":{"rendered":"\n<p>Hi guys, I have to add this info to the subject of my <a rel=\"noreferrer noopener\" href=\"https:\/\/tsoukias.eu\/wordpress\/2021\/02\/converting-minidv-to-more-useful-media-an-adventure\/\" target=\"_blank\">previous post<\/a> for completion purposes.<\/p>\n\n\n\n<p>I tried to use ffmpeg in a script and compare the results with my <a rel=\"noreferrer noopener\" href=\"https:\/\/handbrake.fr\/\" target=\"_blank\">Handbrake<\/a> method.<\/p>\n\n\n\n<p>To find the parameters to pass to ffmpg, so I could use the libx264 codec as I wanted, I used the info from <a rel=\"noreferrer noopener\" href=\"http:\/\/trac.ffmpeg.org\/wiki\/Encode\/H.264\" target=\"_blank\">here<\/a>. Ffmpeg&#8217;s -help option was very useful too. The script with the settings I used is below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#!\/bin\/bash\n\nfor FIL in `ls *dv | sort` ; do\n   ffmpeg -hwaccel auto -i &quot;$FIL&quot; -c:v libx264 -profile:v main -preset medium -crf 20 -c:a ac3 -b:a 160k \/run\/media\/theo\/INTENSO\/dvgrab\/test_ffmpeg\/${FIL%.*}.mp4\ndone\n<\/pre><\/div>\n\n\n<p>These settings represent what I had set Handbrake to do with my files by a large percentage. In short: x264 codec with &#8216;main&#8217; profile for compatibility with my player, medium fast preset, constant quality of RF20, and AC3 audio codec with a bitrate of 160kbps. My verdict is that while ffmpeg is 10% faster with these settings it lacks the &#8216;decomb&#8217; filter that I use in Handbrake, and I couldn&#8217;t find a replacement at first. So the final result was visibly interlaced. I mean it showed a slight horizontal miss-mach between scan lines.<\/p>\n\n\n\n<p>The filesize was quite larger too.<\/p>\n\n\n\n<p>I was not happy and I looked for a way to de-interlace the input file with another filter. I found the answer in <a rel=\"noreferrer noopener\" href=\"https:\/\/video.stackexchange.com\/questions\/17396\/how-to-deinterlacing-with-ffmpeg\/17397\" target=\"_blank\">video.stackexchange<\/a>. The filter I was looking for was &#8216;yadif&#8217; Yet Another De-Interlacing Filter. It just worked perfect without further parameter tweaking.<\/p>\n\n\n\n<p>Now my final script was:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#!\/bin\/bash\n\nfor FIL in `ls *dv | sort` ; do\n  ffmpeg -hwaccel auto -i &quot;$FIL&quot; -vf yadif -c:v libx264 -profile:v main -preset medium -crf 20 -c:a ac3 -b:a 160k \/run\/media\/theo\/INTENSO\/dvgrab\/test_ffmpeg\/${FIL%.*}.mp4\ndone\n\n<\/pre><\/div>\n\n\n<p>Now ffmpeg was 20% faster and the filesize was 4% smaller! Just adding de-interlacing filter! How cool was that?  No visible artifacts from the de-interlacing process, pure progressive video. The quality was very similar to the one which Handbrake produced. The contrast was a bit higher though, only a little, but in some dark scenes it seemed to lose information.<\/p>\n\n\n\n<p>I think I gave you enough to choose for yourselves your own favorite method. If you have a lot of files to process with the same settings, as in my case, I think ffmpeg wins. The convenience (although not being so intuitive to use) of adjusting the output exactly as you wish with &#8216;Handbrake&#8217; without reading help pages, even for a batch of files, wins on more cases, I guess&#8230;<\/p>\n\n\n\n<p>I have to say that there is probably more digging to do if one wishes, a lot of options and parameters to explore, but I had a rather good result and I stopped there. You are free to go further down if you feel adventurous, give us a line if you do. Wish you my best.<\/p>\n\n\n\n<p>Have fun, people!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi guys, I have to add this info to the subject of my previous post for completion purposes. I tried to use ffmpeg in a script and compare the results with my Handbrake method. To find the parameters to pass to ffmpg, so I could use the libx264 codec as I wanted, I used the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[49,50],"class_list":{"0":"post-418","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-fun","7":"tag-minidv","8":"tag-video-editing","9":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/comments?post=418"}],"version-history":[{"count":11,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":437,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts\/418\/revisions\/437"}],"wp:attachment":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}