adobe / adobe/XMP-Toolkit-SDK

Empty XMP content when passing kXMPFiles_OpenOnlyXMP on video file

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
262
Forks
110
PR merge metrics
No merged PRs in 30d

Description

I'm using [the Rust crate](https://github.com/adobe/xmp-toolkit-rs) to reproduce it, so the following reproduce code is in Rust. I'm still unsure whether this behavior is a bug or expected (It’s also possible that the video file I'm working with is non-standard. I can provide a test file if you'd like).

### Expected Behaviour
xmp content should be read by passing kXMPFiles_OpenOnlyXMP

### Actual Behaviour
with kXMPFiles_OpenOnlyXMP, program returns xmp with empty content (when reading mp4 video files)

### Reproduce Scenario

The input media is a mp4 video file, with only_xmp:
```rust
let mut media_xmp = XmpFile::new()?;
if media_xmp
.open_file(media.clone(), OpenFileOptions::default().only_xmp())
.is_ok()
{
if let Some(xmp) = media_xmp.xmp() {
xmp_string = xmp.to_string_with_options(
ToStringOptions::default().set_newline("\n".to_string()),
)?;
println!("XMP: {}", xmp_string)
}
```

Output

```




























```

without only_xmp:
```rust
let mut media_xmp = XmpFile::new()?;
if media_xmp
.open_file(media.clone(), OpenFileOptions::default().only_xmp())
.is_ok()
{
if let Some(xmp) = media_xmp.xmp() {
xmp_string = xmp.to_string_with_options(
ToStringOptions::default().set_newline("\n".to_string()),
)?;
println!("XMP: {}", xmp_string)
}
```

Output

```
XMP:



2024-06-02T13:11:36Z
2024-06-02T13:11:36Z

20187
1/1000


























```

Contributor guide

Open the contributing guide

Research direction

Start with the Rust reproduction using XmpFile::open_file and OpenFileOptions::only_xmp() against the reported MP4 input, then compare its output with the same call without only_xmp. Confirm the behavior with a representative test video or the author's test file; done means determining whether XMP content should be returned and documenting or reproducing the result in the SDK.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.