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

Crash Happening on mp4 video upload from Google Drive #13692

Closed
rezzap opened this issue Dec 31, 2020 · 8 comments · Fixed by #14114
Closed

Crash Happening on mp4 video upload from Google Drive #13692

rezzap opened this issue Dec 31, 2020 · 8 comments · Fixed by #14114

Comments

@rezzap
Copy link

rezzap commented Dec 31, 2020

Expected behavior

I'd expect that I could be able to upload any types of video to my site.

Actual behavior

When I try to upload an mp4 video from Google Drive, the app crashes.

Steps to reproduce the behavior

Note: A large video (~130mb) produced this crash, but I tried a similar video (~180mb) and failed to reproduce. Smaller videos (5-10mb) also failed to reproduce this crash.

  1. Take a video in mp4 format and upload it to your Google Drive. I used a video that I downloaded from the users site and imported to Google Drive online.
  2. From the Android app, go to My Site | tap Profile icon | App Settings | turn ON the Optimize Videos toggle.
  3. Start a new post and select the video block.
  4. Click 'Add Video' and select Choose from device. Use the file icon to select files from My Drive.
  5. Select the mp4 video you previously uploaded, during the upload the app crashes.

This can also be reproduced from the Media Library:

  1. From the Android app, go to My Site | Media |
  2. Tap the + button and Choose from device
  3. Select the video uploaded to Google Drive
  4. The app will crash after a few moments
Tested on Samsung S9+, Android 10, WPAndroid 16.4-rc-2

User reported this in 3610843-zen

Found the crash report and added a link to it in the ticket details.

@guarani
Copy link
Contributor

guarani commented Dec 31, 2020

Edited issue to add some more details we've discovered.

@guarani
Copy link
Contributor

guarani commented Dec 31, 2020

Just a quick note: Other large mp4s didn't reproduce the bug. I ran the offending mp4 through a command that supposedly checks for errors in an mp4 file, e.g:

ffmpeg -v error -i ~/Desktop/example.mp4 -f null - 2>error.log

and did get some errors (which I don't see in non-offending mp4s):

[null @ 0x7fc91700b400] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 800 >= 800

So I wouldn't rule out this particular mp4 as being broken in some way.

@hypest
Copy link
Contributor

hypest commented Jan 4, 2021

cc @frosty, anyone closer to the media consolidation project that can have a look?

@frosty
Copy link
Contributor

frosty commented Jan 5, 2021

@develric Has been having a look into this today, but no luck on reproducing yet.

@designsimply
Copy link
Contributor

I tested this today using WPAndroid 16.5-rc-1 on Pixel 3 Android 11 and I was able to successfully upload mp4 videos from Google Drive into a video block while following the testing steps provided if I used my own mp4 videos from my Pixel 3 device, a ~20MB mp4 video file and an ~80MB mp4 file. (3m9s, 3m12s)

Similar to others' reports, I was able to replicate the crash if I used the sample mp4 file provided by the user. What a strange case!

@develric is it possible the problem raised in this issue is only happening for malformed video files and in that case would it be possible to return some kind of helpful error message —or— is there a way to fix this in the m4m external library we are currently using for video compression (which you mentioned in internal reference p4a5px-2GN-p2#comment-11694)?

@develric
Copy link
Contributor

develric commented Jan 13, 2021

@designsimply thanks to loop back the internal discussion here 🙇 !

is there a way to fix this in the m4m external library we are currently using for video compression

Yep, I was able to complete the upload succesfully with a modification to the m4m lib. Opened a PR in the m4m repo reporting what we found in the analysis so far, hoping it could be reviewed and accepted by the repo owners soon. Also that makes sense a part from this specific issue to be sure it does not create other possible issues I think.

I would see how long it takes to get a feedback there (can check it let's say middle next week) and eventually we can explore other containment actions; chatting with @planarvoid he was also suggesting, since it seems a pretty edge case also happening with specific video(s), that we can avoid the compression in those rare cases (not sure how to best notify or offer to the user to upload without compression in that case but we can think about it I guess).

Let me know wdyt 🙇‍♂️.

@designsimply
Copy link
Contributor

I see. Yes. I agree it's edge case and also want to push for the best error messages possible in such known edge cases because it can help both users and our support team ❤️ thank you so much for the update! +1 from me to offer a fallback or at least a helpful error message with a suggestion for the user to turn off compression if that is possible. 😊

@designsimply
Copy link
Contributor

Quick follow-up to say that I asked the user who originally reported the problem with video uploads from their Pixel 4a 5G into a post whether they had modified the video in any way and they said they did not.

I shot the video with all the default settings on my new phone. I did not edit it, and simply attempted to insert the video into my blog as I had done many times before. This was the first time using video recorded from my new phone.

3644499-zen Jan 13, 2021 14:18

Just noting this for reference with an ask for any additional user reports to be added in subsequent comments with similar info about what (if anything) they did to modify the video before the upload attempt. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants