Help for "Error: Truncated sample table for track3"

Started by jamiboi, February 02, 2022, 09:07:47 AM

Previous topic - Next topic

jamiboi

    I am trying to find a way to loop through both jpg and video (mp4/mov) files in a directory and change their metadata date tags to match the earliest date found in the metadata. I have used the two related approaches outlined here:

    https://exiftool.org/forum/index.php?topic=7986.0
    https://exiftool.org/forum/index.php?topic=9686.0


    They both work fine when running "-FileCreateDate<OldestDateTime"  or "-FileCreateDate<MyDate" in terminal. However if I try and change one of the other tags such as "CreateDate<MyDate" or "MediaCreateDate<MyDate" I receive the error "Error: Truncated sample table for track3". How can I amend this?

    I have attached the config files and and example of the exif data for one of my sample videos. Any help would be greatly appreciated!


    I am using windows 10 with ExifTool v12.39
    p.s. Is it possible for one of the date fields to show a date from before a video or image was taken?

StarGeek

Quote from: jamiboi on February 02, 2022, 09:07:47 AM
They both work fine when running "-FileCreateDate<OldestDateTime"  or "-FileCreateDate<MyDate" in terminal.

These work fine because they do not edit the actual file, only the file system properties.

QuoteHowever if I try and change one of the other tags such as "CreateDate<MyDate" or "MediaCreateDate<MyDate" I receive the error "Error: Truncated sample table for track3". How can I amend this?

These tags are embedded in the file and the file itself must be edited.  Unfortunately, this error means there's a problem with the structure of the video, such that exiftool does not think it can safely edit the file.

You might try remuxing the file with a program such as ffmpeg.  I believe this command would copy all streams and not recompress them
ffmpeg -i input.mp4 -map 0 -c copy output.mp4

This should copy over the Quicktime metadata, but non-standard metadata, such as embedded EXIF data, would be lost.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

jamiboi

Thank you very much for your time!

I tested the code and it only seems to turn this error on files that have been compressed using Shrinkwrap;  a docker container which uses exiftool to carry over  metadata from the original video to the compressed video,  https://hub.docker.com/r/bennetimo/shrinkwrap .

The code used was:

docker run -v "Directory path":/vids bennetimo/shrinkwrap \ -i MOV --ffmpeg-opts crf=24,preset=medium/vids

is there some reason why this procedure might be producing the video-structure problems you referred to?

Thanks again.


StarGeek

I would have no idea regarding Shrinkwrap.  Though it would be odd for an error to creep in since it appears to use ffmpeg.

I would try and see what version of exiftool and ffmpeg it is using and try to update them if needed.  Otherwise, try the command I listed above.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Can you send me one of the videos that produces this error so I can take a closer look?  My email is philharvey66 at gmail.com

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jamiboi


Phil Harvey

I got the sample.  I have seen one file like this before (in this thread) nearly 3 years ago, but the problem was thought to be a corrupt file and the issue was never resolved.  (Unlike your sample, that file didn't even play properly.)

The MP4 specification is very convoluted, and not very clear about this, but it really seems from the specification as if these files are written incorrectly.  They both have "url " tracks with an empty sample description entry, although they both have a count of 1 for the number of entries.

Since I have seen another file like this, I will patch ExifTool to handle this case, and just assume a default data reference index (of 1) for the missing entry.  This will allow ExifTool 12.40 (when released) to write files like this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

wismalrawi

I'm having issues with some .mp4 files. Is it possible to send you a sample to analyze?
I just registered for that. This may help other people plus help fix my problem.
Error: Truncated 'M)\x7f\xea' atom - c:/Users/Wisam/Downloads/1904/01/VID-20211203-WA0028.mp4
Error: Truncated '0xc8e2d2e1' atom - c:/Users/Wisam/Downloads/1904/01/VID-20211203-WA0029.mp4
Error: Truncated '7\xb4\xd6P' atom - c:/Users/Wisam/Downloads/1904/01/VID-20211203-WA0030.mp4
Error: Truncated '0x90ff58a1' atom - c:/Users/Wisam/Downloads/1904/01/VID-20211203-WA0031.mp4
Error: Truncated '0xd803f278' atom - c:/Users/Wisam/Downloads/1904/01/VID-20211203-WA0032.mp4
Error: Truncated '0x02a20000' atom - c:/Users/Wisam/Downloads/1904/01/VID-20220314-WA0040.mp4
Error: Truncated '0x00010000' atom - c:/Users/Wisam/Downloads/1904/01/VID-20220314-WA0042.mp4
Error: Truncated '0x02160000' atom - c:/Users/Wisam/Downloads/1904/01/VID-20220519-WA0008.mp4
Error: Truncated '0x02150000' atom - c:/Users/Wisam/Downloads/1904/01/VID-20220519-WA0009.mp4

Warning: [minor] No media data - c:/Users/Wisam/Downloads/1904/01/2021-02-13 09-06-00.mp4

Error: End of processing at large atom (LargeFileSupport not enabled) - c:/Users/Wisam/Downloads/1904/01/2021-02-13 09-06-00.mp4


StarGeek

Quote from: wismalrawi on September 07, 2022, 08:22:52 AMError: End of processing at large atom (LargeFileSupport not enabled) - c:/Users/Wisam/Downloads/1904/01/2021-02-13 09-06-00.mp4

What version of exiftool are you using? Run this command to see
exiftool -ver

The LargeFileSupport error means you need to add the -api LargeFileSupport option to the command, but the rest would probably require Phil's attention.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wismalrawi

12.44

Thank you. I will try that. I have a bunch of videos that I cannot use the file name as a timestamp.
Warning: [minor] Patched incorrect time zero for QuickTime date/time tag - c:/users/wisam/downloads/1904/folder 03/VID-20220617-WA0092.mp4

Phil Harvey

Sure.  Send me a sample and I'll take a look.  My mail is philharvey66 at gmail.com

Be sure to include a link to this thread in the email.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).