summaryrefslogtreecommitdiff
path: root/bin/ffmpeg-embed-cmd
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ffmpeg-embed-cmd')
-rwxr-xr-xbin/ffmpeg-embed-cmd11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/ffmpeg-embed-cmd b/bin/ffmpeg-embed-cmd
new file mode 100755
index 0000000..2cc4c7c
--- /dev/null
+++ b/bin/ffmpeg-embed-cmd
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import subprocess
+import sys
+
+if __name__ == '__main__':
+ ffmpeg_cli = ['ffmpeg'] + sys.argv[1:]
+ if len(ffmpeg_cli) > 1:
+ ffmpeg_str = ' '.join(ffmpeg_cli)
+ ffmpeg_cli[-1:-1] = ['-metadata', f'comment={ffmpeg_str}']
+ subprocess.run(ffmpeg_cli)