{"id":3642,"date":"2022-07-02T03:23:24","date_gmt":"2022-07-02T03:23:24","guid":{"rendered":"https:\/\/cocoalopez.com\/blog\/?p=3642"},"modified":"2024-03-14T21:35:31","modified_gmt":"2024-03-15T03:35:31","slug":"collection-of-ffmpeg-drag-drop-cmd-bat-tools","status":"publish","type":"post","link":"https:\/\/cocoalopez.com\/blog\/?p=3642","title":{"rendered":"Collection of FFMPEG Drag &#038; Drop CMD\/BAT Tools"},"content":{"rendered":"\n<p>Here&#8217;s a small collection of scripts i&#8217;ve made, downloaded, modified, etc to compress, edit, add, remux video files as well as converting mkv files without the need of re-rendering.<\/p>\n\n\n\n<p>Copy the code and save as a .bat file, save it on your <strong>ffmpeg<\/strong> bin folder or any command line if <strong>ffmpeg<\/strong> was installed with its environment path.<\/p>\n\n\n\n<p>To use the scripts, just drag and drop your video file on the .bat file you created.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Download ffmpeg from here: <a rel=\"noreferrer noopener\" href=\"https:\/\/www.gyan.dev\/ffmpeg\/builds\/ffmpeg-release-full.7z\" target=\"_blank\">https:\/\/www.gyan.dev\/ffmpeg\/builds\/ffmpeg-release-full.7z<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>In case FFMPEG is missing or the path is not configured, follow these steps.<\/p>\n\n\n\n<p><a href=\"https:\/\/ffmpeg.zeranoe.com\/builds\/\">Download the lastest &#8220;static&#8221; ffmpeg pack<\/a>.<\/p>\n\n\n\n<p>Browse in the archive up to the <code>bin<\/code> subfolder containing ffmpeg, ffprobe and ffplay executables. Uncompress the <code>bin<\/code> folder (in this example we&#8217;ll use <code>C:\\ffmpeg\\bin<\/code>)<\/p>\n\n\n\n<p>Register ffmpeg, ffprobe &amp; ffplay to environment variables <\/p>\n\n\n\n<p><strong>Through command lines:<\/strong><br>Hit the windows key, write down <code>cmd<\/code> and press <kbd>Enter<\/kbd> and enter the following command, line after line: <\/p>\n\n\n\n<p><code>set ffmpeg=C:\\ffmpeg\\bin <\/code><br><code>set ffprobe=C:\\ffmpeg\\bin <\/code><br><code>set ffplay=C:\\ffmpeg\\bin<\/code><\/p>\n\n\n\n<p><strong>Through user interface:<\/strong><br>Go to: <\/p>\n\n\n\n<p><code>My Computer\/Environment variables<\/code><br><code>Add Name: ffmpeg Value: C:\\ffmpeg\\bin <\/code><br><code>Add Name: ffprobe Value: C:\\ffmpeg\\bin <\/code><br><code>Add Name: ffplay Value: C:\\ffmpeg\\bin <\/code><br><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Add Frame Number to .mov<\/h2>\n\n\n\n<p>You can draw the frame number on top of the video and render it as a new file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\" line-numbers\">rem @echo off\n:again\n\ncd \/D %~p1\n\nffmpeg ^\n\t-i \"%~nx1\" ^\n\t-vf \"drawtext=fontfile=\/Windows\/Fonts\/courbd.ttf: text='Frame \\: %%{eif\\:n\\:d\\:2}': start_number=1: x=(w-tw)\/2: y=h-(2*lh): fontcolor=white: fontsize=40: box=1: boxcolor=black@0.4: boxborderw=8\" ^\n\t-c:a copy ^\n\t\"%~p1%~n1_framenumbered.mov\"\n\tpause\nif NOT [\"%errorlevel%\"]==[\"0\"] goto:error\necho \u001b[92m%~n1 Done!\u001b[0m\n\nshift\nif \"%~1\" == \"\" goto:end\ngoto:again\n\n:error\n\u0007\necho \u001b[93mThere was an error. Please check your input file or report an issue on github.com\/L0Lock\/FFmpeg-bat-collection\/issues.\u001b[0m\npause\nexit 0\n\n:end\n\u0007\ncls\necho \u001b[92mEncoding succesful. This window will close after 10 seconds.\u001b[0m\ntimeout \/t 10<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Convert Any Video to a 100MB File<\/h2>\n\n\n\n<p>Reduce the size of your video to match a 100MB limit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\" line-numbers\">@echo off\n:again\n\ncd \/D %~p0\nSET output=%~p1%~n1_100MB.mp4\nset cmd=\"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 \"\nFOR \/F \"tokens=*\" %%i IN (' %cmd% ') DO SET seconds=%%i\necho aaaa\necho aaaa\nSET \/A \"totalBitrate=500000\/seconds\"\nSET overheadBitrate=100\nSET audioBitrate=96\nSET \/A \"videoBitrate=totalBitrate-audioBitrate-overheadBitrate\"\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 1 -b:a %audioBitrate%k ^\n\t-f mp4 NUL &amp;&amp; \\\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 2 ^\n\t-b:a %audioBitrate%k \"%output%\"\ndel \/q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree\nif NOT [\"%errorlevel%\"]==[\"0\"] goto:error\necho \u001b[92m%~n1 Done!\u001b[0m\n\nshift\nif \"%~1\" == \"\" goto:end\ngoto:again\n\n:error\n\u0007\necho \u001b[93mThere was an error. Please check your input file or report an issue on github.com\/L0Lock\/FFmpeg-bat-collection\/issues.\u001b[0m\npause\nexit 0\n\n:end\n\u0007\ncls\necho \u001b[92mEncoding succesful. This window will close after 10 seconds.\u001b[0m\ntimeout \/t 10<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Convert Video to Discord File Size Limits<\/h2>\n\n\n\n<p>Reduce the video size to match Discord limit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\" line-numbers\">@echo off\n:again\n\ncd \/D %~p0\nSET output=%~p1%~n1_Discorded.mp4\nset cmd=\"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 \"\nFOR \/F \"tokens=*\" %%i IN (' %cmd% ') DO SET seconds=%%i\necho aaaa\necho aaaa\nSET \/A \"totalBitrate=64000\/seconds\"\nSET overheadBitrate=100\nSET audioBitrate=96\nSET \/A \"videoBitrate=totalBitrate-audioBitrate-overheadBitrate\"\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 1 -b:a %audioBitrate%k ^\n\t-f mp4 NUL &amp;&amp; \\\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 2 ^\n\t-b:a %audioBitrate%k \"%output%\"\ndel \/q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree\nif NOT [\"%errorlevel%\"]==[\"0\"] goto:error\necho \u001b[92m%~n1 Done!\u001b[0m\n\nshift\nif \"%~1\" == \"\" goto:end\ngoto:again\n\n:error\n\u0007\necho \u001b[93mThere was an error. Please check your input file or report an issue on github.com\/L0Lock\/FFmpeg-bat-collection\/issues.\u001b[0m\npause\nexit 0\n\n:end\n\u0007\ncls\necho \u001b[92mEncoding succesful. This window will close after 10 seconds.\u001b[0m\ntimeout \/t 10<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Convert Video to Facebook File Size Limits<\/h2>\n\n\n\n<p>Reduce the video size to match Facebook limit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\n:again\n\ncd \/D %~p0\nSET output=%~p1%~n1_Messengered.mp4\nset cmd=\"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 \"\nFOR \/F \"tokens=*\" %%i IN (' %cmd% ') DO SET seconds=%%i\necho aaaa\necho aaaa\nSET \/A \"totalBitrate=160000\/seconds\"\nSET overheadBitrate=100\nSET audioBitrate=96\nSET \/A \"videoBitrate=totalBitrate-audioBitrate-overheadBitrate\"\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 1 -b:a %audioBitrate%k ^\n\t-f mp4 NUL &amp;&amp; \\\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 2 ^\n\t-b:a %audioBitrate%k \"%output%\"\ndel \/q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree\nif NOT [\"%errorlevel%\"]==[\"0\"] goto:error\necho \u001b[92m%~n1 Done!\u001b[0m\n\nshift\nif \"%~1\" == \"\" goto:end\ngoto:again\n\n:error\n\u0007\necho \u001b[93mThere was an error. Please check your input file or report an issue on github.com\/L0Lock\/FFmpeg-bat-collection\/issues.\u001b[0m\npause\nexit 0\n\n:end\n\u0007\ncls\necho \u001b[92mEncoding succesful. This window will close after 10 seconds.\u001b[0m\ntimeout \/t 10<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Convert Video to Whatsapp File Size Limits<\/h2>\n\n\n\n<p>Reduce the video size to match Whatsapp limit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\n:again\n\ncd \/D %~p0\nSET output=%~p1%~n1_Whatsapped.mp4\nset cmd=\"ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 \"\nFOR \/F \"tokens=*\" %%i IN (' %cmd% ') DO SET seconds=%%i\necho aaaa\necho aaaa\nSET \/A \"totalBitrate=260000\/seconds\"\nSET overheadBitrate=100\nSET audioBitrate=96\nSET \/A \"videoBitrate=totalBitrate-audioBitrate-overheadBitrate\"\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 1 -b:a %audioBitrate%k ^\n\t-f mp4 NUL &amp;&amp; \\\nffmpeg ^\n\t-i %1 ^\n\t-c:v libx264 ^\n\t-b:v %videoBitrate%k ^\n\t-pass 2 ^\n\t-b:a %audioBitrate%k \"%output%\"\ndel \/q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree\nif NOT [\"%errorlevel%\"]==[\"0\"] goto:error\necho \u001b[92m%~n1 Done!\u001b[0m\n\nshift\nif \"%~1\" == \"\" goto:end\ngoto:again\n\n:error\n\u0007\necho \u001b[93mThere was an error. Please check your input file or report an issue on github.com\/L0Lock\/FFmpeg-bat-collection\/issues.\u001b[0m\npause\nexit 0\n\n:end\n\u0007\ncls\necho \u001b[92mEncoding succesful. This window will close after 10 seconds.\u001b[0m\ntimeout \/t 10<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">MKV 5.1 audio to Stereo without rendering (Useful when source audio cannot be played on your TV)<\/h2>\n\n\n\n<p>Downmix 5.1 audio to Stereo for MKV files with 5.1 audio that can&#8217;t be played.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\n\ncd \/D %~p0\n\n\necho Convert Audio to Stereo ... \nfor %%i in (%*) do if not exist \"%~p1%%~ni_Stereo.mkv\" (\n   ffmpeg.exe -i \"%%~i\" -map 0 -c copy -c:a aac -ac 2 \"%~p1%%~ni_Stereo.mkv\"\n)\npopd\necho Done..<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Extract Audio Track #2 from MKV video and export it as an mp4 audio file<\/h2>\n\n\n\n<p>This script extracts the audio track #2 from the mkv you drop, if you need to extract track #1 then modify the &#8220;-map 0:a:1&#8221; to &#8220;-map 0:a:0&#8221;  (track begin at 0 instead of 1)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\n\ncd \/D %~p0\n\n\necho Extracting audio track 2 ... \nfor %%i in (%*) do if not exist \"%~p1%%~ni_Audio.mp4\" (\n   ffmpeg -i \"%%~i\" -map 0:a:1 -c copy -c:a aac -ac 2 \"%~p1%%~ni_Audio.mp4\"\n)\npopd\necho Done..\n\n\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Offset Audio by 1.4 seconds without re-encoding<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\n\ncd \/D %~p0\n\n\necho Delay audio by 1.4 seconds ... \nfor %%i in (%*) do if not exist \"%~p1%%~ni_delayed.mp4\" (\n   ffmpeg.exe -i \"%%~i\" -itsoffset 1.4 -i \"%%~i\" -map 0:v -map 1:a -c copy \"%~p1%%~ni_delayed.mp4\"\n)\npopd\necho Done..\n\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Video to instagram size and blurred background fitting<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/d3746fe23c1d97bd1fe54edd27236a6e61565b470acad341bf85aad76e02a385\/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f577279656f4b347538654e624b304d6648442f67697068792e676966\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\n:again\n\n:: To change the resolution, change the SquareSize value above (just after the =). Default is 600.\nset SquareSize=600\n\nffmpeg -i \"%~1\" ^\n    -c:v libx264 -crf 23 -filter_complex \"[0:v]split=2[blur][vid];[blur]scale=%SquareSize%:%SquareSize%:force_original_aspect_ratio=increase,crop=%SquareSize%:%SquareSize%,boxblur=luma_radius=min(h\\,w)\/20:luma_power=1:chroma_radius=min(cw\\,ch)\/20:chroma_power=1[bg];[vid]scale=%SquareSize%:%SquareSize%:force_original_aspect_ratio=decrease[ov];[bg][ov]overlay=(W-w)\/2:(H-h)\/2\"  -profile:v baseline -level 3.0 -pix_fmt yuv420p -preset faster -tune fastdecode ^\n    -c:a aac -ac 2 -b:a 128k ^\n    -movflags faststart ^\n    \"%~p1%~n1_Instagramized.mp4\" -y\nif NOT [\"%errorlevel%\"]==[\"0\"] goto:error\necho \u001b[92m%~n1 Done!\u001b[0m\n\nshift\nif \"%~1\" == \"\" goto:end\ngoto:again\n\n:error\n\u0007\necho \u001b[93mThere was an error. Please check your input file or report an issue on github.com\/L0Lock\/FFmpeg-bat-collection\/issues.\u001b[0m\npause\nexit 0\n\n:end\n\u0007\ncls\necho \u001b[92mEncoding succesful. This window will close after 10 seconds.\u001b[0m\ntimeout \/t 10\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Other codes can be found here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Source for the last blocks: <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/L0Lock\/FFmpeg-bat-collection\" target=\"_blank\">https:\/\/github.com\/L0Lock\/FFmpeg-bat-collection<\/a><\/li>\n\n\n\n<li>Other command line tools for ffmpeg: <a rel=\"noreferrer noopener\" href=\"https:\/\/stackoverflow.com\/questions\/9913032\/how-can-i-extract-audio-from-video-with-ffmpeg\" target=\"_blank\">https:\/\/stackoverflow.com\/questions\/9913032\/how-can-i-extract-audio-from-video-with-ffmpeg<\/a><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Convert OGV to MP4<\/h2>\n\n\n\n<p>Convert any OGV file to an MP4 with fast conversion and using h264, just drag and drop the file into the script.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\nsetlocal enabledelayedexpansion\n\nREM Check if FFmpeg is installed\nwhere ffmpeg &gt;nul 2&gt;nul\nif %errorlevel% neq 0 (\n    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.\n    pause\n    exit \/b 1\n)\n\nREM Check if a file is provided\nif \"%~1\" == \"\" (\n    echo Please drag and drop an OGV file onto this script.\n    pause\n    exit \/b 1\n)\n\nREM Input and output file paths with quotes\nset \"inputFile=%~1\"\nset \"outputFile=%~dpn1.mp4\"\n\nREM Run FFmpeg command with quotes around file paths\nffmpeg -i \"!inputFile!\" -c:v libx264 -crf 22 -c:a aac -b:a 128k -strict -2 \"!outputFile!\"\n\nREM Check FFmpeg exit code\nif !errorlevel! neq 0 (\n    echo An error occurred during conversion.\n    pause\n    exit \/b 1\n)\n\necho Conversion successful. Output file: \"!outputFile!\"\npause\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">CONVERT ANY VIDEO TO A TIMELAPSE MP4<\/h2>\n\n\n\n<p>Convert any video to a timelapse by using every 15th frames.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\nsetlocal enabledelayedexpansion\n\nREM Check if FFmpeg is installed\nwhere ffmpeg &gt;nul 2&gt;nul\nif %errorlevel% neq 0 (\n    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.\n    pause\n    exit \/b 1\n)\n\nREM Check if a file is provided\nif \"%~1\" == \"\" (\n    echo Please drag and drop an OGV file onto this script.\n    pause\n    exit \/b 1\n)\n\nREM Input and output file paths with quotes\nset \"inputFile=%~1\"\nset \"outputFile=%~dpn1_timelapse.mp4\"\n\nREM Run FFmpeg command with quotes around file paths\n\nffmpeg -i \"!inputFile!\" -vf framestep=15,setpts=N\/60\/TB -r 60 -vcodec libx264 -an \"!outputFile!\"\n\n\nREM Check FFmpeg exit code\nif !errorlevel! neq 0 (\n    echo An error occurred during conversion.\n    pause\n    exit \/b 1\n)\n\necho Conversion successful. Output file: \"!outputFile!\"\npause\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">CONVERT ANYTHING TO 720p MP4<\/h2>\n\n\n\n<p>Downscale video to match 720p resolution.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\nsetlocal enabledelayedexpansion\n\nREM Check if FFmpeg is installed\nwhere ffmpeg &gt;nul 2&gt;nul\nif %errorlevel% neq 0 (\n    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.\n    pause\n    exit \/b 1\n)\n\nREM Check if a file is provided\nif \"%~1\" == \"\" (\n    echo Please drag and drop an OGV file onto this script.\n    pause\n    exit \/b 1\n)\n\nREM Input and output file paths with quotes\nset \"inputFile=%~1\"\nset \"outputFile=%~dpn1_720p.mp4\"\n\nREM Run FFmpeg command with quotes around file paths\nffmpeg -i \"!inputFile!\"  -vf scale=1280:720 -preset slow -crf 18 \"!outputFile!\"\n\nREM Check FFmpeg exit code\nif !errorlevel! neq 0 (\n    echo An error occurred during conversion.\n    pause\n    exit \/b 1\n)\n\necho Conversion successful. Output file: \"!outputFile!\"\npause\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">VIDEO TO JPG SEQUENCE<\/h2>\n\n\n\n<p>Convert any video to a jpg sequence.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\nsetlocal EnableExtensions DisableDelayedExpansion\n\nREM Check if the batch file is called with at least one non-empty argument string.\nif \"%~1\" == \"\"  echo INFO: Drag an MP4 file onto this script to begin frame extraction.&amp; pause &amp; exit \/B\n\nset \"inputFile=%~1\"\n\nREM Create the subdirectory input in the directory named after the video file.\nmd \"%~dpn1\\input\" 2&gt;nul\nif not exist \"%~dpn1\\input\\\" echo ERROR: Could not create the directory: \"%~dpn1\\input\"&amp; pause &amp; exit \/B 2\n\nREM Extract frames from the MP4 file.\nffmpeg.exe -i \"%~1\" -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 \"%~dpn1\\input\\image%%03d.jpg\"\nif errorlevel 1 rd \"%~dpn1\\input\" 2&gt;nul &amp; echo ERROR: Failed to extract the frames from: \"%~1\"&amp; pause &amp; exit \/B 1\n\necho Extraction complete.\npause\nendlocal<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Creating thumbnail from video and saving it as a PNG<\/h2>\n\n\n\n<p>You can choose a specific frame from the video manually by specifying its timestamp. If you want to capture the frame at 00:15, add -ss 00:00:15 before your input video to take a screenshot at the 15th second of the video.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\nsetlocal enabledelayedexpansion\n\nREM Check if FFmpeg is installed\nwhere ffmpeg &gt;nul 2&gt;nul\nif %errorlevel% neq 0 (\n    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.\n    pause\n    exit \/b 1\n)\n\nREM Check if a file is provided\nif \"%~1\" == \"\" (\n    echo Please drag and drop an OGV file onto this script.\n    pause\n    exit \/b 1\n)\n\nREM Input and output file paths with quotes\nset \"inputFile=%~1\"\nset \"outputFile=%~dpn1.png\"\n\nREM Run FFmpeg command with quotes around file paths\nffmpeg -ss 00:00:05 -i \"!inputFile!\" -frames:v 1 \"!outputFile!\"\n\nREM Check FFmpeg exit code\nif !errorlevel! neq 0 (\n    echo An error occurred during conversion.\n    pause\n    exit \/b 1\n)\n\necho Conversion successful. Output file: \"!outputFile!\"\npause<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">CONVERT IMG SEQUENCE TO MP4<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">@echo off\nREM Input and output file paths with quotes\n:: The script expects the first parameter to be the image file.\nset \"imageFile=%~1\"\n:: Extract the filename without extension for the output video name.\nfor %%A in (\"%imageFile%\") do set \"filename=%%~nA\"\n\nset \"inputFile=%filename%.jpg\"\nset \"outputFile=%filename%.mp4\"\n\n\nffmpeg ^\n\t-framerate 24 ^\n\t-start_number 1 ^\n\t-i \"TURN_%%04d.jpg\" ^\n\t-c:v libx264 -pix_fmt yuv420p -crf 17 ^\n\t-preset faster -tune fastdecode ^\n\t\"TURNTABLE.mp4\"\nif NOT [\"%errorlevel%\"]==[\"0\"] goto:error\necho \u001b[92m%~n1 Done!\u001b[0m\n\nshift\nif \"%~1\" == \"\" goto:end\ngoto:again\n\n:error\n\u0007\necho \u001b[93mThere was an error. Please check your input file or report an issue on github.com\/L0Lock\/FFmpeg-bat-collection\/issues.\u001b[0m\npause\nexit 0\n\n:end\n\u0007\ncls\necho \u001b[92mEncoding succesful. This window will close after 2 seconds.\u001b[0m\ntimeout \/t 2\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a small collection of scripts i&#8217;ve made, downloaded, modified, etc to compress, edit, add, remux video files as well as converting mkv files without the need of re-rendering. Copy the code and save as a .bat file, save it on your ffmpeg bin folder or any command line if ffmpeg was installed with its [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3644,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1002,35],"tags":[],"class_list":["post-3642","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-zapatainvita"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/07\/pexels-photo-546819.jpeg?fit=1880%2C1249&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9XJix-WK","jetpack-related-posts":[{"id":4156,"url":"https:\/\/cocoalopez.com\/blog\/?p=4156","url_meta":{"origin":3642,"position":0},"title":"Download videos from M3U playlist files","author":"cgmodeler","date":"April 24, 2023","format":false,"excerpt":"Little open sourcee software to download from M3U8 and M3U playlist files. This is an m3u8 downloader. Summary Supports: Auto decrypt for AES-128-CBCMaster ListLive stream recording(BETA)Customize HTTP headersAuto merge clips(Binary or ffmpeg)Select save clip by time code or indexNetwork driver on Windows OSAlternative audio\/video trackMux without video trackCustom HTTP proxy\u2026","rel":"","context":"In &quot;Tools&quot;","block_context":{"text":"Tools","link":"https:\/\/cocoalopez.com\/blog\/?cat=1137"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/04\/image.png?fit=1121%2C789&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/04\/image.png?fit=1121%2C789&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/04\/image.png?fit=1121%2C789&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/04\/image.png?fit=1121%2C789&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/04\/image.png?fit=1121%2C789&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3820,"url":"https:\/\/cocoalopez.com\/blog\/?p=3820","url_meta":{"origin":3642,"position":1},"title":"Automatic Lypsync, Rhubarb, Allosaurus, PAPAGAYO and FFMPEG","author":"cgmodeler","date":"November 24, 2022","format":false,"excerpt":"Found this great tool as a replacement for Papagayo as a lipsync tool. Rhubarb is a tool that analyzes phonetical english and creates a lipsync text, tsv, json or xml file with timestamps and mouth positions for animation. https:\/\/github.com\/DanielSWolf\/rhubarb-lip-sync Demo https:\/\/www.youtube.com\/watch?v=HE0X00n9_FM Also tryout ALLOSAURUS another great tool for autolipsync: https:\/\/github.com\/xinjli\/allosaurus\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/11\/lisa-A.png?fit=408%2C334&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3189,"url":"https:\/\/cocoalopez.com\/blog\/?p=3189","url_meta":{"origin":3642,"position":2},"title":"Shoebox + Adobe Air Install Windows fix Application cannot be installed","author":"cgmodeler","date":"June 2, 2021","format":false,"excerpt":"https:\/\/www.youtube.com\/watch?v=4W6Ml533GsI https:\/\/youtu.be\/YZ9fIYcaLBE So you've come to admire the work that can be saved by using ShoeBox, a time saver and a godsend however it seems that due to certificate expiration and Adobe Air being deprecated you can no longer install this amazing piece of software. Well fear not because here\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2021\/06\/imagen-5.png?fit=837%2C534&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2021\/06\/imagen-5.png?fit=837%2C534&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2021\/06\/imagen-5.png?fit=837%2C534&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2021\/06\/imagen-5.png?fit=837%2C534&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2884,"url":"https:\/\/cocoalopez.com\/blog\/?p=2884","url_meta":{"origin":3642,"position":3},"title":"Thumbnails for Mov Mkv Avi","author":"cgmodeler","date":"October 8, 2019","format":false,"excerpt":"If the thumbnails are not showing up on Explorer for Mov, Mkv, Avi, Mpeg, etc... there's a quick fix: Download Icaros 3.1.1 http:\/\/m.majorgeeks.com\/files\/details\/icaros.htmlInstall and activate Thumbnails for the filetypes.It should work inmediatlyYou can even drag a file and see if its supported:ape;cb7;cbr;cbz;divx;epub;flac;flv;mk3d;mka;mkv;mov;mpc;ofr;ofs;ogg;ogm;ogv;opus;rm;rmvb;spx;tak;tta;wav;webm;wv;xvid","rel":"","context":"In &quot;Tips y Tutoriales&quot;","block_context":{"text":"Tips y Tutoriales","link":"https:\/\/cocoalopez.com\/blog\/?cat=31"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2019\/10\/thumbnails-for-mov-mkv-avi.png?fit=743%2C589&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2019\/10\/thumbnails-for-mov-mkv-avi.png?fit=743%2C589&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2019\/10\/thumbnails-for-mov-mkv-avi.png?fit=743%2C589&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2019\/10\/thumbnails-for-mov-mkv-avi.png?fit=743%2C589&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2836,"url":"https:\/\/cocoalopez.com\/blog\/?p=2836","url_meta":{"origin":3642,"position":4},"title":"Convert FinalDraft\/CELTX Screenplay PDF to Kindle","author":"cgmodeler","date":"January 3, 2019","format":false,"excerpt":"First: Download \"k2pdfopt\" (alt download)Export your script in PDF format.Open k2pdfopt and import the pdf file (don't worry it won't over write the pdf) Select the following settings all default unless specified here: \"smart line breaks: 0.200\" \"Max Columns 1\" \"re-flow text\" \"erase vertical lines\" \"erase horizontal lines\" \"fast preview\"\u2026","rel":"","context":"In &quot;zapatainvita&quot;","block_context":{"text":"zapatainvita","link":"https:\/\/cocoalopez.com\/blog\/?cat=35"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2019\/01\/convert-finaldraft-celtx-screenplay-pdf-to-kindle.jpg?fit=480%2C360&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2477,"url":"https:\/\/cocoalopez.com\/blog\/?p=2477","url_meta":{"origin":3642,"position":5},"title":"Ringling College Scripts y Herramientas para MAYA Gratis","author":"cgmodeler","date":"March 4, 2017","format":false,"excerpt":"Dillo Tools Herramientas\/Scripts del Ringling College para MAYA https:\/\/github.com\/bohdon\/dilloTools\/wiki Modeling Rigging Animation Misc Animation Ack Tools A collection of Animation tools to make working in the graph editor much more streamlined. These tools should be hooked up to hotkeys, see the ack*.mel scripts within dilloTools\/scripts for information about their use.\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2017\/03\/ringling-college-scripts-y-herramientas-para-maya-gratis.jpg?fit=480%2C360&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3642"}],"version-history":[{"count":25,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3642\/revisions"}],"predecessor-version":[{"id":4286,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3642\/revisions\/4286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/3644"}],"wp:attachment":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}