Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to add metadata with an ffmetadata file #463

Open
avibrazil opened this issue Dec 19, 2020 · 0 comments · May be fixed by #814
Open

Impossible to add metadata with an ffmetadata file #463

avibrazil opened this issue Dec 19, 2020 · 0 comments · May be fixed by #814

Comments

@avibrazil
Copy link

avibrazil commented Dec 19, 2020

Documentation teaches how to embed metadata using an FFMETADATA file as input. Its basically ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT

On ffmpeg-python would be like this:

                original  = ffmpeg.input("file.mov")
                metadata  = ffmpeg.input("file.ffmetadata")
                    muxer=ffmpeg.output(
                            original,
                            metadata,
                            "output.mov",
                            acodec='copy',
                            vcodec='copy',
                            movflags='faststart+use_metadata_tags',
                            map_metadata=1,
                            **ffmpegFlags
                    )

But this will fail because ffmpeg-python will add a -map 1 parameter here for the ffmetadata input. FFmpeg will complain and fail because input #1 doesn't have streams.

To fix this, ffmpeg-python must not add a -map 1 parameter if input is an FFMETADATA text file. These files must have .ffmetadata extension in order to ffmpeg command to recognize their format, so ffmpeg-python should decide to not add -map 1 based on such file name.

Meanwhile I would appreciate some advice on how to overcome current limitation and use ffmetadata files somehow.

Thank you in advance.

@avibrazil avibrazil changed the title Can't add metadata with an ffmetadata file Impossible to add metadata with an ffmetadata file Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant