Skip to content

Commit

Permalink
Only map video, audio, & subtitle during default convert
Browse files Browse the repository at this point in the history
  • Loading branch information
raydouglass committed May 18, 2024
1 parent 392c16a commit a5597ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion media_management_scripts/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ def convert_with_config(
args.extend(["-c:s", "copy"])

if not mappings:
args.extend(["-map", "0"])
if metadata.video_streams:
args.extend(["-map", "0:v"])
if metadata.audio_streams:
args.extend(["-map", "0:a"])
if metadata.subtitle_streams:
args.extend(["-map", "0:s"])
else:
for m in mappings:
if type(m) == int:
Expand Down

0 comments on commit a5597ee

Please sign in to comment.