Video Conversion and Upload


BigicloudTV Video Optimization Tool

 

 

This guide explains how to use the automated video converter to prepare your videos for upload to the BigicloudTV platform. This tool automatically:

  • Resizes video to 720p (HD).
  • Adds your logo to the top right corner.
  • Compresses the video to a strict bitrate (2Mbps total) to ensure smooth streaming.

Part 1: Windows Users

1. Initial Setup (One-Time Only)

The script requires a tool called FFmpeg. Follow these steps carefully:

  1. Click here to download FFmpeg (Windows).
  2. Extract the downloaded ZIP file.
  3. Open your C: Drive (C:\).
  4. Create a new folder named ffmpeg.
  5. Copy the contents of the extracted folder so that the bin folder is located strictly at:
    C:\ffmpeg\bin\
    Verification: You should see the file ffmpeg.exe inside that folder.

2. Create the Script

Open Notepad and copy the code below. Save the file as convert_all.bat (ensure "All Files" is selected in the save dialog so it doesn't end with .txt).

@echo off
setlocal enabledelayedexpansion

REM === Path to ffmpeg ===
set FFMPEG=C:\ffmpeg\bin\ffmpeg.exe
set LOGO=%~dp0logo.png

REM === Encoding settings (Strict ~2Mbps Total Limit) ===
REM Video (1800k) + Audio (128k) + Overhead ~= 2000k Total
set TARGET_BITRATE=1800k
set MAX_BITRATE=1800k
set BUF_SIZE=3600k
set AUDIO_BITRATE=128k

cd /d %~dp0

set OUTPUT=%~dp0converted
if not exist "%OUTPUT%" mkdir "%OUTPUT%"

for %%a in (*.mp4) do (
    echo Processing: %%a

    "%FFMPEG%" -i "%%a" -i "%LOGO%" -filter_complex ^
    "[0:v]scale=1280:720[bg];[1:v]scale=70:-1[logo];[bg][logo]overlay=W-w-40:40" ^
    -c:v h264_nvenc -preset p5 ^
    -profile:v high -level 4.0 -pix_fmt yuv420p ^
    -b:v %TARGET_BITRATE% -maxrate %MAX_BITRATE% -bufsize %BUF_SIZE% ^
    -r 30 -g 60 -keyint_min 60 -sc_threshold 0 ^
    -c:a aac -ar 48000 -b:a %AUDIO_BITRATE% ^
    -movflags +faststart ^
    -y "%OUTPUT%\%%~nxa"
)

echo.
echo Done! BigicloudTV optimized files created.
pause

3. Preparing Your Folder

  1. Create a folder on your Desktop (e.g., "BigicloudTV_Convert").
  2. Place the convert_all.bat file (that you just created) in this folder.
  3. Add Your Logo:
    • Copy your logo image into this folder.
    • Crucial Step: You must rename your logo file to logo.png. The script will only look for a file with this exact name.
  4. Copy all the .mp4 videos you want to convert into this same folder.

4. Running the Converter

  1. Double-click convert_all.bat.
  2. A window will open showing the progress.
  3. Once finished, a new folder named converted will appear containing your BigicloudTV-ready videos.

5. Customization & Troubleshooting

Right-click convert_all.bat and select Edit to change settings.

Changing Resolution (720p to 1080p)
By default, the script outputs 720p. To switch to Full HD (1080p):

  • Find: scale=1280:720
  • Replace with: scale=1920:1080

Switching from GPU to CPU (If the script crashes)
By default, the script uses NVIDIA GPU acceleration. To use standard CPU mode:

  • Find: -c:v h264_nvenc -preset p5 ^
  • Replace with: -c:v libx264 -preset fast ^

Changing Quality (Bitrate)
Find set TARGET_BITRATE=1800k and increase it (e.g., to 3000k) if your BigicloudTV plan supports higher quality.


Part 2: Mac Users

MacOS cannot run .bat files. Please use the script below.

1. Install FFmpeg on Mac

  1. Open the Terminal app.
  2. Install Homebrew if needed, then type: brew install ffmpeg

2. Create the Mac Script

Create a text file named convert_for_bigicloud.sh with the following content:

#!/bin/bash

# Settings for BigicloudTV
TARGET_BITRATE="1800k"
MAX_BITRATE="1800k"
BUF_SIZE="3600k"
AUDIO_BITRATE="128k"
LOGO="logo.png"

# Create output folder
mkdir -p converted

# Loop through all MP4 files
for f in *.mp4; do
    echo "Processing for BigicloudTV: $f"
    
    ffmpeg -i "$f" -i "$LOGO" -filter_complex \
    "[0:v]scale=1280:720[bg];[1:v]scale=70:-1[logo];[bg][logo]overlay=main_w-overlay_w-40:40" \
    -c:v libx264 -preset fast \
    -profile:v high -level 4.0 -pix_fmt yuv420p \
    -b:v $TARGET_BITRATE -maxrate $MAX_BITRATE -bufsize $BUF_SIZE \
    -r 30 -g 60 -keyint_min 60 -sc_threshold 0 \
    -c:a aac -ar 48000 -b:a $AUDIO_BITRATE \
    -movflags +faststart \
    -y "converted/${f%.*}.mp4"
done

echo "Done! BigicloudTV optimized files created."

3. Running on Mac

  1. Put the script, logo.png, and videos in one folder.
  2. Open Terminal, type cd (with a space) and drag the folder into the window. Hit Enter.
  3. Type chmod +x convert_for_bigicloud.sh to make it executable.
  4. Run it by typing ./convert_for_bigicloud.sh
  5. Note: To change resolution on Mac, edit the file and change scale=1280:720 to scale=1920:1080.
  • 0 Os usuários acharam isso útil
Esta resposta foi útil?

Related Articles

How to Manage your channel

Here is the documentation for your **BigicloudTV** customers. This guide covers how to manage...