Skip to content

Conversation

@grantnegri
Copy link

@grantnegri grantnegri commented Dec 13, 2023

Fixes /issues/463.

Check if the stream name has already been specified as a metadata stream. there are no guarantees that the user has done this correctly.

@grantnegri grantnegri changed the title add basic metadata file support [kkroening/ffmpeg-python/issues/463] add basic metadata file support Dec 13, 2023
@matracey
Copy link

matracey commented Apr 7, 2025

@kkroening Is this library still actively maintained? My use case involves manipulating file metadata, which is currently broken due to the issue outlined in #463. This PR appears to be relatively small in size, so is it possible to review and merge?

AlexStansfield pushed a commit to AlexStansfield/audible-sync that referenced this pull request Nov 18, 2025
The ffmpeg-python library has a known bug that prevents map_metadata and
map_chapters from working correctly. Since the fix hasn't been merged in
over 2 years, we're switching to subprocess exclusively.

## Issue

ffmpeg-python doesn't properly handle -map_metadata and -map_chapters
parameters. When passed as kwargs, they don't get translated to the
correct FFmpeg command-line arguments.

Issue: kkroening/ffmpeg-python#463
PR (unmerged): kkroening/ffmpeg-python#814

## Changes

### Simplified decrypt_aaxc()
- Removed ffmpeg-python implementation attempt
- Removed fallback pattern (_decrypt_aaxc_subprocess helper)
- Now uses subprocess directly for all decryption
- Added comment explaining why we don't use ffmpeg-python
- Cleaner, simpler code with no hybrid approach needed

### Updated imports
- Removed ffmpeg import from src/downloader.py
- Removed ffmpeg-python from requirements.txt

## Benefits

1. **Reliable**: Subprocess approach is proven to work
2. **Simpler**: No fallback logic, no hybrid approach
3. **Maintainable**: Direct FFmpeg command construction is easier to debug
4. **Cleaner dependencies**: One less package to maintain

The subprocess implementation gives us precise control over the FFmpeg
command and handles all our use cases correctly (metadata, chapters,
cover art embedding).
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 this pull request may close these issues.

Impossible to add metadata with an ffmetadata file

2 participants