Log in

View Full Version : Error initializing audio stream output size


MysteryX
14th November 2015, 05:52
I'm trying to open a video with AviSource with the audio.

First I convert to AVI with this command
ffmpeg -i "Source.mpg" -vcodec utvideo "Preview.avi"

Then I open in AviSynth with this command
AviSource("Preview.avi", audio=false, pixel_type="YV12")

I get this error: Error initializing audio stream output size.

What's wrong, and how do I fix it?

creaothceann
14th November 2015, 11:14
You could open the AVI file in VirtualDub, disable the audio stream, and save the file to another AVI.

raffriff42
14th November 2015, 13:31
Try disabling audio at the source:
ffmpeg -i "Source.mpg" -vcodec utvideo -an "Preview.avi"
(not sure what ffmpeg does when no audio codec is specified, but default is probably 'copy')

The error message is coming from 'VD_Audio.cpp' BTW, so I would expect VirtualDub to raise a similar complaint with this source.

StainlessS
14th November 2015, 17:35
You might be better off letting ffmpeg convert audio to PCM, I use this a lot


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 dir .bat file)
set INDIR="."


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


FOR %%A IN (*.vob *.wmv *.mpg *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.y4m *.yuv *.webm) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

)

Pause


As configured, use ffmpeg at "C:\BIN\ffmpeg.exe", Input video files from same directory as BAT file, output to root of "D:" drive,
video Ut_Video, Audio PCM.

EDIT: You can add more input file types to the "FOR %%" line. (so long as ffmpeg knows what they are of course)

MysteryX
14th November 2015, 19:19
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

That works, thanks!