IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

Abbreviations: (will be specified by moderators/administrators)

 
Reply to this topicStart new topic
> [AF] "MovieDataOffset" in MP4 files saved with MP3Tag
Spider099
post Oct 4 2017, 19:57
Post #1


Member


Group: Full Members
Posts: 11
Joined: 20-March 17
Member No.: 23209
Mp3tag Version: 2.84c



I am experiencing a problem with files (MP4) that have been saved from MP3Tag after adding Metadata Tags to the file e.g. Title, Genre etc.

The issue is that when a modified file is played via the Emby for Android app - the libvlc library miss interprets the file and errors out - without any useful info other than it thinks its reached the end of the file. If i play the original file it plays without issue. So something in a MP3Tag edited file is causing it to have a problem. This is not just one file but affects a large number all having been modified by MP3Tag over the last few months.

It appears when comparing the original file with the modified file that the only difference is the MovieDataOffset value changes e.g. from 48 to 1510979 which if this value is bytes is a large jump when i only modified the Title Tag field. Mp3Tag appears to add about 4k to the file size if it has no metadata initially and you add some which is fine to make space for Tags.

I have tested this with numerous files and any modified with MP3Tag will not play properly - the original files play fine.

Any help or suggestion welcome.

Go to the top of the page
 
+Quote Post
ohrenkino
post Oct 4 2017, 21:13
Post #2


Member


Group: Full Members
Posts: 9125
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.84d



There has been a thread where actually the file size got increased (and I was a little off-track):
https://forums.mp3tag.de/index.php?showtopic=22429
Perhaps this is something similar.


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
Spider099
post Oct 8 2017, 01:12
Post #3


Member


Group: Full Members
Posts: 11
Joined: 20-March 17
Member No.: 23209
Mp3tag Version: 2.84c



Hmm Maybe - but its not the filesize that changes (other than first edit>save adds 4k) but the offset of where the data starts that appears off to me and is possibly confusing the android player.

The files play fine on other players e.g. in Chrome so the files are not corrupt as implied in the post you linked too.

If i run a video back thought handbrake after editing in MP3tag it "corrects" the issue and it plays fine via the Emby Android app without transcoding.

So if its not the media offset then its something else that MP3Tag is doing thats causing the issue.

As i have thousands of files edited by MP3Tag running them back through handbrake is not an option.
Go to the top of the page
 
+Quote Post
Florian
post Oct 10 2017, 15:12
Post #4


Developer


Group: Admin
Posts: 8079
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.84d



I'm not aware of the "MovieDataOffset" value. How did you determine the offset change?

Kind regards
– Florian


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
Spider099
post Oct 11 2017, 08:45
Post #5


Member


Group: Full Members
Posts: 11
Joined: 20-March 17
Member No.: 23209
Mp3tag Version: 2.84c



Hi

I used ExifTool to extract the metadata of the files into a easy readable text format.

Attached File  Test6.txt ( 3.64K ) Number of downloads: 11


Attached File  Test7.txt ( 3.64K ) Number of downloads: 8


Test7 is straight from Handbrake and has not been edited by Mp3Tag

Test6 has been edited by Mp3Tag - you will note the last two lines in the text file have "moved" from near the top of the file - see Test7 and the MovieDataOffset has changed. which is expected but the number looks too large to me.

This is the only obvious change to the test6 file i can find that causes issues when trying to play via the android libvlc library. There maybe something else i am missing but once edited and saved in mp3tag the file does not get treated the same by the library - Test7 direct plays and Test6 get transcoded as it has issues reading the file.

Go to the top of the page
 
+Quote Post
Florian
post Oct 12 2017, 11:41
Post #6


Developer


Group: Admin
Posts: 8079
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.84d



Can you try "Optimize MP4" on that file via the right-click menu in Mp3tag and see whether this makes the file readable again?

Kind regards
– Florian


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post
Spider099
post Oct 13 2017, 01:51
Post #7


Member


Group: Full Members
Posts: 11
Joined: 20-March 17
Member No.: 23209
Mp3tag Version: 2.84c



Hi

Tried the optimise option and unfortunately this appeared to have no effect other than the media offset value did change a bit

Attached File  Test8.txt ( 3.64K ) Number of downloads: 7
Go to the top of the page
 
+Quote Post
Florian
post Oct 14 2017, 13:49
Post #8


Developer


Group: Admin
Posts: 8079
Joined: 12-December 01
From: Germany, Dresden
Member No.: 203
Mp3tag Version: 2.84d



I did some further research on this issue and it seems that the "MovieDataOffset" you're referring to is simply the byte offset of the mdat atom in the MP4 file. This atom contains the movie data and is located before the moov atom (the movie metadata) in the initial file that is working for you.

After editing the file with Mp3tag (adding tags and maybe also cover data) the moov atom is moved near the beginning of the file (right after the ftyp atom). This is recommended so that streaming applications can display tag information without needing to seek throughout the movie data.

I've also had a look at the current libvlc source code and couldn't find an issue in this regard.

Can you as the Emby people to have a look at this? Maybe they're using a really old version of libvlc, I'm really out of ideas at this point.

Kind regards
– Florian


--------------------
♫ If you like using Mp3tag please donate to support further development.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 17:41