petrkotek / chromecastize

Bash script to convert video files into Google Chromecast supported format.
MIT License
178 stars 34 forks source link

Commandline options requests: threads number and audio track selection for ffmpeg #69

Open SanZamoyski opened 2 years ago

SanZamoyski commented 2 years ago

Hi!

I have two cores, I'd like to use those for transcoding: https://superuser.com/questions/155305/how-many-threads-does-ffmpeg-use-by-default Also I have multiple audio video and I'd like to convert only one of those, can You add option to select audio track to convert? https://superuser.com/questions/639402/convert-specific-video-and-audio-track-only-with-ffmpeg

Thank You, great tool!

SanZamoyski commented 2 years ago

I think I succeed by modifying the script a bit. In line $FFMPEG -loglevel error -stats -i "$FILENAME" -map 0 -scodec copy -vcodec "$OUTPUT_VCODEC" -acodec "$OUTPUT_ACODEC" ... I've added to map ":v", so in base it does convert only video: $FFMPEG -loglevel error -stats -i "$FILENAME" -map 0:v -scodec copy -vcodec "$OUTPUT_VCODEC" -acodec "$OUTPUT_ACODEC"...

and by config I've added/modified:

DEFAULT_ACODEC=aac
DEFAULT_ACODEC_OPTS="-map 0:m:language:eng -ac 2 -b:a 192k"

...so there is aac@192k audio, forced stereo and converts only english.