GroupDocs.Metadata for Python via .NET

Modify Metadata in Flv Files with Python

Edit metadata across common document, image, and multimedia formats. Perform key operations like reading, updating, and removing metadata with ease.

How to Edit Metadata in FLV Files Using Python

With GroupDocs.Metadata for Python via .NET, Python developers can update metadata in FLV files by following these simple steps:

  1. Load the FLV file using the Metadata class.
  2. Define a condition to filter the metadata you want to change.
  3. Apply the filter and set the new value.
  4. Save the updated FLV file to disk.
# Change the creation date of a FLV file
import groupdocs.metadata as gm

def run():
    
    with gm.Metadata("input.flv") as metadata:

        # Set the rules to find which metadata to update
        specification = gm.search.ContainsTagSpecification(gm.tagging.Tags.time.created).
            either(gm.search.ContainsTagSpecification(gm.tagging.Tags.time.modified))

        # Assign a new value to the selected property
        now = datetime.now()
        property_value = gm.common.PropertyValue(now)
        
        # Update the file's creation timestamp
        affected = metadata.set_properties(specification, property_value)
        print(f"Properties set: {affected}")

        # Save the updated FLV file
        metadata.save("output.flv")
pip install groupdocs-metadata-net
click to copy
copied
More examples Documentation

Edit Metadata in FLV Files with Python

With GroupDocs.Metadata, you can easily manage document metadata in your Python apps. Add, change, search, or remove metadata programmatically.

Tools for Metadata Editing

Simple Metadata Handling

GroupDocs.Metadata lets you easily add, edit, or delete metadata fields in your Python applications.

Full Control Over Metadata

Use the API to find, view, and modify hidden data stored in various business file formats.

Use Built-in FLV Tags

Access and work with existing metadata like EXIF tags in images, including info such as camera type, dimensions, or date taken.

Edit MP3 Metadata: Update Lyrics

This sample shows how to change metadata in an MP3 file, including lyrics and custom fields.

Python

import groupdocs.metadata as gm
import  groupdocs.metadata.formats.audio as gmfa

def run():

    #  Open the file using Metadata
    with gm.Metadata("input.mp3") as metadata:

        root = cast(gmfa.MP3RootPackage, metadata.get_root_package())

        if root.lyrics_3v2 is None:
            root.lyrics_3v2 = gmfa.LyricsTag()

        # Modify the lyrics tag
        root.lyrics_3v2.lyrics = "[00:01]Test lyrics"
        root.lyrics_3v2.artist = "test artist"
        root.lyrics_3v2.album = "test album"
        root.lyrics_3v2.track = "test track"

        # Add any custom metadata fields as needed
        root.lyrics_3v2.set(gmfa.LyricsField("ABC", "custom value"))

        # Save the changes to the file
        metadata.save("output.mp3")

About the GroupDocs.Metadata for Python via .NET API

GroupDocs.Metadata for Python via .NET provides powerful tools for managing metadata in Python. It lets you read, update, delete, search, compare, and export metadata from files without needing extra software. Use the API to work with metadata in PDFs, Microsoft Office documents, Outlook emails, Visio diagrams, AutoCAD drawings, archives, and media files. Easily integrate flexible metadata features into any GroupDocs.Metadata application.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Metadata for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Edit Metadata in Other File Types

A cross-format metadata editing API for Python. Supports metadata handling for many popular document and image types as shown below.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English