forked from ofthelit/Mime-Detective
-
Notifications
You must be signed in to change notification settings - Fork 9
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
mp4 #33
Comments
The library works by attempting to read file headers out of the actual file. MPEG files usually have a decent enough file header for the library to match against. However, it looks like you're on an apple device... Which can get weird as they're not consistent with their mp4 headers.
Do you have a test file that repros this or the first 560 bytes of a file?
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: rdcs <[email protected]>
Sent: Tuesday, May 21, 2019 10:11:40 AM
To: clarkis117/Mime-Detective
Cc: Subscribed
Subject: [clarkis117/Mime-Detective] mp4 (#33)
I have used your tool very successfully, however, my code returns a null in the following when an mp4 is tested:
(The filePath extension is mp4)
NSUrl videoFileURL = NSUrl.FromString(filePath);
Uri uri = new Uri(videoFileURL.ToString());
StreamReader streamReader = new StreamReader(filePath);
FileInfo fileInfo = new FileInfo(filePath);
Stream stream = streamReader.BaseStream;
FileType fileType = MimeDetective.FileInfoExtensions.GetFileType(fileInfo);
(The fileType here is null)
This code works fine for .mov files (quicktime) but fails with mp4. Please let me know if I am using it incorrectly for these type of files or if there is actually an issue.
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fclarkis117%2FMime-Detective%2Fissues%2F33%3Femail_source%3Dnotifications%26email_token%3DAA6DNQVYKDPS4HIZ56BPX23PWP7JZA5CNFSM4HOLM7P2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GU7HOCQ&data=02%7C01%7C%7C5c313cf06c004a0cc51808d6ddf63f4e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636940447020033731&sdata=vzGWRAIqC2FvqocW32rhypzW5ZtW2dXc8DTMCg04rKc%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA6DNQUHKYLGAM5FNABHWTLPWP7JZANCNFSM4HOLM7PQ&data=02%7C01%7C%7C5c313cf06c004a0cc51808d6ddf63f4e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636940447020043735&sdata=qDQmUiEakYln4FKogdVarn2ZHc9qmGCS8kfRjYPlTW8%3D&reserved=0>.
|
Thanks for the quick response! Yes, it’s running on IOS in in app I’m writing. I can send you the file and the code I wrote is shown in my text. Let me know if you would like me to send it.
Bob
…Sent from my iPhone
On May 21, 2019, at 12:41 PM, Joshua Clark ***@***.***> wrote:
The library works by attempting to read file headers out of the actual file. MPEG files usually have a decent enough file header for the library to match against. However, it looks like you're on an apple device... Which can get weird as they're not consistent with their mp4 headers.
Do you have a test file that repros this or the first 560 bytes of a file?
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: rdcs ***@***.***>
Sent: Tuesday, May 21, 2019 10:11:40 AM
To: clarkis117/Mime-Detective
Cc: Subscribed
Subject: [clarkis117/Mime-Detective] mp4 (#33)
I have used your tool very successfully, however, my code returns a null in the following when an mp4 is tested:
(The filePath extension is mp4)
NSUrl videoFileURL = NSUrl.FromString(filePath);
Uri uri = new Uri(videoFileURL.ToString());
StreamReader streamReader = new StreamReader(filePath);
FileInfo fileInfo = new FileInfo(filePath);
Stream stream = streamReader.BaseStream;
FileType fileType = MimeDetective.FileInfoExtensions.GetFileType(fileInfo);
(The fileType here is null)
This code works fine for .mov files (quicktime) but fails with mp4. Please let me know if I am using it incorrectly for these type of files or if there is actually an issue.
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fclarkis117%2FMime-Detective%2Fissues%2F33%3Femail_source%3Dnotifications%26email_token%3DAA6DNQVYKDPS4HIZ56BPX23PWP7JZA5CNFSM4HOLM7P2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GU7HOCQ&data=02%7C01%7C%7C5c313cf06c004a0cc51808d6ddf63f4e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636940447020033731&sdata=vzGWRAIqC2FvqocW32rhypzW5ZtW2dXc8DTMCg04rKc%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA6DNQUHKYLGAM5FNABHWTLPWP7JZANCNFSM4HOLM7PQ&data=02%7C01%7C%7C5c313cf06c004a0cc51808d6ddf63f4e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636940447020043735&sdata=qDQmUiEakYln4FKogdVarn2ZHc9qmGCS8kfRjYPlTW8%3D&reserved=0>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have used your tool very successfully, however, my code returns a null in the following when an mp4 is tested:
(The filePath extension is mp4)
NSUrl videoFileURL = NSUrl.FromString(filePath);
Uri uri = new Uri(videoFileURL.ToString());
StreamReader streamReader = new StreamReader(filePath);
FileInfo fileInfo = new FileInfo(filePath);
(The fileType here is null)
This code works fine for .mov files (quicktime) but fails with mp4. Please let me know if I am using it incorrectly for these type of files or if there is actually an issue.
Thanks!
The text was updated successfully, but these errors were encountered: