Pipeline crashes when video has such properties. Resetting them with FFmpeg fixes the operation:
ffmpeg -i in.mp4 -map 0:v:0 -map 0:a? \
-c:v copy \
-bsf:v "h264_metadata=video_full_range_flag=0:colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1" \
-c:a copy \
out_bt709.mp4