Question / Help Batch file to convert FLV -> MP4

Defiasen

Member
I forget where on this website, but someone gave me this script for converting FLV into mp4 files:

Code:
@echo off
set ffpath="D:\Stream Applications\FFmpeg\bin\ffmpeg.exe"
set outpath="D:\Stream Applications\Video Archive\Streamed\MP4\%~n1.mp4"
:start
if not exist %outpath% (
%ffpath% -i "%~f1" -c copy -copyts %outpath%
)
shift
if not [%1]==[] GOTO start

However, I seem to be running into something and I'm not sure if it will have an effect on anything. First off, I stream at 48 fps. However, the batch file script seems to detect it as 50 fps and converts it into a 50 fps file. Even when I upload it to Youtube it's saying it's 720p50fps but my older files I uploaded say 720p48fps. I'm wondering if that 2 extra FPS detected might have some sort of VOD quality problems?
 
Code:
@echo off
:start
set ffpath="D:\Stream Applications\FFmpeg\bin\ffmpeg.exe"
set outpath="D:\Stream Applications\Video Archive\Streamed\MP4\%~n1.mp4"
if not exist %outpath% (
%ffpath% -i "%~f1" -c copy -copyts %outpath%
)
shift
if not [%1]==[] GOTO start

Just a quick heads up I've noticed that the batch file had some silly bugs in it and have posted a fixed version both in the guide thread and above. (start moved above both "sets" for aesthetic purpose, can just place it above the output set)

I just tried recording a 48 FPS video and both the original and the converted file were at the correct rate in every media editor/player I had. After uploading to YouTube it still maintained that rate.

Funny enough the more I look into it the more it looks like that the "FPS" in ffmpeg's console is the average frame rate and the number we actually want to look at is the tbr. Not sure why your videos sometimes end up as 50fps, if you can upload a small sample (the flv) to a site like Dropbox so that we can poke around.
 
Code:
@echo off
:start
set ffpath="D:\Stream Applications\FFmpeg\bin\ffmpeg.exe"
set outpath="D:\Stream Applications\Video Archive\Streamed\MP4\%~n1.mp4"
if not exist %outpath% (
%ffpath% -i "%~f1" -c copy -copyts %outpath%
)
shift
if not [%1]==[] GOTO start

Just a quick heads up I've noticed that the batch file had some silly bugs in it and have posted a fixed version both in the guide thread and above. (start moved above both "sets" for aesthetic purpose, can just place it above the output set)

I just tried recording a 48 FPS video and both the original and the converted file were at the correct rate in every media editor/player I had. After uploading to YouTube it still maintained that rate.

Funny enough the more I look into it the more it looks like that the "FPS" in ffmpeg's console is the average frame rate and the number we actually want to look at is the tbr. Not sure why your videos sometimes end up as 50fps, if you can upload a small sample (the flv) to a site like Dropbox so that we can poke around.
I don't have a drop-box account. Would mediafire work?
 
Back
Top