View Single Post
Old 18th October 2019, 11:38   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Groucho2004 thing expanded a bit [no idea what "-fflags +genpts" does but I guess you could try add it (timestamps probably)]

Demo.Bat or Demo.Cmd
Code:
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)

setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory (ie same as .bat file dir)
set INDIR="."

REM Where to place output file, No terminating Backslash. "." would be same as .bat file : ".\OUT" = OUT folder in same directory as bat file.
set OUTDIR="D:"

REM Below, can add extensionas as eg *.WMV (SPACE separated)
FOR %%A IN (*.Avi *.mp4) DO (

REM ****** Un-REM ONLY one of below lines *******.
    %FFMPEG% -i "%INDIR%\%%A" -vcodec copy    -acodec copy      "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy      "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM *********************************************.

)

REM ... Above UN-REM'ed lines :
REM      (1) Remux, copy both video and audio   (output MKV).
REM      (2) UtVideo lossless video, copy audio (output MKV).
REM      (3) UtVideo lossless video, PCM audio  (output AVI).

Pause
Not all streams can successfully be encapsulated in all containers.
EDIT: I use 3rd one a lot for Avisynth, avoids lots of fussing about with FFMpegSource and LSmashSource, and [EDIT: Lossless] AVI is pretty much always frame accurate.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 18th October 2019 at 12:01.
StainlessS is offline   Reply With Quote