Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Videos with the HEVC encoding are not able to send over iMessage (also possible BT.601 error on Catalina) #1

Open
sabogalc opened this issue May 3, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@sabogalc
Copy link

sabogalc commented May 3, 2021

EDIT - After some testing, Tagavari was able to send a BT.601 video over AirMessage on both 10.13 High Sierra and 11.0 Big Sur. I was able to send the same video over AirMessage on 10.14 Mojave. u/aayyyyyyyyyyyy is not able to send the video through their AirMessage server, which is running on Catalina in a KVM. I am not saying that there is no issue with the BT.601 color profile, but it definitely needs more investigation. In the meantime, I did face quite a few problems with HEVC when performing these tests. Below is my original comment on this issue.

The BT.709 color profile is supported by iMessage, however. Below is some ffmpeg code that transcodes the unsupported videos to the supported profile.

-c:v libx264 -q:v 5 -c:a copy -ab 192k -ar 44100 -crf 15 -color_primaries bt709 -color_trc bt709 -colorspace bt709

Credit where credit is due, taken from u/aayyyyyyyyyyyy at > https://www.reddit.com/r/AirMessage/comments/n3y1ia/cause_for_why_some_videos_fail_to_send/

@sabogalc sabogalc changed the title Videos with the BT.601 color profile are not able to send over iMessage [Bug] Videos with the BT.601 color profile are not able to send over iMessage May 3, 2021
@tagavari tagavari added the bug Something isn't working label May 3, 2021
@sabogalc
Copy link
Author

sabogalc commented May 3, 2021

EDIT - The bug in this comment is due to u/aayyyyyyyyyyyy turning on HEVC for their videos. It has nothing to do with the color profile.

This is a very interesting bug. u/aayyyyyyyyyyyy gave a sample video that I will attach below. It's even buggy in the GitHub video player depending on your OS — for me it works on iOS, but it doesn't work on Windows, macOS, or Android. I will describe all of the problems that I observed with this video.

AirMessage.BT.601.mp4

Firstly, there was no thumbnail/preview image in my Windows file explorer for this video
image
and when I attempted to play it, I was prompted to purchase a new codec for HEVC (despite the fact that the video has a .mp4 extension)
Doesn't Play on Windows

To summarize my test, I sent the same video file through various iMessage forwarding apps, and in all cases, the video was delivered to the person I was sending it to. However, when sent through AirMessage Android and BlueBubbles Android, the video was not playable on iOS or macOS. I am unable to test AirMessage Web because I am not signed up for AirMessage Cloud.

To give a more detailed description of my test, I sent the video through the following apps (in this order)

  1. WebMessage (Windows)
  2. SMServer (PWA)
  3. MyMessage (PWA)
  4. BlueBubbles (Windows)
  5. BlueBubbles (Android)
  6. AirMessage (Android)

These are the results of the test.
WebMessage Results
In WebMessage, the video sent fine and was perfectly playable on the receiver's end, but it showed up as an audio file from the WebMessage app, which @EricRabil described here.

SMServer Results
SMServer had the same results as WebMessage, and it also played the video from WebMessage as an audio file.

MyMessage.Attempt.mp4

MyMessage was similar to WebMessage and SMServer, with the only difference being that attaching the video also seemed a bit buggy. The video was able to be attached/queued with no problems in any of the other apps. LIke SMServer, MyMessage also showed the previous two copies of the video as audio files. The MyMessage video also shows their current issue 35, but that is not related to this test.

BlueBubbles Desktop Results
BlueBubbles Desktop was very similar to WebMessage and SMServer, with the exception that it was able to play the earlier videos as regular videos, likely due to BlueBubbles's use of ffmpeg. It was only its own video that had the audio file bug.

BlueBubbles Android 1
BlueBubbles Android appeared to work with no problems when looking at the video from the Android app, but when checking it in WebMessage
BlueBubbles Android in WebMessage
or BlueBubbles Desktop
BlueBubbles Android in BlueBubbles Desktop
or iOS
BlueBubbles Android on iOS
or macOS
Screen Shot 2021-05-03 at 7 46 12 PM
it becomes clear that there are in fact some problems with this video.

Screen_Recording_20210503-192216_AirMessage.mp4

AirMessage behaved the exact same as BlueBubbles Android (I could attach images from other apps if needed, but I feel like it would be redundant).

Overall, this is a very interesting bug, and not one that I'm sure can be solved. It might even be worth reporting this bug to Apple themselves at either this link or this link. Or, perhaps Google/GCam are to blame, and the bug should be reported to them, I'm not sure. Since this bug affects all the apps, I will tag the other developers to hopefully hear their thoughts on it, or at least let them know that it is happening. @sgtaziz, @iandwelker, @zlshames.

@tagavari
Copy link
Member

tagavari commented May 4, 2021

Hmm, this is strange. I can send that video file from AirMessage on my Android phone, and have it play properly across macOS and iOS.

However, I notice the file on receiving devices is not the same as the one I send. I copied the file from a Mac that didn't send the file, and saw that it was converted automatically to airmessage.mov with a color profile of the more common BT.709.

Screen Shot 2021-05-03 at 8 28 23 PM

Does the same thing happen for you, or are your devices receiving the original BT.601 video file?

@sabogalc
Copy link
Author

sabogalc commented May 4, 2021

This is how the video sent from AirMessage shows up on my Mac. Is there another thing I need to inspect to get more details on it? I right clicked the video file and selected "Get Info". None of the closed menus gave any valuable information.
Screen Shot 2021-05-04 at 12 13 34 PM
Also, u/aayyyyyyyyyyyy left this comment yesterday

I totally forgot that I just recently turned on hevc for videos after I figured all of this out and it didn't matter. Here's a regular non hevc h264 video
https://drive.google.com/file/d/1Bcp5SBRBo2CJE0fxa4xYny-zRF2EUxXW/view?usp=drivesdk
That should explain the compatibility issue you're having

So I will reconduct my test with the new video that they provided.

@tagavari
Copy link
Member

tagavari commented May 4, 2021

I opened up the file in QuickTime Player and then hit ⌘ I to open up the inspector. Under Video Details you can see the color information.

The new video file that u/aayyyyyyyyyyyy uploaded worked exactly the same as the first one for me. No issues sending, but it gets converted to .mov on receiving devices. I also find it strange that your file got .mpeg appended to the end of it.

@sabogalc
Copy link
Author

sabogalc commented May 4, 2021

Opening the file gave me this Converting... progress bar, but it never advanced from its starting point.
Screen Shot 2021-05-04 at 12 58 29 PM
The inspector did not give me much information either, unfortunately.
Screen Shot 2021-05-04 at 12 58 26 PM

@sabogalc
Copy link
Author

sabogalc commented May 5, 2021

I reconducted this test with the updated video supplied by u/aayyyyyyyyyyyy in their comment

I totally forgot that I just recently turned on hevc for videos after I figured all of this out and it didn't matter. Here's a regular non hevc h264 video
https://drive.google.com/file/d/1Bcp5SBRBo2CJE0fxa4xYny-zRF2EUxXW/view?usp=drivesdk
That should explain the compatibility issue you're having

I found no errors when sending this video (maybe Google Drive automatically corrects the color profile before I can download the video? Is there any way to verify the color profile of my copy of the video?).

The reason I said "problems" instead of "errors" when sending it from AirMessage was because I had an error (-1) when downloading my message history from AirMessage, so I wasn't able to check my previous messages and verify that I was using the same phrasing. I receive that error when I send or receive a new message while my messages are syncing. The reason I sent twice on AirMessage was because after my (-1) error, I was briefly disconnected from my server, and the video did not go through (however, this has nothing to do with the color profile bug).

RPReplay_Final1620253304.mp4

This is what I was able to get from my Mac.
Screen Shot 2021-05-05 at 6 30 37 PM

@sabogalc sabogalc changed the title [Bug] Videos with the BT.601 color profile are not able to send over iMessage [Bug] Videos with the HEVC encoding are not able to send over iMessage (also possible BT.601 error on Catalina) May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@tagavari @sabogalc and others