mp4 files not automatically detected #30

Closed
opened 2026-01-29 16:33:16 +00:00 by claunia · 6 comments
Owner

Originally created by @anshul1912 on GitHub (Jul 7, 2014).

history: discussion regarding this started https://github.com/CCExtractor/ccextractor/pull/58/files#r14395363

Originally created by @anshul1912 on GitHub (Jul 7, 2014). history: discussion regarding this started https://github.com/CCExtractor/ccextractor/pull/58/files#r14395363
Author
Owner

@Akirato commented on GitHub (Mar 8, 2015):

Is the issue that the mp4 is not always detected with the method right now?
In that case, File Signatures can be used. If the binary file contains "ftyp" (like ...ftyp) then it is "mp4".
Try string file.mp4 | grep "ftyp"
"ftyp" is mp4's file signature.

@Akirato commented on GitHub (Mar 8, 2015): Is the issue that the mp4 is not always detected with the method right now? In that case, File Signatures can be used. If the binary file contains "ftyp" (like ...ftyp) then it is "mp4". Try string file.mp4 | grep "ftyp" "ftyp" is mp4's file signature.
Author
Owner

@cfsmp3 commented on GitHub (Mar 8, 2015):

On Sun, Mar 8, 2015 at 4:07 PM, Nurendra Choudhary <notifications@github.com

wrote:

Is the issue that the mp4 is not always detected with the method right now?
In that case, File Signatures can be used. If the binary file contains
"ftyp" (like ...ftyp) then it is "mp4".
Try string file.mp4 | grep "ftyp"
"ftyp" is mp4's file signature.

It's not that simple... the mp4 can contain different box headers, ftyp is
not guaranteed at all to be at the beginning of the file. In general, the
thing is that there's a conflict and that other types are matching because
mp4 does (in the code). Changing the detection order that alters the misses
but doesn't solve them completely.

@cfsmp3 commented on GitHub (Mar 8, 2015): On Sun, Mar 8, 2015 at 4:07 PM, Nurendra Choudhary <notifications@github.com > wrote: > > Is the issue that the mp4 is not always detected with the method right now? > In that case, File Signatures can be used. If the binary file contains > "ftyp" (like ...ftyp) then it is "mp4". > Try string file.mp4 | grep "ftyp" > "ftyp" is mp4's file signature. > > It's not that simple... the mp4 can contain different box headers, ftyp is > not guaranteed at all to be at the beginning of the file. In general, the > thing is that there's a conflict and that other types are matching because > mp4 does (in the code). Changing the detection order that alters the misses > but doesn't solve them completely.
Author
Owner

@Akirato commented on GitHub (Mar 9, 2015):

This is the order right now: ASF,WTV,HEX,RCWT,TS,PS,MP4 ( https://github.com/CCExtractor/ccextractor/pull/58/files#r14395363 )
I think bash command "file {file.name}" can be used. This will just decide the file type directly.
Thus, there would not be any need for an order.

@Akirato commented on GitHub (Mar 9, 2015): This is the order right now: ASF,WTV,HEX,RCWT,TS,PS,MP4 ( https://github.com/CCExtractor/ccextractor/pull/58/files#r14395363 ) I think bash command "file {file.name}" can be used. This will just decide the file type directly. Thus, there would not be any need for an order.
Author
Owner

@cfsmp3 commented on GitHub (Mar 9, 2015):

On Mon, Mar 9, 2015 at 6:15 AM, Nurendra Choudhary <notifications@github.com

wrote:

I think bash command "file " can be used. This will just decide the file
type directly.

We cannot rely on any external program. First because CCExtractor is
portable and there's no "file" in Windows. Second, because we need to know
what's going on. Why would you think "file" is more reliable than
CCExtractor? Most likely if you run it in all our samples there will be
some problems too.

@cfsmp3 commented on GitHub (Mar 9, 2015): On Mon, Mar 9, 2015 at 6:15 AM, Nurendra Choudhary <notifications@github.com > wrote: > > I think bash command "file " can be used. This will just decide the file > type directly. > > We cannot rely on any external program. First because CCExtractor is > portable and there's no "file" in Windows. Second, because we need to know > what's going on. Why would you think "file" is more reliable than > CCExtractor? Most likely if you run it in all our samples there will be > some problems too.
Author
Owner

@Akirato commented on GitHub (Mar 10, 2015):

Hey, what I actually meant by using "file" was to use its algorithm but I found out that this too depended upon the signatures. So, its of no use :( . Sorry for suggesting it.
Is this https://drive.google.com/file/d/0B_8j_IupNoCtOWdmVUtvTkwtSWM/view?usp=sharing the mp4 file mentioned in https://github.com/CCExtractor/ccextractor/pull/58/files#r14395363
CCExtractor does detect it as MP4 file. Can you provide a sample for this issue?
I checked out that issue and according to it the problem is the ctx->stream_mode gets PS and so it cannot get MP4. I also saw that a similar thing is happening with "TiVo", right. So, can the MP4 be handled in the same way as TiVo.

@Akirato commented on GitHub (Mar 10, 2015): Hey, what I actually meant by using "file" was to use its algorithm but I found out that this too depended upon the signatures. So, its of no use :( . Sorry for suggesting it. Is this https://drive.google.com/file/d/0B_8j_IupNoCtOWdmVUtvTkwtSWM/view?usp=sharing the mp4 file mentioned in https://github.com/CCExtractor/ccextractor/pull/58/files#r14395363 CCExtractor does detect it as MP4 file. Can you provide a sample for this issue? I checked out that issue and according to it the problem is the ctx->stream_mode gets PS and so it cannot get MP4. I also saw that a similar thing is happening with "TiVo", right. So, can the MP4 be handled in the same way as TiVo.
Author
Owner

@cfsmp3 commented on GitHub (Apr 8, 2015):

I've given MP4 detection priority over PS. Both detections are weak (there just need to be a match of a 4 byte sequence somewhere close to the beginning of the file) and could use improvement (for example count the number of possible mp4 boxes vs possible PACK headers), but let's see how this works for now.

@cfsmp3 commented on GitHub (Apr 8, 2015): I've given MP4 detection priority over PS. Both detections are weak (there just need to be a match of a 4 byte sequence somewhere close to the beginning of the file) and could use improvement (for example count the number of possible mp4 boxes vs possible PACK headers), but let's see how this works for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#30