Closed slajar closed 9 years ago
I found now that no audiotrac is decoding. Even a plain wav file gives "Audio track contains no audio frames". It seems that libav is compiled without audio. May that be possible?
Well, I though it might be a bug in the new version and I went back to 2.20. Unfortunately, it is the same there. So, I am sure it must be an issue in my code.
Well, after hours of research I managed to compile version 2.20 on VS2008 :) After that I could debug through the code and I found that I needed to index much more to get audio buffers: This solved my initial problem:
FFMS_Index *FI = FFMS_DoIndexing(FIdx, -1, 0, GenAudioFilename, NULL, IgnoreErrors, UpdateProgress, &Progress, &ErrorInfo);
I am not sure if DoIndexing2 should do this also internally. "-1" was the solution for IndexMask.
This is documented behavior and something users of the avisynth plugin are also familiar with. It is this way because audio often causes issues and most users only want video. Not a bug.
Well, I don't see where it is documented https://github.com/FFMS/ffms2/blob/master/doc/ffms2-api.md#ffms_doindexing2---indexes-the-file-represented-by-an-indexer-object says nothing about that it is not intended to use for Audio.
ohh, I see :)
quite offtopic, but I am not sure where to ask (is there a mailing list?). I ported libavresample to swresample with a preprocessor switch like WITH_AVRESAMPLE. Are patches excepted?
Useful patches are accepted. Mailing lists are for losers. All communication is done on IRC in #darkhold on Rizon.
I found the latest ffms2 sdk and it can be used from vs2008 even it is compiled with 2015 :) Well, I build a very very small example (command line and 32 bit) to test the decoding qualities of ffms2. Actually, I get a VideoSource from an ordinary mp4 file. The AudioSource is always NULL and the ErrorInfo says: ErrorInfo {ErrorType=1 SubType=27 BufferSize=-858993460 ...} FFMS_ErrorInfo
AFAIK, error type 1 is something wrong with indexing and 27 is invalid parameter. Well, there are not much parameters. SrcFile works with Video, atrack is 1 (in my own ffmpeg tests it is also 1 for this file), FI is also working for VideoSource and I tried all three possibilities for the delay (FFMS_DELAY_NO_SHIFT, FFMS_DELAY_TIME_ZERO and FFMS_DELAY_FIRST_VIDEO_TRACK)
FFMS_Init(0, 1); FFMS_ErrorInfo ErrorInfo; FFMS_Indexer FIdx = FFMS_CreateIndexerWithDemuxer(SrcFile, FFMS_SOURCE_DEFAULT, &ErrorInfo); FFMS_SetAudioNameCallback(FIdx, GenAudioFilename, NULL); FFMS_SetProgressCallback(FIdx, UpdateProgress, &Progress); const char Name = FFMS_GetCodecNameI(FIdx, 0);
Any idea?
I tried also a MPG file, becuase I was not sure if the AAC decoder is enabled in your ffmpeg build. Same problem there.