ffmpeg-python
ffmpeg-python copied to clipboard
How to use dump_attachment with ffmpeg-python?
I would like to extract the following "stream" and I found out that attachments can be dumped to a file using the dump_attachment argument.
Stream #0:3: Attachment: none
Metadata:
filename : calibration.json
mimetype : application/octet-stream
K4A_CALIBRATION_FILE: calibration.json
The command itself would look like this, which seems not possible to construct in ffmpeg-python, because the -dump_attachment:t:0 "" has to be before the input. And also colons (:) are not allowed in variables (yes there would be a workaround with dictionaries).
ffmpeg -dump_attachment:t:0 "" -i test.mkv
I couldn't find any other issue about dump_attachment. And yes, of course I could just run a subprocess with the correct command, but still. Also, it would be interesting, if there is a way using ffmpeg to extract attachments as octet-stream instead of dumping them to a file and read them again.
"Also, it would be interesting, if there is a way using ffmpeg to extract attachments as octet-stream instead of dumping them to a file and read them again."
did you figure out a solution for this?
@SnowSquire Not really, I am still using the temp file solution.