Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13981

Trying to choose first audio stream of specific language in ffmpeg using python

$
0
0

I have .mkv files that some of them have more than 1 audio stream in the same language so i need to first map the audio streams with specific language and then use only first of them to output .mp4 file. So it would need two -map audio arguments which doesn't work in ffmpeg.

I found out that i could execute ffmpeg mapping audio with that specific language and then pipe the output to another ffmpeg command that would take the first audio stream from the first ffmpeg command and do the rest of things (scaling, burning-in subtitles, encoding it to different format), but i'm not sure how to pipe that output in python's Popen and if it is even possible in windows.

The solution i found with piping:FFMPEG Pick First Audio Stream of Specific Language


Viewing all articles
Browse latest Browse all 13981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>