Home Blog Page 8

DeepFace Live

0

Deepface realtime for using with a webcam or video sequences.

Download latest version here:

https://mega.nz/folder/m10iELBK#Y0H6BflF9C4k_clYofC7yA

Github Project here:

https://github.com/iperov/DeepFaceLive

How to Approach Flat Character Design in Maya & Rig Them

0

James Crossley shows some methods for creating flat characters in a 3D world.

There is a certain appeal to having characters that look hand-drawn or hand-painted. In a digital world, that means using a 2D animation app like SpineToonBoom, Ae, Moho, or others. Some other alternatives work with a hybrid of 2D and 3D objects simultaneously, like Bender’s Grease Pencil. You can also create a 2D flat character in a 3D app, like Cinema 4D or Maya. There are a lot of advantages to doing that, and some drawbacks too.

2D in 3D.

A new breakdown from James Crossley shows some of the methods he uses to get that classic 2D flat character look in Maya. Crossley plans to create a series of examinations covering character building, rigging, and animation using flat puppets in Maya. One of the benefits is having access to Maya’s animation and rigging toolset, not to mention the sheer speed of a 3D viewport.

Rigging The body

Rigging The Leg

Rigging The Eyes

Rigging The Mouth

Copy Skin Weights for Clothed Characters MAYA

0
  1. Select the clothes mesh
  2. Select the root bone of the rig
  3. Go to SKIN/BIND SKIN (Keep Default Parameters)
Default Parameters
  1. Select the skinned body mesh
  2. Then Select the clothes mesh
  3. Go to SKIN/COPY SKIN WEIGHTS
  4. Select Closest Joint
  5. One to One
  6. And Normalize

Press copy.

Optix denoiser from Command line Windows

0

A great tool for standalone denoise your renders PNG or JPG sequences supported.

https://github.com/DeclanRussell/NvidiaAIDenoiser

You will need to download Nvidia’s OPTIX and CUDA SDKs from the dev site.

You will require an Nvidia driver of at least 465.84 or higher and an Nvidia GPU of Maxwell architecture or newer to use the OptiX denoiser.

UI and Viewport performance lags or seems slow on fast multicore CPUs in 3ds Max

0

Found this thread for solving the sluggish UI on 3DS MAX.

https://knowledge.autodesk.com/support/3ds-max/troubleshooting/caas/sfdcarticles/sfdcarticles/3ds-Max-UI-lags-or-seems-sluggish-even-on-very-fast-multi-core-CPUs.html

Issue:

3ds Max lags or shows a delay in performance, even on fast CPUs. This includes, but is not limited to Intel i9 and AMD ‘Ryzen Threadrippers’.
This includes clicking any area of the user interface or moving objects, animation playback (FPS, or frames per second) in the viewport.
When trying to move an object from point A to point B, it may take two – ten seconds to perform the action.

Environment:

  • AMD Ryzen CPUs.
  • AMD Threadripper.
  • Intel i9 CPUs.

Causes:

Includes, but is not limited to:

  • Under certain PC hardware configurations, the multicore CPU’s cache memory access may become bottle-necked when performing certain calculations. The CPUs may run fast as long as they can hit the data they need directly (in the cache), but can become stalled when hitting a “cache miss.”.
  • Outdated video card drivers.
  • Power management options in Windows may be switching between a slower, low-power onboard graphics processing unit (GPU) and a higher-performance video card.
  • Large 3ds Max scene files (more than 1 gigabyte) with many objects and high-resolution textures.
  • High-resolution monitor settings or multiple monitors connected to laptop docks.
  • Corrupted scene geometry.
  • Dense, high poly objects.

Solution:

The solution may require one, or a combination of the following to resolve: 
 

Check the scene for corrupted scripts

Go to the Script Controller entry in the ‘See Also’ section below to check 3ds Max for corrupted scripts that could affect performance.

Turn off Deferred Plug-in Loading

  1. In 3ds Max, go to the Customize > Preferences menu.
  2. In the General tab, deselect “Load Plug-ins When Used.”
  3. Close 3ds Max, then restart the program.

Disable Hyperthreading (for Intel CPUs) or Simultaneous Multithreading (SMT, for AMD CPUs)

Although it may seem contradictory, disabling Hyperthreading (for Intel CPUs) or SMT (simultaneous

multithreading, for AMD CPUs) may actually speed up 3ds Max performance.
Note: The Arnold renderer takes advantage of both Hyperthreading and SMT, so disable these settings only if getting the best performance from Arnold isn’t necessary.

Set a Qt Environment variable in Windows

In some instances, 3ds Max UI improvements may occur by setting a Qt (UI) environment variable in Windows:

  1. In Windows (8 or 10), go to the Windows Search bar.
  2. Type: System. (It should bring up the choice of “System (Control Panel).”
  3. Press Enter.
  4. In the System menu, in the bottom-left of the menu, click the Advanced Systems Settings item. A System Properties menu will appear.
  5. Click Environment Variables. The Environment Variables menu will appear.
  6. Under System variables, click New to bring up the New System Variable menu.
  7. Under Variable name, enter: QT_OPENGL
  8. Under Variable value, enter: Angle
  9. Click OK in to save the changes.
  10. Under System variables, click New to bring up the New System Variable menu.
  11. Under Variable name, enter: QT_ANGLE_PLATFORM
  12. Under Variable value, enter any one of these variables: warp, d3d9 or d3d11. (Note: Save only one of these at a time. If you see no improvement, reboot the PC and repeat the process but enter the next variable in this list.)
  13. Click OK in each menu to save the changes.
  14. Reboot the PC and test the performance in 3ds Max.

For more information on the Qt variables, see: Qt 5 on Windows ANGLE and OpenGL.

Update Graphics Drivers

To install the most recent version of the video card driver, update the GPU from the manufacturer’s website:.

Configure the PC or laptop to use high-performance graphics

See the following articles:

Optimize 3ds Max scenes

Follow the steps in this article to optimize large scene for best performance in 3ds Max: How to optimize performance in large 3ds Max scenes .

Lower the display resolution if necessary

If running in 4K resolution and encountering screen redraw issues (especially if running multiple monitors), consider lowering the screen resolution. See this Microsoft article for recommended screen settings: 

Change your screen resolution

.

Examine the scene for corrupted geometry

In certain cases, having corrupted scene geometry can impair viewport performance. Try the following:

Optimize high poly objects

High poly objects will impact viewport performance. Use Xrefs where possible.

WF-1000XM3 can’t connect with Windows 10 and Stutterring playback

0

If you get the following errors when trying to pair the WF-1000XM3 on Windows 10:

  • that didn’t work make sure your bluetooth device is still discoverable
  • They don’t appear as a sound device despite being paired already
  • They show up but you can’t select them as audio devices.

The solution is to try any of these, it’s most likely that the device was paired but your Bluetooth device on windows is missing the aptX HD codecs, therefore it pairs but cannot play any audio.

Solution 1

Win10, go to Devices and Printers, right click LE_WH1000M3 or 1000MX3 properties then Services and select all services. Once you’ve done that, Audio service (shown as WF-1000XM3) should appear. Note, that once your headset will say that it has paired with PC, you also need to change audio Playback to Headset.

https://i.imgur.com/XhaYzyW.png
Solution 2

Download the aptX HD bluetooth enabled drivers

As much as the headphones may support it its not for granted that your pc is or if it has it installed, so here is a link with instructions: https://www.youtube.com/watch?v=3qr5o8x4LDQ

…and finally here is a download link to the install file: https://www.dell.com/support/home/sv-se/drivers/DriversDetails?driverId=100J9&fileId=3546946146&lwp=…

Or download from here: cocoalopez.com/blog/uploads/Network_Application_100J9_WN32_17.1.1530.31_A00.EXE.zip

Taken from: https://community.sony.no/t5/portable-audio/wh-1000xm3-can-t-connect-with-windows-10/td-p/3756476

Now for the stutter or laggy playback

Disable audio enhancement 

Audio enhancement is designed to make your system sound perfect. But things can go wrong somethings. To fix your sound stuttering problem, please perform:  

  1. On your keyboard, press the Windows logo key + R on the keyboard at the same time.
  2. Type mmsys.cpl and press Enter
  3. Right-click your default playback device (the one with a green tick) and click Properties
  4. Click Enhancement. Make sure the box for Disable all enhancements is empty. Click Apply and OK to save the change. 

If you don’t have an Enhancement tab here, the culprit is not enhancement then. Move on to the next fix. 

Fix 2: Change audio formats

If your audio driver or software doesn’t support the current audio format you have, sound issues such as static or stuttering would happen. To fix it, you can try different audio formats: 

  1. On your keyboard, press the Windows logo key + R on the keyboard at the same time.
  2. Type “mmsys.cpl” and press Enter
  3. Right-click your default playback device (the one with a green tick) and click Properties
  4. Click the Advanced tab. Select 16 bit, 44100 Hz (CD Quality). Click Apply and OK to save the changes. 
  5. Test to see if your sound is still stuttering. If yes, go back to step 4 and try some other formats until you find the one works for you. 

UTILITY TO CONTROL SETTINGS ON WINDOWS 10

Found this nifty utility that helps you set your headphones using the PC instead of the mobile app:

https://github.com/Plutoberth/SonyHeadphonesClient

Interactive 3D Face Drawing

0

IDE-3D: Interactive Disentangled Editing for High-Resolution 3D-aware Portrait Synthesis

Existing 3D-aware facial generation methods face a dilemma in quality ver- sus editability: they either generate editable results in low resolution, or high quality ones with no editing flexibility. In this work, we propose a new approach that brings the best of both worlds together. Our system consists of three major components: (1) a 3D-semantics-aware generative model that produces view-consistent, disentangled face images and semantic masks; (2) a hybrid GAN inversion approach that initialize the latent codes from the semantic and texture encoder, and further optimized them for faithful reconstruction; and (3) a canonical editor that enables efficient manipulation of semantic masks in canonical view and producs high quality editing re- sults. Our approach is competent for many applications, e.g. free-view face drawing, editing and style control. Both quantitative and qualitative results show that our method reaches the state-of-the-art in terms of photorealism, faithfulness and efficiency.

https://mrtornado24.github.io/IDE-3D/

Collection of FFMPEG Drag & Drop CMD/BAT Tools

Here’s a small collection of scripts i’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 environment path.

To use the scripts, just drag and drop your video file on the .bat file you created.

Download ffmpeg from here: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z


In case FFMPEG is missing or the path is not configured, follow these steps.

Download the lastest “static” ffmpeg pack.

Browse in the archive up to the bin subfolder containing ffmpeg, ffprobe and ffplay executables. Uncompress the bin folder (in this example we’ll use C:\ffmpeg\bin)

Register ffmpeg, ffprobe & ffplay to environment variables

Through command lines:
Hit the windows key, write down cmd and press Enter and enter the following command, line after line:

set ffmpeg=C:\ffmpeg\bin
set ffprobe=C:\ffmpeg\bin
set ffplay=C:\ffmpeg\bin

Through user interface:
Go to:

My Computer/Environment variables
Add Name: ffmpeg Value: C:\ffmpeg\bin
Add Name: ffprobe Value: C:\ffmpeg\bin
Add Name: ffplay Value: C:\ffmpeg\bin


Add Frame Number to .mov

You can draw the frame number on top of the video and render it as a new file.

rem @echo off
:again

cd /D %~p1

ffmpeg ^
	-i "%~nx1" ^
	-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" ^
	-c:a copy ^
	"%~p1%~n1_framenumbered.mov"
	pause
if NOT ["%errorlevel%"]==["0"] goto:error
echo %~n1 Done!

shift
if "%~1" == "" goto:end
goto:again

:error

echo There was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.
pause
exit 0

:end

cls
echo Encoding succesful. This window will close after 10 seconds.
timeout /t 10

Convert Any Video to a 100MB File

Reduce the size of your video to match a 100MB limit.

@echo off
:again

cd /D %~p0
SET output=%~p1%~n1_100MB.mp4
set cmd="ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 "
FOR /F "tokens=*" %%i IN (' %cmd% ') DO SET seconds=%%i
echo aaaa
echo aaaa
SET /A "totalBitrate=500000/seconds"
SET overheadBitrate=100
SET audioBitrate=96
SET /A "videoBitrate=totalBitrate-audioBitrate-overheadBitrate"
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 1 -b:a %audioBitrate%k ^
	-f mp4 NUL && \
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 2 ^
	-b:a %audioBitrate%k "%output%"
del /q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree
if NOT ["%errorlevel%"]==["0"] goto:error
echo %~n1 Done!

shift
if "%~1" == "" goto:end
goto:again

:error

echo There was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.
pause
exit 0

:end

cls
echo Encoding succesful. This window will close after 10 seconds.
timeout /t 10

Convert Video to Discord File Size Limits

Reduce the video size to match Discord limit.

@echo off
:again

cd /D %~p0
SET output=%~p1%~n1_Discorded.mp4
set cmd="ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 "
FOR /F "tokens=*" %%i IN (' %cmd% ') DO SET seconds=%%i
echo aaaa
echo aaaa
SET /A "totalBitrate=64000/seconds"
SET overheadBitrate=100
SET audioBitrate=96
SET /A "videoBitrate=totalBitrate-audioBitrate-overheadBitrate"
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 1 -b:a %audioBitrate%k ^
	-f mp4 NUL && \
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 2 ^
	-b:a %audioBitrate%k "%output%"
del /q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree
if NOT ["%errorlevel%"]==["0"] goto:error
echo %~n1 Done!

shift
if "%~1" == "" goto:end
goto:again

:error

echo There was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.
pause
exit 0

:end

cls
echo Encoding succesful. This window will close after 10 seconds.
timeout /t 10

Convert Video to Facebook File Size Limits

Reduce the video size to match Facebook limit.

@echo off
:again

cd /D %~p0
SET output=%~p1%~n1_Messengered.mp4
set cmd="ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 "
FOR /F "tokens=*" %%i IN (' %cmd% ') DO SET seconds=%%i
echo aaaa
echo aaaa
SET /A "totalBitrate=160000/seconds"
SET overheadBitrate=100
SET audioBitrate=96
SET /A "videoBitrate=totalBitrate-audioBitrate-overheadBitrate"
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 1 -b:a %audioBitrate%k ^
	-f mp4 NUL && \
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 2 ^
	-b:a %audioBitrate%k "%output%"
del /q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree
if NOT ["%errorlevel%"]==["0"] goto:error
echo %~n1 Done!

shift
if "%~1" == "" goto:end
goto:again

:error

echo There was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.
pause
exit 0

:end

cls
echo Encoding succesful. This window will close after 10 seconds.
timeout /t 10

Convert Video to Whatsapp File Size Limits

Reduce the video size to match Whatsapp limit.

@echo off
:again

cd /D %~p0
SET output=%~p1%~n1_Whatsapped.mp4
set cmd="ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 %1 "
FOR /F "tokens=*" %%i IN (' %cmd% ') DO SET seconds=%%i
echo aaaa
echo aaaa
SET /A "totalBitrate=260000/seconds"
SET overheadBitrate=100
SET audioBitrate=96
SET /A "videoBitrate=totalBitrate-audioBitrate-overheadBitrate"
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 1 -b:a %audioBitrate%k ^
	-f mp4 NUL && \
ffmpeg ^
	-i %1 ^
	-c:v libx264 ^
	-b:v %videoBitrate%k ^
	-pass 2 ^
	-b:a %audioBitrate%k "%output%"
del /q ffmpeg2pass-*.log ffmpeg2pass-*.mbtree
if NOT ["%errorlevel%"]==["0"] goto:error
echo %~n1 Done!

shift
if "%~1" == "" goto:end
goto:again

:error

echo There was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.
pause
exit 0

:end

cls
echo Encoding succesful. This window will close after 10 seconds.
timeout /t 10

MKV 5.1 audio to Stereo without rendering (Useful when source audio cannot be played on your TV)

Downmix 5.1 audio to Stereo for MKV files with 5.1 audio that can’t be played.

@echo off

cd /D %~p0


echo Convert Audio to Stereo ... 
for %%i in (%*) do if not exist "%~p1%%~ni_Stereo.mkv" (
   ffmpeg.exe -i "%%~i" -map 0 -c copy -c:a aac -ac 2 "%~p1%%~ni_Stereo.mkv"
)
popd
echo Done..

Extract Audio Track #2 from MKV video and export it as an mp4 audio file

This script extracts the audio track #2 from the mkv you drop, if you need to extract track #1 then modify the “-map 0:a:1” to “-map 0:a:0” (track begin at 0 instead of 1)

@echo off

cd /D %~p0


echo Extracting audio track 2 ... 
for %%i in (%*) do if not exist "%~p1%%~ni_Audio.mp4" (
   ffmpeg -i "%%~i" -map 0:a:1 -c copy -c:a aac -ac 2 "%~p1%%~ni_Audio.mp4"
)
popd
echo Done..



Offset Audio by 1.4 seconds without re-encoding

@echo off

cd /D %~p0


echo Delay audio by 1.4 seconds ... 
for %%i in (%*) do if not exist "%~p1%%~ni_delayed.mp4" (
   ffmpeg.exe -i "%%~i" -itsoffset 1.4 -i "%%~i" -map 0:v -map 1:a -c copy "%~p1%%~ni_delayed.mp4"
)
popd
echo Done..


Video to instagram size and blurred background fitting

@echo off
:again

:: To change the resolution, change the SquareSize value above (just after the =). Default is 600.
set SquareSize=600

ffmpeg -i "%~1" ^
    -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 ^
    -c:a aac -ac 2 -b:a 128k ^
    -movflags faststart ^
    "%~p1%~n1_Instagramized.mp4" -y
if NOT ["%errorlevel%"]==["0"] goto:error
echo %~n1 Done!

shift
if "%~1" == "" goto:end
goto:again

:error

echo There was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.
pause
exit 0

:end

cls
echo Encoding succesful. This window will close after 10 seconds.
timeout /t 10

Other codes can be found here:


Convert OGV to MP4

Convert any OGV file to an MP4 with fast conversion and using h264, just drag and drop the file into the script.

@echo off
setlocal enabledelayedexpansion

REM Check if FFmpeg is installed
where ffmpeg >nul 2>nul
if %errorlevel% neq 0 (
    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.
    pause
    exit /b 1
)

REM Check if a file is provided
if "%~1" == "" (
    echo Please drag and drop an OGV file onto this script.
    pause
    exit /b 1
)

REM Input and output file paths with quotes
set "inputFile=%~1"
set "outputFile=%~dpn1.mp4"

REM Run FFmpeg command with quotes around file paths
ffmpeg -i "!inputFile!" -c:v libx264 -crf 22 -c:a aac -b:a 128k -strict -2 "!outputFile!"

REM Check FFmpeg exit code
if !errorlevel! neq 0 (
    echo An error occurred during conversion.
    pause
    exit /b 1
)

echo Conversion successful. Output file: "!outputFile!"
pause

CONVERT ANY VIDEO TO A TIMELAPSE MP4

Convert any video to a timelapse by using every 15th frames.

@echo off
setlocal enabledelayedexpansion

REM Check if FFmpeg is installed
where ffmpeg >nul 2>nul
if %errorlevel% neq 0 (
    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.
    pause
    exit /b 1
)

REM Check if a file is provided
if "%~1" == "" (
    echo Please drag and drop an OGV file onto this script.
    pause
    exit /b 1
)

REM Input and output file paths with quotes
set "inputFile=%~1"
set "outputFile=%~dpn1_timelapse.mp4"

REM Run FFmpeg command with quotes around file paths

ffmpeg -i "!inputFile!" -vf framestep=15,setpts=N/60/TB -r 60 -vcodec libx264 -an "!outputFile!"


REM Check FFmpeg exit code
if !errorlevel! neq 0 (
    echo An error occurred during conversion.
    pause
    exit /b 1
)

echo Conversion successful. Output file: "!outputFile!"
pause

CONVERT ANYTHING TO 720p MP4

Downscale video to match 720p resolution.

@echo off
setlocal enabledelayedexpansion

REM Check if FFmpeg is installed
where ffmpeg >nul 2>nul
if %errorlevel% neq 0 (
    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.
    pause
    exit /b 1
)

REM Check if a file is provided
if "%~1" == "" (
    echo Please drag and drop an OGV file onto this script.
    pause
    exit /b 1
)

REM Input and output file paths with quotes
set "inputFile=%~1"
set "outputFile=%~dpn1_720p.mp4"

REM Run FFmpeg command with quotes around file paths
ffmpeg -i "!inputFile!"  -vf scale=1280:720 -preset slow -crf 18 "!outputFile!"

REM Check FFmpeg exit code
if !errorlevel! neq 0 (
    echo An error occurred during conversion.
    pause
    exit /b 1
)

echo Conversion successful. Output file: "!outputFile!"
pause

VIDEO TO JPG SEQUENCE

Convert any video to a jpg sequence.

@echo off
setlocal EnableExtensions DisableDelayedExpansion

REM Check if the batch file is called with at least one non-empty argument string.
if "%~1" == ""  echo INFO: Drag an MP4 file onto this script to begin frame extraction.& pause & exit /B

set "inputFile=%~1"

REM Create the subdirectory input in the directory named after the video file.
md "%~dpn1\input" 2>nul
if not exist "%~dpn1\input\" echo ERROR: Could not create the directory: "%~dpn1\input"& pause & exit /B 2

REM Extract frames from the MP4 file.
ffmpeg.exe -i "%~1" -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 "%~dpn1\input\image%%03d.jpg"
if errorlevel 1 rd "%~dpn1\input" 2>nul & echo ERROR: Failed to extract the frames from: "%~1"& pause & exit /B 1

echo Extraction complete.
pause
endlocal

Creating thumbnail from video and saving it as a PNG

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.

@echo off
setlocal enabledelayedexpansion

REM Check if FFmpeg is installed
where ffmpeg >nul 2>nul
if %errorlevel% neq 0 (
    echo FFmpeg is not installed or not in the system PATH. Please install FFmpeg and try again.
    pause
    exit /b 1
)

REM Check if a file is provided
if "%~1" == "" (
    echo Please drag and drop an OGV file onto this script.
    pause
    exit /b 1
)

REM Input and output file paths with quotes
set "inputFile=%~1"
set "outputFile=%~dpn1.png"

REM Run FFmpeg command with quotes around file paths
ffmpeg -ss 00:00:05 -i "!inputFile!" -frames:v 1 "!outputFile!"

REM Check FFmpeg exit code
if !errorlevel! neq 0 (
    echo An error occurred during conversion.
    pause
    exit /b 1
)

echo Conversion successful. Output file: "!outputFile!"
pause

CONVERT IMG SEQUENCE TO MP4

@echo off
REM Input and output file paths with quotes
:: The script expects the first parameter to be the image file.
set "imageFile=%~1"
:: Extract the filename without extension for the output video name.
for %%A in ("%imageFile%") do set "filename=%%~nA"

set "inputFile=%filename%.jpg"
set "outputFile=%filename%.mp4"


ffmpeg ^
	-framerate 24 ^
	-start_number 1 ^
	-i "TURN_%%04d.jpg" ^
	-c:v libx264 -pix_fmt yuv420p -crf 17 ^
	-preset faster -tune fastdecode ^
	"TURNTABLE.mp4"
if NOT ["%errorlevel%"]==["0"] goto:error
echo %~n1 Done!

shift
if "%~1" == "" goto:end
goto:again

:error

echo There was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.
pause
exit 0

:end

cls
echo Encoding succesful. This window will close after 2 seconds.
timeout /t 2