ffmpeg gives me the following error for some videos.
Could not find tag for codec timed_id3 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
I pass this command:
command = [
'ffmpeg',
'-hide_banner',
'-loglevel', 'panic',
'-i', input_file,
'-vf', "scale='trunc(oh*a/2)*2:480'",
'-c:a', 'copy',
'-c:v', 'libx264',
'-c:s', 'mov_text',
'-scodec', 'srt',
'-map', '0',
'-map', '-0:a:1',
'-map', '-0:a:2',
output_file,
]
I already know that this issue related to -map
argument but I use it for a reason.
The reason: I want to encode all videos into 480p by:
- Keeping all embedded subtitles
- Keeping English or First audio track
May you please help me to perform that?