Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of bounds issue #92

Open
hassanrazakhalid opened this issue Jan 12, 2019 · 3 comments
Open

Out of bounds issue #92

hassanrazakhalid opened this issue Jan 12, 2019 · 3 comments

Comments

@hassanrazakhalid
Copy link

hi i just tried this.
the code im using 1.1.0.1 in dotnet core

var inputFile = new MediaFile { Filename = temp_path };

                //var engine = new engine();
                using (var engine = new Engine("/Volumes/Data/hardstone_projects/xtheia_2.2/xtheiaWeb/ffmpeg.exe"))
                {
                    engine.GetMetadata(inputFile);
                }
                var duration = inputFile.Metadata.Duration;

But i am getting expection
Index was out of range. Must be non-negative and less than the size of the collection.\nParameter name: index
Please help

@it14118
Copy link

it14118 commented Jan 21, 2019

Greetings, could you provide more details? It seems that in the first line of code you are providing Filename is not defined.

@mustelan
Copy link

mustelan commented Feb 7, 2019

I have the same exception. I analyzed code and I suppose that line:

throw new Exception(
                        this.FFmpegProcess.ExitCode + ": " + receivedMessagesLog[1] + receivedMessagesLog[0],
                        caughtException);

in

private void StartFFmpegProcess(EngineParameters engineParameters)
can be problematic.

In my opinion there is a chance that:

List<string> receivedMessagesLog = new List<string>();

has no elements (or has only one element) and there is not possible to build exception message correctly.
To sum up - a main exception can be hidden by a negligible exception.

@hassanrazakhalid
Copy link
Author

I tried TagLib with exact same path... It is working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants