{"id":7475,"date":"2018-01-19T17:46:30","date_gmt":"2018-01-19T08:46:30","guid":{"rendered":"https:\/\/quizgenerator.net\/?p=7475"},"modified":"2018-01-19T17:46:30","modified_gmt":"2022-11-02T08:11:41","slug":"ffmpeg-drag-and-drop-to-encode","status":"publish","type":"post","link":"https:\/\/quizgenerator.net\/en\/2018\/01\/ffmpeg-drag-and-drop-to-encode\/","title":{"rendered":"FFmpeg - Drag and drop encoding"},"content":{"rendered":"<p>I have installed FFmpeg, but there are too many option settings and I don't know how to set them. I know the settings, but it's too much trouble to encode one file at a time with commands. In such a case, it is convenient to create a batch file like the following, so that you can encode video files by just dragging and dropping them.<\/p>\n<p>In order to use this batch, you need to use \"Windows PC\". You also need to use<a href=\"https:\/\/quizgenerator.net\/en\/2017\/11\/%e5%8b%95%e7%94%bb%e3%81%ae%e5%9c%a7%e7%b8%ae\/\">Video compression\uff08FFmpeg setup and encoding procedure)<\/a>You must place ffmpeg on the execution path according to the<\/p>\n<p><strong>Just drag the video to the .bat as below to encode it.<\/strong><br \/>\n You can drag multiple files together. And the file name after encoding is automatically set according to the original file name.<\/p>\n<p><a href=\"https:\/\/quizgenerator.net\/wp-content\/uploads\/2018\/01\/2018-01-19_1742.png\" data-rel=\"lightbox-image-0\" data-magnific_type=\"image\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7479\" src=\"https:\/\/quizgenerator.net\/wp-content\/uploads\/2018\/01\/2018-01-19_1742.png\" alt=\"\" width=\"531\" height=\"300\" \/><\/a><\/p>\n<h3>Batch file for encoding<\/h3>\n<p>The second and third batches are excellent for resizing, but depending on the aspect ratio of the original video, the height may be odd and cannot be encoded.<\/p>\n<p><strong>Reduce capacity while maintaining size<\/strong>(\u2193Click to download)<br \/>\n https:\/\/quizgenerator.net\/wp-content\/uploads\/bat\/ffmpeg-noresize.bat<\/p>\n<p><strong>Reduced capacity to standard definition for learningBOX - 640 wide<\/strong>(Ibid.)<br \/>\n https:\/\/quizgenerator.net\/wp-content\/uploads\/bat\/ffmpeg-640.bat<\/p>\n<p><strong>Reduced capacity to high quality video plan of learningBOX - width 1280<\/strong>(Ibid.)<br \/>\n https:\/\/quizgenerator.net\/wp-content\/uploads\/bat\/ffmpeg-1280.bat<\/p>\n<h3>Batch File Description<\/h3>\n<p><strong>The following code is from ffmpeg-1280.bat; the lines starting with ffmepg are the body.<\/strong><br \/>\n <strong>-vf scale=1280:-2<\/strong><br \/>\n * The size of the video is specified. The width is 1280 and the height is automatic. -2 is specified, it will be adjusted to be a multiple of 2.<br \/>\n <strong>-crf 22<\/strong><br \/>\n * This is the picture quality setting. The larger the value, the worse the picture quality becomes (the capacity decreases).<br \/>\n <strong>-r 30<\/strong><br \/>\n * Specifies the frame rate. If you specify a larger value, the video will be smoother (the capacity will increase).<br \/>\n <strong>-ac 1<\/strong><br \/>\n * This is the specification of monauralization of audio. If monaural is good, this specification will reduce the capacity.<\/p>\n<pre><code>ECHO OFF\r\n\r\nECHO OFF :REPEAT\r\nffmpeg.exe -i %1 -vcodec libx264 -vf scale=1280:-2 -crf 22 -r 30 -y -ac 1 \"%~n1.w1280.mp4\"\r\n\r\nif \"%~2\"==\"\" GOTO EXIT\r\nshift\r\nGOTO REPEAT\r\nGOTO REPEAT :EXIT\r\npause<\/code><\/pre>\n<h2>revision history<\/h2>\n<li>2018.1.19 First published.\n<li>2018.4.2 Changed height specification from -1 to -2 \/ Changed to -2 because there was an error depending on the video size<br \/>","protected":false},"excerpt":{"rendered":"I installed FFmpeg, but there are so many option settings that I don't know how to set them. I know the settings, but I have to encode one file at a time with the command...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","_lmt_disableupdate":"yes","_lmt_disable":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[52,39],"tags":[51,21],"class_list":["post-7475","post","type-post","status-publish","format-standard","hentry","category-ffmpeg","category-blog","tag-ffmpeg","tag-21"],"acf":[],"modified_by":"\u8cb4\u7530\u5ca1\u4e45\u5fd7","_links":{"self":[{"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/posts\/7475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/comments?post=7475"}],"version-history":[{"count":4,"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/posts\/7475\/revisions"}],"predecessor-version":[{"id":24455,"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/posts\/7475\/revisions\/24455"}],"wp:attachment":[{"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/media?parent=7475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/categories?post=7475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/quizgenerator.net\/en\/wp-json\/wp\/v2\/tags?post=7475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}