Batch conversion with FFmpeg prepares video files for later upload to YouTube; it does not send a live stream. On Windows, the safe approach is to keep source files and converted files in separate folders, test one file, then run a loop that processes only the source folder.
The settings below are YouTube upload recommendations, not India-specific requirements and not a complete guide to YouTube Live ingest. You can use the resulting files in a live-channel workflow later, but conversion and broadcasting are separate jobs.
Conversion and live streaming are different jobs
FFmpeg can read a video, change its codecs or container, and write a new file. A batch file can repeat that operation for every eligible file in a folder. Neither action connects to YouTube Live or publishes a broadcast. It leaves you with local files to review and upload.
A live stream instead sends a real-time audio-video feed to YouTube, usually from an encoder or a service configured for a live event. If you intend to loop prerecorded material in a live channel, you still need a separate live-streaming method. The FFmpeg guide to looping one video on YouTube Live covers that different task; do not treat the conversion commands here as a substitute for it.
This distinction matters when planning a 24/7 channel. You may convert a folder in advance, check each output, and then upload files or use them in a separate broadcast workflow. A file that plays correctly on your computer is not evidence that a live encoder is configured, that YouTube has accepted a live stream, or that a channel will remain online.
The rest of this guide focuses on an uncomplicated SDR upload target: MP4 with H.264 video and compatible audio. YouTube’s upload encoding recommendations are the primary reference for the profile. Confirm the page again before a large batch, because platform guidance can change and the recommendation does not ensure a particular playback result.
Install and verify FFmpeg on Windows
Obtain an FFmpeg build from a source you trust, then make the ffmpeg.exe program available in your Windows command shell. One common arrangement is to extract the build and add its bin directory to the Windows PATH. Another is to call ffmpeg.exe by its full path in each command. The second avoids changing PATH but makes the command longer.
Open Command Prompt and run:
ffmpeg -version
If Windows reports that ffmpeg is not recognised, either PATH does not include the folder containing ffmpeg.exe, or you need to invoke the executable by full path. For example, if it is in C:\Tools\ffmpeg\bin, try:
"C:\Tools\ffmpeg\bin\ffmpeg.exe" -version
The version output confirms that the shell can start FFmpeg; it does not prove that every encoder you might want is included. To see available encoders, run ffmpeg -encoders and look for libx264 if you plan to use the H.264 example below. FFmpeg’s command-line documentation explains its input, output and stream options. Different Windows builds can expose different components, so check your own build rather than assuming an encoder is present.
Use a current, reputable build and keep the executable path stable while a batch job is running. If you update or move it later, retest your command. You do not need to install a graphical editor to perform the examples in this article, though a player or media-inspection tool is useful for checking results.
Prepare input and separate output folders
Create a working layout with one folder for untouched originals and another for converted files. For example:
D:\Channel\incoming\
D:\Channel\youtube-ready\
Put only the files you intend to process in incoming. Keep the outputs in youtube-ready, outside the input folder. The batch loop later uses a wildcard over the input folder and writes a corresponding MP4 into the output folder. If the output directory is inside the input directory, or if you point the loop at a folder containing its own results, a later run may pick up earlier outputs and encode them again.
Retain originals until you have checked the converted files and uploaded the right versions. Re-encoding a lossy source can reduce quality, and converting an already converted output again can add another lossy generation. A separate output directory also makes it easier to compare an output with its source and to remove failed test files without risking the original.
Windows paths often include spaces. Quote full paths passed as command arguments, as in "D:\Channel\incoming\morning programme.mp4". In a .bat file, the loop variable uses a single percent sign, such as %F; in a command typed directly into an interactive Command Prompt loop, it uses a double percent sign, such as %%F in the batch file convention? To avoid ambiguity, use the examples here only in a saved .bat file: their %%F spelling is for a batch file, while interactive prompt syntax differs. The FFmpeg utilities documentation notes that shell escaping can require an additional layer. CMD has its own quoting and special-character rules, so test names containing spaces and do not casually add filters with shell-sensitive punctuation.
Before starting, list the input files and check that you can open them. If a folder mixes unrelated files, use a controlled set of extensions in the loop rather than a wildcard for every file type. A video extension alone does not guarantee that the streams inside use codecs suitable for a particular output.
Choose output settings for upload
YouTube’s current upload guidance recommends an MP4 container and H.264 video, with progressive scan, High Profile, two consecutive B frames, a closed GOP with GOP length half the frame rate, CABAC, variable bitrate, and 4:2:0 chroma subsampling. For audio it lists AAC-LC and Opus among supported options, and recommends a 48 kHz sample rate. Treat that list as platform guidance rather than a guarantee that every source can be transformed into the ideal profile without trade-offs.
For straightforward SDR material, a practical starting command uses MP4, H.264 via libx264, AAC audio, and -movflags +faststart. Fast Start places MP4 index information at the front of the file, which is useful for playback and is part of YouTube’s recommendations. The example uses a quality-oriented x264 setting rather than setting a fixed video bitrate. Your file size and encode time depend on the source, settings and machine; do not assume a particular speed.
YouTube advises encoding and uploading at the frame rate at which the footage was recorded. It lists 24, 25, 30, 48, 50 and 60 fps as common rates, while saying other frame rates are acceptable. Avoid forcing every source to 30 fps just to make files look consistent. Likewise, do not resize everything to 16:9: the standard computer aspect ratio is 16:9, but the player adapts to vertical and square video too. Preserve the intended composition unless you have a reason to change it.
For SDR, YouTube recommends BT.709. Its upload table recommends 1080p at 8 Mbps for standard frame rate and 12 Mbps for high frame rate; 720p at 5 Mbps and 7.5 Mbps; and 2160p at 35–45 Mbps and 53–68 Mbps, respectively. These are YouTube recommendations, not minimums, India-specific network rules, or guarantees of viewer quality. YouTube lists SDR audio recommendations separately: 384 kbps for stereo, 128 kbps for mono, and 512 kbps for 5.1. Do not mistake audio bitrate for video bitrate. The figures here are attributed to YouTube’s guidance as accessed in 2026; the page does not state a publication year.
| Choice | Useful when | Trade-off |
|---|---|---|
| Re-encode with H.264 and AAC | You need a consistent upload-oriented output from varied sources | Takes time and may introduce another lossy generation |
Copy streams with -c copy |
Source streams are already compatible with the target container and platform | Does not change codecs or repair an unsuitable stream; compatibility must be checked |
| Preserve source dimensions and frame rate | The source is already suitable and you want to avoid unnecessary changes | Outputs may not all share identical technical properties |
| Resize or change frame rate | You have a deliberate delivery or editing reason | Can change framing or motion and may lower quality |
FFmpeg transcodes streams by default when you specify encoders; stream copy with -c copy avoids re-encoding, but only works when the streams suit the chosen container and destination. The FFmpeg documentation on stream handling describes the distinction. Multiple audio tracks, subtitles, variable frame rate, HDR, interlacing or unusual codecs can require a more deliberate command. For interlaced footage, YouTube says to deinterlace before upload; it gives 1080i60 to 1080p30 as an example. Do not apply a generic filter to all inputs without knowing what they contain.
Run a one-file test
Make a small test before writing a loop. In Command Prompt, substitute the actual paths and a real input filename:
ffmpeg -i "D:\Channel\incoming\sample.mp4" -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -c:a aac -ar 48000 -b:a 192k -movflags +faststart "D:\Channel\youtube-ready\sample.mp4"
This is an illustrative starting point for a typical SDR file, not a universal profile. It asks FFmpeg to encode video with x264, produce 4:2:0 pixel format, encode audio as AAC at 48 kHz, and write an MP4 with Fast Start. The chosen CRF is a quality-control setting, not a YouTube bitrate recommendation. If your input is HDR, has multiple audio tracks, has no audio, uses an unusual frame rate, or has interlaced video, pause and adapt the command rather than assuming this example preserves everything appropriately.
Watch the test from beginning to end if it is short, or inspect representative sections if it is long. Check that the picture is not stretched, the audio is present and in sync, the duration is right, and the output opens in a normal player. Compare file size and visible quality with the source. A test that looks acceptable locally is a first check, not proof that YouTube processing will accept every aspect of it.
If the command reports an encoder error, check ffmpeg -encoders and the exact spelling of the encoder. If it reports an output or stream error, inspect the input with FFmpeg’s informational output and consider whether the source has extra tracks or an unsupported combination. Do not solve an unexplained error by applying more options blindly; identify which stream or property is causing it first.
Batch convert files safely
Once the one-file result is acceptable, save the following as a .bat file, for example convert-folder.bat. Change the two folder paths to match your own layout. This version processes MP4 files only, writes to a distinct output directory, and does not recurse into subfolders.
@echo off
setlocal
set "IN=D:\Channel\incoming"
set "OUT=D:\Channel\youtube-ready"
if not exist "%OUT%" mkdir "%OUT%"
for %%F in ("%IN%\*.mp4") do (
if exist "%%~fF" (
echo Converting: %%~nxF
ffmpeg -i "%%~fF" -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -c:a aac -ar 48000 -b:a 192k -movflags +faststart "%OUT%\%%~nF.mp4"
)
)
echo Finished.
endlocal
The double-percent loop variable is required in a saved batch file. %%~fF expands to the full input path and %%~nF to its base name. The quotation marks keep ordinary spaces in file and directory names together as one argument. The output is always written under youtube-ready, not alongside the source, so the wildcard over incoming cannot see the generated files on a later run.
The sample only looks for .mp4 inputs. If you also have .mov files, add a second loop using that extension or prepare a separate input folder and adapt the pattern. Do not use a broad all-files wildcard unless you are sure every matching file is a supported media input. For names with CMD metacharacters or unusual Unicode characters, test one such file separately first; shell parsing can complicate quoting beyond ordinary spaces.
On a rerun, existing output files may be overwritten. Keep a copy of anything you need, or choose a new output folder for a fresh run. If you need to preserve completed files and skip those already present, add an explicit existence check for each destination and decide how you will identify incomplete outputs. A failed encode can leave a partial file, so the mere presence of an MP4 is not proof that conversion finished successfully.
A command prompt loop is not a substitute for the .bat example: interactive CMD uses a different percent-sign form for loop variables. You can use PowerShell instead, but its quoting and wildcard behaviour differ, and a CMD batch script should not be pasted into it unchanged. For a small folder, running a saved .bat file is easier to repeat and inspect.
If some files need different handling, split them into groups rather than force a single profile onto them. For example, an SDR collection with one frame rate can be tested together, while interlaced or HDR sources are held aside for individual review. Stream copy may be appropriate for a compatible source if you want to avoid a further lossy encode, but it is not interchangeable with transcoding. Hardware encoding is also an optional route only if your installed FFmpeg build and PC expose a suitable encoder; do not assume it is available or faster on every machine.
Check outputs before YouTube upload
Open each output, not only the first one. A batch can finish while one input has produced an incomplete, silent or incorrectly framed result. Confirm that the duration and audio are plausible, the file is playable, and the picture has not been unintentionally cropped or stretched. For a large set, review every result at least enough to catch a wrong filename, blank output or missing audio; use deeper inspection for unusual sources.
Then upload a representative test file privately or otherwise in the visibility state appropriate to your channel and check YouTube’s processing result before committing the full folder. Confirm the picture, audio, aspect ratio and available resolutions after processing. This tests the file and platform handling, not your separate live setup. YouTube’s official upload troubleshooting guidance is a useful place to check if an upload or processing issue appears.
Keep names informative and stable. A simple pattern such as morning-bhajan-01.mp4 is easier to match against an upload list than a set of generic names like output1.mp4. Avoid renaming originals until you have mapped each output to its source. When a filename contains spaces and is later used in a live playlist, the shell and playlist syntax can raise a separate problem; see this FFmpeg playlist filename example for that live-workflow issue.
For a recurring channel, make the conversion folder a preparation stage with a simple record of which source produced which output and whether it passed review. Do not use the converted folder as an uncontrolled archive of everything you have ever made. That makes it harder to catch accidental re-encoding and to tell which version you intend to upload. If your next task is keeping a broadcast alive after a disconnect, that is a separate operational concern; the auto-restart guide for a 24/7 YouTube stream addresses a different part of the workflow.
Conversion can leave you with a tidy set of upload-ready files, but a person or a separate tool still has to send them to YouTube. When the pain is specifically keeping a prerecorded broadcast running without leaving your Windows computer on, StreamNeo takes an uploaded video and runs it as a YouTube live stream after you provide your stream key; conversion with FFmpeg remains a separate file-preparation step.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Does batch conversion start a YouTube live stream?
No. It creates local output files, usually for later upload. You need a separate live encoder or service and a configured YouTube live event to broadcast.
Should I convert every file to MP4 and H.264?
That is a practical target for many straightforward SDR uploads, and it aligns with YouTube’s upload recommendations. Do not blindly force it on HDR, interlaced, multi-track or otherwise unusual sources; inspect them and test the result first.
Can I use -c copy to make conversion faster?
Stream copy avoids decoding and re-encoding, so it avoids another lossy encode, but it does not change the streams. Use it only when the existing codecs and container are suitable for the destination, then check the output.
Do the bitrate recommendations apply specifically to India?
No. The cited figures are YouTube’s general upload recommendations, not India-specific broadband or live-streaming rules. Choose settings based on your source and intended upload, and check YouTube’s current official guidance before processing a large library.