{"id":1709,"date":"2025-07-24T11:51:40","date_gmt":"2025-07-24T11:51:40","guid":{"rendered":"https:\/\/alexisiumus.ru\/?p=1709"},"modified":"2025-07-28T17:52:11","modified_gmt":"2025-07-28T17:52:11","slug":"%d0%ba%d0%b0%d0%ba-%d0%ba%d0%be%d0%bd%d0%b2%d0%b5%d1%80%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d1%82%d1%8c-%d0%b2%d1%81%d0%b5-%d1%84%d0%b0%d0%b9%d0%bb%d1%8b-%d0%b2-%d0%ba%d0%b0%d1%82%d0%b0%d0%bb%d0%be","status":"publish","type":"post","link":"https:\/\/alexisiumus.ru\/?p=1709","title":{"rendered":"\u041a\u0430\u043a \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 mp4 \u0438\u0437 mkv \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435"},"content":{"rendered":"\n<p>\ud83c\udfac \u0412\u043e\u0442 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0430\u043a\u0435\u0442\u043d\u043e \u0441\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 <code>.mkv<\/code>-\u0444\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 <code>.mp4<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ffmpeg<\/code> \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044b \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u0421\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Bash<\/h3>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0439 \u0444\u0430\u0439\u043b <code>convert.sh<\/code> \u0438 \u0432\u0441\u0442\u0430\u0432\u044c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\nfor file in *.mkv; do\n    &#91; -e \"$file\" ] || continue  # \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 .mkv \u0444\u0430\u0439\u043b\u043e\u0432\n\n    output=\"${file%.mkv}.mp4\"\n\n    echo \"\ud83c\udfa5 \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f: $file \u2192 $output\"\n    ffmpeg -i \"$file\" -c:v libx264 -c:a aac -strict experimental \"$output\"\n\n    if &#91; $? -eq 0 ]; then\n        echo \"\ud83d\uddd1\ufe0f \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430: $file\"\n        rm \"$file\"\n    else\n        echo \"\u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438: $file \u2014 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\"\n    fi\ndone\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\uddf0 \u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c: <code>chmod +x convert.sh<\/code><\/li>\n\n\n\n<li>\u0417\u0430\u043f\u0443\u0441\u0442\u0438 \u0435\u0433\u043e \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435: <code>.\/convert.sh<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udca1 \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>libx264<\/code> + <code>aac<\/code> \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u043a\u043e\u0434\u0435\u043a\u0438.<\/li>\n\n\n\n<li>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 <code>.mkv<\/code>-\u0444\u0430\u0439\u043b\u044b \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f <strong>\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438<\/strong> (<code>$? -eq 0<\/code>).<\/li>\n\n\n\n<li>\u041c\u043e\u0436\u043d\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b (<code>.avi<\/code>, <code>.mov<\/code>) \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443 \u0430 \u043d\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440<\/h3>\n\n\n\n<p>\ud83c\udfac \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>\u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443 (GPU)<\/strong> \u0432\u043c\u0435\u0441\u0442\u043e <strong>\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (CPU)<\/strong> \u043f\u0440\u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 <code>.mkv<\/code> \u2192 <code>.mp4<\/code> \u0441 <code>ffmpeg<\/code>, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c <strong>\u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 NVENC<\/strong> \u2014 \u044d\u0442\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f NVIDIA \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u041e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GPU<\/h3>\n\n\n\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Bash, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <strong>NVENC<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\nfor file in *.mkv; do\n    &#91; -e \"$file\" ] || continue\n\n    output=\"${file%.mkv}.mp4\"\n\n    echo \"\ud83c\udfa5 \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0441 GPU: $file \u2192 $output\"\n    ffmpeg -y -hwaccel cuda -i \"$file\" \\\n        -c:v h264_nvenc -preset fast -b:v 5M \\\n        -c:a aac -b:a 192k \"$output\"\n\n    if &#91; $? -eq 0 ]; then\n        echo \"\ud83d\uddd1\ufe0f \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430: $file\"\n        rm \"$file\"\n    else\n        echo \"\u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438: $file\"\n    fi\ndone\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd0d \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u0430\u044f \u043e\u043f\u0446\u0438\u044f<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/th><th>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/th><\/tr><\/thead><tbody><tr><td><code>-hwaccel cuda<\/code><\/td><td>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 GPU<\/td><\/tr><tr><td><code>-c:v h264_nvenc<\/code><\/td><td>\u041a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0432\u0438\u0434\u0435\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NVENC (GPU)<\/td><\/tr><tr><td><code>-preset fast<\/code><\/td><td>\u0411\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c<\/td><\/tr><tr><td><code>-b:v 5M<\/code><\/td><td>\u0411\u0438\u0442\u0440\u0435\u0439\u0442 \u0432\u0438\u0434\u0435\u043e \u2014 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e<\/td><\/tr><tr><td><code>-c:a aac<\/code><\/td><td>\u0410\u0443\u0434\u0438\u043e \u043a\u043e\u0434\u0435\u043a \u2014 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438<\/td><\/tr><tr><td><code>-b:a 192k<\/code><\/td><td>\u0411\u0438\u0442\u0440\u0435\u0439\u0442 \u0430\u0443\u0434\u0438\u043e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udca1 \u0421\u043e\u0432\u0435\u0442\u044b<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0423\u0431\u0435\u0434\u0438\u0441\u044c, \u0447\u0442\u043e <code>ffmpeg<\/code> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <code>h264_nvenc<\/code>: <code>ffmpeg -hide_banner -encoders | grep nvenc<\/code><\/li>\n\n\n\n<li>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <code>h264_nvenc<\/code> \u043d\u0430 <code>hevc_nvenc<\/code> \u0434\u043b\u044f H.265.<\/li>\n\n\n\n<li>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0448\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 <code>-preset p1<\/code>, \u0435\u0441\u043b\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u2014 <code>-preset slow<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>\ud83c\udfac \u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>True.Romance.1993.avi<\/code> \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 MP4 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b (GPU), \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <strong>FFmpeg<\/strong> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f. \u0412\u043e\u0442 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f NVIDIA GPU:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg -hwaccel cuda -i True.Romance.1993.avi -c:v h264_nvenc -preset fast -c:a aac True.Romance.1993.mp4<\/code><\/pre>\n\n\n\n<p>\ud83d\udd27 <strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-hwaccel cuda<\/code> \u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CUDA.<\/li>\n\n\n\n<li><code>-i True.Romance.1993.avi<\/code> \u2014 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 AVI-\u0444\u0430\u0439\u043b.<\/li>\n\n\n\n<li><code>-c:v h264_nvenc<\/code> \u2014 \u043a\u043e\u0434\u0435\u043a NVIDIA NVENC \u0434\u043b\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u0432 H.264.<\/li>\n\n\n\n<li><code>-preset fast<\/code> \u2014 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c.<\/li>\n\n\n\n<li><code>-c:a aac<\/code> \u2014 \u043a\u043e\u0434\u0435\u043a AAC \u0434\u043b\u044f \u0430\u0443\u0434\u0438\u043e.<\/li>\n\n\n\n<li><code>True.Romance.1993.mp4<\/code> \u2014 \u0438\u043c\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udcf9 \u0412\u0438\u0434\u0435\u043e <a href=\"https:\/\/www.youtube.com\/watch?v=yC1DSz7h_U0\">How to Convert mkv to mp4 Using GPU | Very fast ,FFmpeg<\/a> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GPU \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e FFmpeg \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u0438 \u043a AVI-\u0444\u0430\u0439\u043b\u0430\u043c.<\/p>\n\n\n\n<p>\ud83d\udce6 \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432\u0438\u0434\u0435\u043e <a href=\"https:\/\/www.youtube.com\/watch?v=N9dfv3_XJu0\">How to convert videos with ffmpeg | Convert AVI to MP4 and &#8230;<\/a>, \u0433\u0434\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 FFmpeg \u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438.<\/p>\n\n\n\n<p>\ud83d\ude2c \u041e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u00abInitializeEncoder failed: invalid param (8)\u00bb, \u0438 \u043e\u043d\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0448\u044c <strong>\u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u0440\u0435\u0439\u0442\u043e\u043c<\/strong> <code>vbr_hq<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 FFmpeg \u0438 NVENC SDK.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 \u041a\u0430\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c<\/h3>\n\n\n\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <code>-rc:v vbr_hq<\/code> \u043d\u0430 <strong>\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c<\/strong> <code>-rc:v vbr<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>-multipass disabled<\/code> \u0438\u043b\u0438 <code>-multipass fullres<\/code>, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0448\u044c \u0434\u0432\u0443\u0445\u043f\u0440\u043e\u0445\u043e\u0434\u043d\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg -hwaccel cuda -i Planeta_straha.avi -c:v hevc_nvenc -preset p5 -rc:v vbr -cq:v 19 -b:v 5M -maxrate 8M -bufsize 10M -multipass disabled -c:a aac -b:a 320k Planeta_straha.mp4<\/code><\/pre>\n\n\n\n<p>\ud83d\udccc <strong>\u041e\u0431\u0440\u0430\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>preset p5<\/code> \u2014 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u043f\u0440\u0435\u0441\u0435\u0442 (\u043e\u0442 <code>p1<\/code> \u0434\u043e <code>p7<\/code>), \u0432\u043c\u0435\u0441\u0442\u043e <code>slow<\/code>.<\/li>\n\n\n\n<li><code>multipass disabled<\/code> \u2014 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u0432\u0443\u0445\u043f\u0440\u043e\u0445\u043e\u0434\u043d\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 \u0441 \u043f\u0440\u0435\u0441\u0435\u0442\u043e\u043c.<\/li>\n\n\n\n<li><code>rc:v vbr<\/code> \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0440\u0435\u0439\u0442\u0430.<\/li>\n<\/ul>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0448\u044c <strong>\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e<\/strong>, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg -hwaccel cuda -i Planeta_straha.avi -c:v hevc_nvenc -preset p7 -rc:v vbr -cq:v 18 -b:v 8M -maxrate 12M -bufsize 16M -multipass fullres -c:a aac -b:a 320k Planeta_straha.mp4<\/code><\/pre>\n\n\n\n<p>\ud83c\udfa5 \u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u0442\u0435\u0431\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441 \u0434\u0432\u0443\u0445\u043f\u0440\u043e\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0435\u0441\u043b\u0438 \u0442\u0432\u043e\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430 \u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u044d\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442.<\/p>\n\n\n\n<p>\ud83e\uddf9 \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>Planeta_straha.avi<\/code> \u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0451\u043d, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f <strong>\u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f FFmpeg<\/strong>. \u0412\u043e\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 Linux:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg -hwaccel cuda -i Planeta_straha.avi -c:v hevc_nvenc -preset p5 -rc:v vbr -cq:v 19 -b:v 5M -maxrate 8M -bufsize 10M -multipass disabled -c:a aac -b:a 320k Planeta_straha.mp4 &amp;&amp; rm Planeta_straha.avi\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd0d \u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>&amp;&amp;<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442: \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>rm<\/code> (\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435), <strong>\u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438<\/strong> FFmpeg \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f <strong>\u0443\u0441\u043f\u0435\u0448\u043d\u043e<\/strong> (\u043a\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 0).<\/li>\n\n\n\n<li><code>rm Planeta_straha.avi<\/code> \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 AVI-\u0444\u0430\u0439\u043b.<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udcdb \u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0448\u044c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a <strong>\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e<\/strong> \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0437\u0430\u043c\u0435\u043d\u0438 <code>&amp;&amp;<\/code> \u043d\u0430 <code>;<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg ... ; rm Planeta_straha.avi\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udca1 \u041d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u043d\u043d\u043e \u2014 \u043b\u0443\u0447\u0448\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0444\u0430\u0439\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83c\udfac \u0412\u043e\u0442 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0430\u043a\u0435\u0442\u043d\u043e \u0441\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 .mkv-\u0444\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 .mp4 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ffmpeg \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044b \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438: \u2705 \u0421\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Bash \u0421\u043e\u0437\u0434\u0430\u0439 \u0444\u0430\u0439\u043b convert.sh \u0438 \u0432\u0441\u0442\u0430\u0432\u044c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \ud83e\uddf0 \u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \ud83d\udca1 \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443 \u0430 \u043d\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \ud83c\udfac \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443 (GPU) \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1710,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[33],"tags":[],"class_list":["post-1709","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-33"],"_links":{"self":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/1709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1709"}],"version-history":[{"count":6,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/1709\/revisions"}],"predecessor-version":[{"id":1717,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/posts\/1709\/revisions\/1717"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=\/wp\/v2\/media\/1710"}],"wp:attachment":[{"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexisiumus.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}