I am trying to batch convert a number of recordings from media portal. My intent is to use watch them on a stand alone cheap set top box.
I've set up a script that goes through all my recordings, and transcodes them. However, because of the way they are recorded, I get the voice over stream (NAR) rather than the English (ENG) stream, as the NAR is the first audio stream.
I could use the "-map" option, but depending on which channel the programme was originally recorded, the stream is in a different place; for example, Channel 5 has the right track in Stream 2, but BBC has it in Stream 4.... and it seems to vary between SD and HD recordings.
Is there an easy way to tell FFMPEG which audio stream to use based on stream name (i.e. ENG) or codec (AC3)?
... or do I need to build into my script some logic of if BBC then use stream X, if Channel 4, use stream Y.
Example of my FFMPEG command line:
ffmpeg.exe" -i "recorded TV.ts" -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 25 -g 15 -s 624x352 -b 2500k -bt 300k -acodec mp2 -ac 2 -ab 192k -ar 44100 -async 1 -y -f vob "output.mpg"
Thanks
Richard.
I've set up a script that goes through all my recordings, and transcodes them. However, because of the way they are recorded, I get the voice over stream (NAR) rather than the English (ENG) stream, as the NAR is the first audio stream.
I could use the "-map" option, but depending on which channel the programme was originally recorded, the stream is in a different place; for example, Channel 5 has the right track in Stream 2, but BBC has it in Stream 4.... and it seems to vary between SD and HD recordings.
Is there an easy way to tell FFMPEG which audio stream to use based on stream name (i.e. ENG) or codec (AC3)?
... or do I need to build into my script some logic of if BBC then use stream X, if Channel 4, use stream Y.
Example of my FFMPEG command line:
ffmpeg.exe" -i "recorded TV.ts" -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 25 -g 15 -s 624x352 -b 2500k -bt 300k -acodec mp2 -ac 2 -ab 192k -ar 44100 -async 1 -y -f vob "output.mpg"
Thanks
Richard.