cdgriffith / FastFlix

FastFlix is a free GUI for HEVC and AV1 encoding, GIF/WebP/AVIF creation, and more!
MIT License
1.1k stars 55 forks source link

Cannot set subtitle disposition in 4.0+ #149

Closed msaintauret closed 3 years ago

msaintauret commented 3 years ago

with old 3.4.3 i get :

"ffmpeg.exe" -y -to 5757.5 -i "E:/tmp/x.mkv" -max_muxing_queue_size 8192 -filter_complex "[0:0]scale=1920:-1:flags=lanczos[v]" -map "[v]" -c:v libx265 -pix_fmt yuv420p10le -profile main10 -x265-params "aq-mode=2:repeat-headers=1:hdr10_opt=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50):max-cll=3991,714:hdr10=1" -crf 20 -preset medium -map_chapters 0 -map 0:1 -metadata:s:1 title="TrueHD 5.1" -metadata:s:1 handler="TrueHD 5.1" -metadata:s:1 language=eng -c:1 copy -map 0:2 -metadata:s:2 title="AC3 5.1" -metadata:s:2 handler="AC3 5.1" -metadata:s:2 language=fre -c:2 copy -map 0:4 -c:3 copy -disposition:s:3 default -metadata:s:3 language=fre -map 0:5 -c:4 copy -disposition:s:4 0 -metadata:s:4 language=fre "E:/tmp/x-b7a4.mkv"

and it works.

but with 4.0.3 :

"ffmpeg.exe" -y -to 5757.6 -i "E:/tmp/x.mkv" -max_muxing_queue_size 8192 -filter_complex "[0:0]scale=1920:-8:flags=lanczos[v]" -map "[v]" -c:v libx265 -pix_fmt yuv420p10le -profile main10 -x265-params "aq-mode=2:repeat-headers=1:strong-intra-smoothing=1:bframes=4:b-adapt=2:frame-threads=0:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:hdr10_opt=1:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50):max-cll=3991,714:hdr10=1" -crf 20 -preset medium -map_metadata -1 -map_chapters 0 -map 0:1 -metadata:s:1 title="TrueHD 5.1" -metadata:s:1 handler="TrueHD 5.1" -metadata:s:1 language=eng -c:1 copy -map 0:2 -metadata:s:2 title="AC3 5.1" -metadata:s:2 handler="AC3 5.1" -metadata:s:2 language=fre -c:2 copy -map 0:4 -c:3 copy -disposition:3 'default' -metadata:s:3 language='fre' -map 0:5 -c:4 copy -disposition:4 0 -metadata:s:4 language='fre' "E:/tmp/x.mkv"

and it fail :

[ @ 000000f13f1fe980] [Eval @ 000000f13f1fe100] Undefined constant or missing '(' in ''default''
[ @ 000000f13f1fe980] Unable to parse option value "'default'"
Error initializing output stream 0:3 --
Stream mapping:
  Stream #0:0 (hevc) -> scale
  scale -> Stream #0:0 (libx265)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:4 -> #0:3 (copy)
  Stream #0:5 -> #0:4 (copy)
    Last message repeated 1 times

strange behavior with 4.0.3 :

cdgriffith commented 3 years ago

Looks like in 4.0+ it's incorrectly wrapping the disposition setting in single quotes -disposition:3 'default' whereas that is a keyword for FFmpeg, not a string. Thanks for the report!

cdgriffith commented 3 years ago

to add onto the behavior you are seeing, In 4.x+ the "Standard Profile" will only select English audio / subtitle tracks. You can create a custom profile by setting the stuff you want in the encoder panel then selecting "New Profile" in the top right. It will pop up a window and you can change selection behavior there.

cdgriffith commented 3 years ago

Didn't get a full release out today, but the beta does have the fix in it for now https://github.com/cdgriffith/FastFlix/releases/tag/4.0.4b0

cdgriffith commented 3 years ago

Should be fixed in https://github.com/cdgriffith/FastFlix/releases/tag/4.0.4