BlueBubblesApp / bluebubbles-server

Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
https://bluebubbles.app
Apache License 2.0
560 stars 48 forks source link

Sent Videos Are Poor Quality #477

Open CarltonCracker opened 1 year ago

CarltonCracker commented 1 year ago

When sending videos they appear to be recompressed by either iMessage or Bluebubbles to very low bitrates causing significant pixelation. Using FFMPEG to repackage mp4 to mov and with the tag "-tag:v hvc1" prior to sending seems to resolve this issue. Automating this and moving it to the server side would be ideal.

zlshames commented 1 year ago

It's definitely iMessage doing the compressing. I'll look into it

zlshames commented 1 year ago

Apparently avconvert ships with macOS. I'll have to figure out the min version. And how to convert the ffmpeg version of the command to avconvert

https://keith.github.io/xcode-man-pages/avconvert.1.html

Edit: it has existed since macOS 10.7 Edit 2: None of the examples convert from MP4 to mov, so we shall see how successful it is. Also, it doesn't allow tagging like ffmpeg does. However, I assume that using avconvert it basically gets that tag by default.

zlshames commented 1 year ago

@CarltonCracker would u be willing to mess with the avconvert library to see what settings allow uncompressed video sending? That would help save me some time in terms of research

My guess is that using the PresetHEVCHighestQuality flag you'll get a video that won't be compressed. There are also H.264 options which could also keep videos uncompressed but idk

tnvu commented 1 year ago

PresetPassthrough - A preset that passes through the video and audio tracks, without conversion.