gnomecast
gnomecast copied to clipboard
Fix unnecessary audio transcoding
When I tried to prepare a video so that no transcoding was necessary, I noticed
this was impossible, even if I used exactly the same ffmpeg call gnomecast was
using. I chased this down to an or that probably should have been an and:
we want to transcode if we have an unsupported audio format and we can't play
the embedded audio stream.
Thanks a lot for this project!
I also had to fix the line above when trying to play bare mp3 files:
self.transcode_video = force_video or (self.video_stream and not self.can_play_video_codec(video_stream.codec))
self.transcode_audio = force_audio or (self.audio_stream and all(stream.codec not in AUDIO_EXTS for stream in fmd.audio_streams)) or not self.can_play_audio_stream(self.audio_stream)
self.transcode = transcode_container or ((self.transcode_video or self.transcode_audio) and transcode_container)
Still didn't manage to get it working tho