littleblank / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

MP4SetChapters causes file to not play on Apple TV V2 #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I use MP4SetChapters to set the chapter information.  If I try to set a 
different number that what exists in the file, when I play it in iTunes it 
doesn't show the new chapter information.  Also (and I've just heard this from 
my users as I don't have an ATV V2) the file will not play on the ATV V2.

I have some code from a program called Drax that does seem to set the chapter 
information correctly, if that would help.

Dan

Original issue reported on code.google.com by danahins...@gmail.com on 7 Dec 2010 at 8:41

GoogleCodeExporter commented 8 years ago
I found an issue when editing file from EyeTV. It looks like that app adds a 
font name at the end of the text track sample description, but mp4v2 does not 
know how to handle it and removes it.
I resolved the problem by copying the same handling of pascal strings from the 
hdlr atom.

Original comment by damiog on 18 Dec 2010 at 10:57

Attachments:

GoogleCodeExporter commented 8 years ago
I applied this diff, then rebuilt libmp4v2.dll and it won't even open an m4v 
file with this patch.  

The issue you found, did it cause the file to play on an original Apple TV, but 
not on version 2?

The other symptom of this problem is that the chapter information displays 
differently in iTunes that when you use the MP4V2 API to get it.

Original comment by danahins...@gmail.com on 18 Dec 2010 at 4:39

GoogleCodeExporter commented 8 years ago
Weird, it works here.
Yes the issue causes the file to not play on the new appletv.

Your other issue might be utf-16, mp4v2 can read only utf-8 from the chapter 
track.

Original comment by damiog on 18 Dec 2010 at 6:33

GoogleCodeExporter commented 8 years ago
I'll try the diff again and see if I can make it work.

I define my text as char*, so I'm thinking utf-8 isn't an issue?  I must admit 
this is an area that I've always been confused about.  I call a C++ function 
from VB passing in a string, and declare it in the C++ routine as char **.  I 
checked and C++ has sizeof(char) as 1.

Any light you could shed would be most appreciated.

Dan

Original comment by danahins...@gmail.com on 18 Dec 2010 at 8:54

GoogleCodeExporter commented 8 years ago
UTF8 is variable length, so although you use char* for UTF8, it doesn't mean 
that a single character is one byte (UTF8 is variable length, between 1 and 4 
bytes; ASCII values are conveniently 1 bytes).  I'm assuming you mean VB.NET; 
.NET stores strings internally as UTF16, so you'd actually have to do a 
conversion to UTF8 before passing a string from VB to native code.

This can get pretty messy; here's a decent primer:

http://www.codeproject.com/KB/cs/pinvokeStringMarshaling.aspx

Original comment by kid...@gmail.com on 29 Jan 2011 at 4:33