{"id":1081,"date":"2020-01-30T08:56:04","date_gmt":"2020-01-30T17:56:04","guid":{"rendered":"\/blog\/?p=1081"},"modified":"2023-09-21T09:26:43","modified_gmt":"2023-09-21T00:26:43","slug":"mf100-%eb%84%a4%eb%b9%84%ea%b2%8c%ec%9d%b4%ec%85%98-%eb%8f%99%ec%98%81%ec%83%81-%eb%b3%80%ed%99%98-%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=1081","title":{"rendered":"\ub9cc\ub3c4 MF100 \ub124\ube44\uac8c\uc774\uc158 \ub3d9\uc601\uc0c1 \ubcc0\ud658 \uc2a4\ud06c\ub9bd\ud2b8"},"content":{"rendered":"\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@ECHO OFF\nREM ##########################################################################\nREM #\nREM # \ub9cc\ub3c4 MF100 TPEG \ub124\ube44\uac8c\uc774\uc158 \ub3d9\uc601\uc0c1 \ubcc0\ud658 \uc2a4\ud06c\ub9bd\ud2b8\nREM #\nREM # \u25a0\uc0ac\uc6a9\ubc29\ubc95:\nREM #\nREM # SRC_DIR\uc5d0 \uc6d0\ubcf8 \ub3d9\uc601\uc0c1\uc744 \ub123\uace0 \uc2e4\ud589\ud558\uba74 \ubcc0\ud658\ub418\uc5b4 DST_DIR\uc5d0 \uc800\uc7a5\ub41c\ub2e4.\nREM # - \ub514\ub809\ud1a0\ub9ac\uba85\uc5d0 \uacf5\ubc31\/\ud55c\uae00 \ubd88\uac00\nREM # - \uc790\ub9c9\uc740 SRT\ud3ec\ub9f7\uc73c\ub85c \ud558\uba70 \ud30c\uc77c\uba85\uc5d0 \ud55c\uae00\/\uacf5\ubc31 \ubd88\uac00\nREM # - \uc790\ub9c9\uc740 \ub3d9\uc601\uc0c1 \ud30c\uc77c\uba85\uacfc \ub3d9\uc77c\ud558\uac8c SRC_DIR\uc5d0 \ub123\uc5b4\ub454\ub2e4.\nREM #\nREM ##########################################################################\n\nSETLOCAL\nSET \"SRC_DIR=d:\\0_tmp\\src\"\nSET \"DST_DIR=d:\\0_tmp\\dst\"\n\nFOR %%Z IN (%SRC_DIR%\\*.mp4 %SRC_DIR%\\*.avi %SRC_DIR%\\*.mkv %SRC_DIR%\\*.mpg) DO (\n  CALL :MF100_VIDEO_CONV \"%%Z\"\n)\nPAUSE\nEXIT \/B %ERRORLEVEL%\n\n:MF100_VIDEO_CONV\nCD \/D %SRC_DIR%\nIF EXIST \"%~n1.srt\" (\n  ffmpeg -y -i %1 -c:v mpeg4 -q:v 5 -tag:v DIVX -s 704x396 -b:v 1200k -maxrate 1200k -qmax 51 -r 23.976 -c:a libmp3lame -b:a 128k -vf \"subtitles=%~n1.srt:force_style='FontName=MalgunGothic,FontSize=22'\" \"%DST_DIR%\\%~n1.avi\"\n) ELSE (\n  ffmpeg -y -i %1 -c:v mpeg4 -q:v 5 -tag:v DIVX -s 704x396 -b:v 1200k -maxrate 1200k -qmax 51 -r 23.976 -c:a libmp3lame -b:a 128k \"%DST_DIR%\\%~n1.avi\"\n)\nEXIT \/B 0<\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#!\/bin\/bash\n##########################################################################\n#\n# \ub9cc\ub3c4 MF100 TPEG \ub124\ube44\uac8c\uc774\uc158 \ub3d9\uc601\uc0c1 \ubcc0\ud658 \uc2a4\ud06c\ub9bd\ud2b8\n#\n# \u25a0\uc0ac\uc6a9\ubc29\ubc95:\n#\n# SRC_DIR\uc5d0 \uc6d0\ubcf8 \ub3d9\uc601\uc0c1\uc744 \ub123\uace0 \uc2e4\ud589\ud558\uba74 \ubcc0\ud658\ub418\uc5b4 DST_DIR\uc5d0 \uc800\uc7a5\ub41c\ub2e4.\n# - \ub514\ub809\ud1a0\ub9ac\uba85\uc5d0 \uacf5\ubc31\/\ud55c\uae00 \ubd88\uac00\n# - \uc790\ub9c9\uc740 SRT\ud3ec\ub9f7\uc73c\ub85c \ud558\uba70 \ud30c\uc77c\uba85\uc5d0 \ud55c\uae00\/\uacf5\ubc31 \ubd88\uac00\n# - \uc790\ub9c9\uc740 \ub3d9\uc601\uc0c1 \ud30c\uc77c\uba85\uacfc \ub3d9\uc77c\ud558\uac8c SRC_DIR\uc5d0 \ub123\uc5b4\ub454\ub2e4.\n#\n##########################################################################\n\nSRC_DIR=\"\/work\/src\"\nDST_DIR=\"\/work\/dst\"\n\nVIDEO_LIST=$(ls -1 ${SRC_DIR}\/*.mp4 ${SRC_DIR}\/*.avi ${SRC_DIR}\/*.mkv ${SRC_DIR}\/*.mpg 2> \/dev\/null)\n\nfor LOOP_FN in ${VIDEO_LIST}\ndo\n  cd ${SRC_DIR}\n  FILENAME1=$(basename ${LOOP_FN})\n  FILENAME2=\"${FILENAME1%.*}\"\n\n  if [ -f ${FILENAME2}.srt ]\n  then\n    ffmpeg -y -i ${LOOP_FN} -c:v mpeg4 -q:v 5 -tag:v DIVX -s 704x396 -b:v 1200k -maxrate 1200k -qmax 51 -r 23.976 -c:a libmp3lame -b:a 128k -vf \"subtitles=${FILENAME2}.srt:force_style='FontName=MalgunGothic,FontSize=22'\" \"${DST_DIR}\/${FILENAME2}.avi\"\n  else\n    ffmpeg -y -i ${LOOP_FN} -c:v mpeg4 -q:v 5 -tag:v DIVX -s 704x396 -b:v 1200k -maxrate 1200k -qmax 51 -r 23.976 -c:a libmp3lame -b:a 128k \"${DST_DIR}\/${FILENAME2}.avi\"\n  fi\ndone<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[14],"tags":[],"class_list":["post-1081","post","type-post","status-publish","format-standard","hentry","category-computing_tipsandtricks"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1081"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1081\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}