Skip to content

UserProjekt/FF_Video_Transcoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 

Repository files navigation

FF_Video_Transcoder

This is a Python script using FFmpeg for transcoding in video production. It is designed for Full High Definition (FHD) video with options for H.265 (4:2:0, 8-bit, 5Mbps) or ProRes Proxy. The script includes filename and timecode burn-in, and it matches the audio channels of the source file, encoding them as MP3 with 128Kbps per track. These settings are optimized for hardware decoding and systems with low I/O performance. The reduced file size also makes it more efficient for transfer and storage.

Due to an issue with Adobe Premiere, which cannot use hardware decoding for 4:2:0 8-bit H.265 with 8 audio tracks (Sony XAVC-I codec), an auto mode has been implemented to choose the codec based on the number of audio tracks.

FFmpeg hardware encoding/decoding information

Installation

This script requires following to be installed

Python 3
tqdm
ffmpeg 6.1.1
mediainfo cli

Irrespective of how Python 3 was installed (e.g., via Homebrew, from python.org)Please ensure Python 3 is in the PATH.

'tqdm' is not a part of the standard library in Python 3. Instead, it's an external library that provides a fast, extensible progress bar for loops and other computations.

pip3 install tqdm

FFmpeg for transcoding, on macOS, This script uses the 'videotoolbox' for hardware encoding on modern Macs, whether they're Apple Silicon or Intel. On Windows, it uses Nvidia's NVENC for the job.

MacOS

Install FFmpeg

#using Homebrew (https://brew.sh)
brew install ffmpeg

Alternatively, you can download FFmpeg from here, and add it to PATH.

Windows

You can install FFmpeg using package managers:

#using Chocolatey (https://chocolatey.org/)
choco install ffmpeg

#using Scoop (https://scoop.sh/)
scoop install ffmpeg

Alternatively, you can download FFmpeg from here, download MediaInfo CLI from its official website: MediaArea - MediaInfo,and then add them to the PATH.

Folder Structure

The industray standard footage folder structure is outlined below. Please ensure that the date-specific folders (e.g., 'Shooting Day 1', 'Shooting Day 2') are situated directly beneath the 'Footage' folder.

  • 📁 Production
    • 📁 Footage
      • 📁 Shooting Day 1
        • 📁 A001_0210Z9
        • 📁 B001_029AC3
      • 📁 Shooting Day 2
        • 📁 A002_0210Z9

In our workflow,We place the Proxy folder alongside the Footage folder,feel free to put it wherever you like

  • 📁 Production
    • 📁 Proxy
    • 📁 Footage
      • 📁 Shooting Day 1
        • 📁 A001_0210Z9
        • 📁 B001_029AC3
      • 📁 Shooting Day 2
        • 📁 A002_0210Z9

Usage

If you're on macOS, ensure that the script is made executable. Navigate to the directory containing the script and type:

chmod +x FF_Video_Transcoder.py

Upon running this script, the terminal prompts the user to provide the paths and select a codec.

It then recreates the date-based folder structure within the Proxy folder and proceeds to transcode each .MP4, .MOV, .MXF, .mp4, .mov, and .mxf video file into .mov format.

Screenshot 2024-06-21 at 16 41 29

The script actively informs you of the video currently being transcoded, providing details on the ongoing process, including the transcoding progress, elapsed time, remaining time, number of frames, speed, and total Progress.

About

Video Production related

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages