deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.46k stars 93 forks source link

Pixel 6 Pro 4k 60 FPS video doesn't play correctly #118

Closed petazonk closed 2 years ago

petazonk commented 2 years ago

Describe the bug When trying to play a video, recorded on the P6Pro, the video stutters and has incorrect colours. Aves reports the video format as HEVC (H.265) 3840 pixels at 60 FPS.

To Reproduce Click on video thumbnail and then press play.

Expected behavior I expect the video to play normally.

Screenshots Probably not needed.

System information and logs: No errors are being shown.

Additional context Further to this I had trouble playing a video recorded on a Pixel 3 as well. It was 4k video at 30FPS. But, another video recorded at 1024 x 768 seemed to play fine. The videos play fine using either Google Photos or Gallery Go. It seems to be related to 4k videos not playing properly on the P6Pro.

deckerst commented 2 years ago

Aren't these HDR videos? The color issue is a telltale sign... HDR videos are not currently supported by the video library used by Aves.

If they are not HDR, maybe it's purely a performance issue. By curiosity, when you tap and hide the overlay, do you notice less stuttering? The overlay blur effect has an impact on performance, so maybe this is the culprit.

For context, Gallery Go and Google Photos use the native video codecs bundled with your phone. Upsides are that 1) these codecs provide the best performance for this particular device, 2) they support advance features (like HDR) that may be used by the videos shot on that device. The downside is that these codecs do not cover ancient or exotic videos.

Aves does not use the native video codecs, but instead rely on FFmpeg library via the fijkplayer player. The upside is that it can support a large range of codecs. The downside is that it is not finely tuned to your particular device. The latest version of FFmpeg does support HDR, but I'm currently stuck with an older version because of the intermediate fijkplayer player.

Using the latest FFmpeg version may solve this, but investigating this may take some serious time and effort, so it's low priority at the moment.

petazonk commented 2 years ago

The interesting thing is that I'm looking at some Pixel 3 videos on my Pixel 6 Pro and they stutter or drops frames. The sound comes through fine. But, the same videos plays fine on my Pixel 3. So, I'm not sure what is going on here? The overlay being hidden also doesn't make any difference. Lastly, VLC plays the videos fine as well but maybe that uses native codecs?

deckerst commented 2 years ago

The fact that the same video was playing fine with Aves on your older device is puzzling... I also tried to play some UHD/4K videos on my phone (a Samsung S10e), and they played fine. Even a heavier 4K video with a >70Mb/s bitrate, still fine.

My initial diagnostic about performance is likely wrong. It's still true that Aves can't properly render the colours of HDR videos, though.

Could you follow the instructions in About > Bug Report, and attach here the environment info and the logs? By the way, aren't you already using Android 12 on the Pixel 6 Pro? Also, if you can, would you mind sharing one of the videos that stutter? (by email if you prefer)

As for VLC, they use their own codecs. It's a gem of code: they support everything and they do so with good performance. I considered using their library to play videos in Aves, but the issue is that it's a huge library and we can't pick and choose the codecs we want (my notes on the different video libraries are on the wiki).

petazonk commented 2 years ago

Here is a link. https://photos.app.goo.gl/WyPGUx1YjX4NJm789

This stutters on Aves, on my P6Pro which is fully patched on Android 12.

On Sat, 6 Nov 2021, 5:01 pm Thibault Deckers, @.***> wrote:

The fact that the same video was playing fine with Aves on your older device is puzzling... I also tried to play some UHD/4K videos on my phone (a Samsung S10e), and they played fine. Even a heavier 4K video with a

70Mb/s bitrate, still fine.

My initial diagnostic about performance is likely wrong. It's still true that Aves can't properly render the colours of HDR videos, though.

Could you follow the instructions in About > Bug Report, and attach here the environment info and the logs? By the way, aren't you already using Android 12 on the Pixel 6 Pro? Also, if you can, would you mind sharing one of the videos that stutter? (by email if you prefer)

As for VLC, they use their own codecs. It's a gem of code: they support everything and they do so with good performance. I considered using their library to play videos in Aves, but the issue is that it's a huge library and we can't pick and choose the codecs we want (my notes on the different video libraries are on the wiki https://github.com/deckerst/aves/wiki/Package-Study#video).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deckerst/aves/issues/118#issuecomment-962408979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNKTEK36IWBFOL3M3BAUG3UKTHEHANCNFSM5HNB4SXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

petazonk commented 2 years ago

Logs attached. Aves version: 1.5.4 (Build 58) Flutter version: 2.5.3 (Channel stable) Android version: 12 (SDK 31) Device: Google Pixel 6 Pro Google Play services: ready

On Sun, 7 Nov 2021, 10:46 am Peter, @.***> wrote:

Here is a link. https://photos.app.goo.gl/WyPGUx1YjX4NJm789

This stutters on Aves, on my P6Pro which is fully patched on Android 12.

On Sat, 6 Nov 2021, 5:01 pm Thibault Deckers, @.***> wrote:

The fact that the same video was playing fine with Aves on your older device is puzzling... I also tried to play some UHD/4K videos on my phone (a Samsung S10e), and they played fine. Even a heavier 4K video with a

70Mb/s bitrate, still fine.

My initial diagnostic about performance is likely wrong. It's still true that Aves can't properly render the colours of HDR videos, though.

Could you follow the instructions in About > Bug Report, and attach here the environment info and the logs? By the way, aren't you already using Android 12 on the Pixel 6 Pro? Also, if you can, would you mind sharing one of the videos that stutter? (by email if you prefer)

As for VLC, they use their own codecs. It's a gem of code: they support everything and they do so with good performance. I considered using their library to play videos in Aves, but the issue is that it's a huge library and we can't pick and choose the codecs we want (my notes on the different video libraries are on the wiki https://github.com/deckerst/aves/wiki/Package-Study#video).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deckerst/aves/issues/118#issuecomment-962408979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNKTEK36IWBFOL3M3BAUG3UKTHEHANCNFSM5HNB4SXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--------- beginning of main 11-07 10:47:16.808 17046 17046 I d.t.a.MainActivity: onStart 11-07 10:47:16.815 17046 17046 I d.t.a.MainActivity: onNewIntent intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10600000 cmp=deckers.thibault.aves/.MainActivity bnds=[1124,2426][1393,2639] } 11-07 10:47:16.825 17046 17085 I flutter : _AvesAppState onNewIntent with intentData={} 11-07 10:47:16.851 17046 17059 I OpenGLRenderer: Davey! duration=344438ms; Flags=1, FrameTimelineVsyncId=3203902, IntendedVsync=59944479260689, Vsync=59944479260689, InputEventId=676166034, HandleInputStart=59944479725394, AnimationStart=59944479725923, PerformTraversalsStart=59944479726370, DrawStart=59944488695812, FrameDeadline=59944529194023, FrameInterval=59944479722138, FrameStartTime=16666667, SyncQueued=59944488768444, SyncStart=59944488799816, IssueDrawCommandsStart=59944488850638, SwapBuffers=59944491765148, FrameCompleted=60288918100684, DequeueBufferDuration=1335612, QueueBufferDuration=694296, GpuCompleted=60288918100684, SwapBuffersCompleted=59944492547537, DisplayPresentTime=0, 11-07 10:47:19.840 17046 17046 I d.t.a.MainActivity: onStop 11-07 10:47:19.893 17046 17046 I d.t.a.MainActivity: onDestroy 11-07 10:47:22.330 19505 19505 E s.thibault.ave: Not starting debugger since process cannot load the jdwp agent. 11-07 10:47:22.339 19505 19505 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10240; state: ENABLED 11-07 10:47:22.350 19505 19505 W s.thibault.ave: Entry not found 11-07 10:47:22.350 19505 19505 W s.thibault.ave: Entry not found 11-07 10:47:22.351 19505 19505 W s.thibault.ave: Entry not found 11-07 10:47:22.352 19505 19505 W s.thibault.ave: JIT profile information will not be recorded: profile file does not exist. 11-07 10:47:22.352 19505 19505 W s.thibault.ave: JIT profile information will not be recorded: profile file does not exist. 11-07 10:47:22.352 19505 19505 W s.thibault.ave: JIT profile information will not be recorded: profile file does not exist. 11-07 10:47:22.356 19505 19505 V GraphicsEnvironment: ANGLE Developer option for 'deckers.thibault.aves' set to: 'default' 11-07 10:47:22.356 19505 19505 V GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported. 11-07 10:47:22.357 19505 19505 D NetworkSecurityConfig: No Network Security Config specified, using platform default 11-07 10:47:22.357 19505 19505 D NetworkSecurityConfig: No Network Security Config specified, using platform default 11-07 10:47:22.357 19505 19505 I MultiDex: VM with version 2.1.0 has multidex support 11-07 10:47:22.357 19505 19505 I MultiDex: Installing application 11-07 10:47:22.357 19505 19505 I MultiDex: VM has multidex support, MultiDex support library is disabled. 11-07 10:47:22.358 19505 19505 I FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT] 11-07 10:47:22.359 19505 19505 I FirebaseCrashlytics: Initializing Firebase Crashlytics 18.2.1 for deckers.thibault.aves 11-07 10:47:22.365 19505 19505 I FirebaseInitProvider: FirebaseApp initialization successful 11-07 10:47:22.371 19505 19531 D vulkan : searching for layers in '/data/app/~~8kaE9dBxFy1MrqOCnAvKkA==/deckers.thibault.aves-wH_fNhSaIXaTFW9INEZptw==/lib/arm64' 11-07 10:47:22.372 19505 19531 D vulkan : searching for layers in '/data/app/~~8kaE9dBxFy1MrqOCnAvKkA==/deckers.thibault.aves-wH_fNhSaIXaTFW9INEZptw==/base.apk!/lib/arm64-v8a' 11-07 10:47:22.372 19505 19531 D vulkan : searching for layers in '/data/app/~~8kaE9dBxFy1MrqOCnAvKkA==/deckers.thibault.aves-wH_fNhSaIXaTFW9INEZptw==/split_config.arm64_v8a.apk!/lib/arm64-v8a' 11-07 10:47:22.372 19505 19531 D vulkan : searching for layers in '/data/app/~~8kaE9dBxFy1MrqOCnAvKkA==/deckers.thibault.aves-wH_fNhSaIXaTFW9INEZptw==/split_config.en.apk!/lib/arm64-v8a' 11-07 10:47:22.372 19505 19531 D vulkan : searching for layers in '/data/app/~~8kaE9dBxFy1MrqOCnAvKkA==/deckers.thibault.aves-wH_fNhSaIXaTFW9INEZptw==/split_config.xxxhdpi.apk!/lib/arm64-v8a' 11-07 10:47:22.374 19505 19505 I d.t.a.MainActivity: onCreate intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=deckers.thibault.aves/.MainActivity bnds=[1124,2426][1393,2639] } 11-07 10:47:22.376 19505 19531 D mali_cmarp_predictor: checking cmar_predictor for deckers.thibault.aves 11-07 10:47:22.381 19505 19505 W s.thibault.aves: type=1400 audit(0.0:9678): avc: denied { read } for name="max_map_count" dev="proc" ino=2186066 scontext=u:r:untrusted_app:s0:c240,c256,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=deckers.thibault.aves 11-07 10:47:22.387 19505 19505 D libEGL : loaded /vendor/lib64/egl/libGLES_mali.so 11-07 10:47:22.398 19505 19505 D mali_cmarp_predictor: checking cmar_predictor for deckers.thibault.aves 11-07 10:47:22.425 19505 19505 I d.t.a.MainActivity: onStart 11-07 10:47:22.486 19505 19545 I flutter : [sil] 2021-11-07 10:47:22.486333 [fijk] set log level FijkLogLevel{level:500, name:war} 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.os.Build$VERSION' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.os.Build' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'java.nio.Buffer' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'java.nio.ByteBuffer' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'java.util.ArrayList' loaded 11-07 10:47:22.491 19505 19505 I J4A : API-Level: 31 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.media.AudioTrack' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.media.MediaCodec$BufferInfo' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.media.MediaCodec' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.media.MediaFormat' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.media.PlaybackParams' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'android.os.Bundle' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'tv.danmaku.ijk.media.player.misc.IMediaDataSource' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'tv.danmaku.ijk.media.player.misc.IAndroidIO' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'tv.danmaku.ijk.media.player.misc.MediaCodecSurface' loaded 11-07 10:47:22.491 19505 19505 D J4A : J4ALoader: OK: 'tv.danmaku.ijk.media.player.IjkMediaPlayer' loaded 11-07 10:47:22.493 19505 19505 D IJKMEDIA: ijkmediaplayer version : 11-07 10:47:22.493 19505 19505 D IJKMEDIA: IjkMediaPlayer_native_setLogLevel(5) 11-07 10:47:22.493 19505 19545 I flutter : [sil] 2021-11-07 10:47:22.493737 [fijk] native log level 500 11-07 10:47:22.507 19505 19545 I flutter : enable Firebase & Crashlytics collection 11-07 10:47:22.512 19505 19545 I flutter : Device has Play Services=true 11-07 10:47:22.514 19505 19545 I flutter : Device is connected=true 11-07 10:47:22.543 19505 19545 I flutter : Storage check complete in 18ms 11-07 10:47:22.620 19505 19545 I flutter : MediaStoreSource init complete in 77ms 11-07 10:47:22.620 19505 19545 I flutter : MediaStoreSource refresh start 11-07 10:47:22.620 19505 19545 I flutter : MediaStoreSource refresh 0:00:00.000003 fetch known entries 11-07 10:47:22.794 19505 19545 I flutter : MediaStoreSource refresh 0:00:00.173809 check obsolete entries 11-07 10:47:22.939 19505 19545 I flutter : MediaStoreSource refresh 0:00:00.318714 add known entries 11-07 10:47:22.975 19505 19545 I flutter : MediaStoreSource refresh 0:00:00.354990 load metadata 11-07 10:47:23.208 19505 19545 I flutter : MediaStoreSource refresh 0:00:00.588205 remove obsolete entries 11-07 10:47:23.243 19505 19545 I flutter : MediaStoreSource refresh 0:00:00.622774 check obsolete paths 11-07 10:47:23.431 19505 19545 I flutter : MediaStoreSource refresh 0:00:00.810676 fetch new entries 11-07 10:47:24.155 19505 19545 I flutter : MediaStoreSource refresh 0:00:01.534676 done for 16410 known, 0 new, 1 obsolete 11-07 10:47:29.969 19505 19615 E IJKMEDIA: Option ijkapplication not found. 11-07 10:47:30.004 19505 19615 W AudioTrack: Use of stream types is deprecated for operations other than volume control 11-07 10:47:30.004 19505 19615 W AudioTrack: See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 00000001 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 40010c01 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: ffff0160 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 00000300 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 00030000 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 03000003 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 009c2c09 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 00000001 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 42010101 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 60000003 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 00000300 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 00030000 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 03009ca0 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 01e02002 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 1c5a2d2b 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: b24bb9b8 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 08080804 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 00000001 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 4401c066 11-07 10:47:30.005 19505 19615 E IJKMEDIA: csd-0[80]: 7c0cc640 11-07 10:47:30.014 19505 19615 W tv.danmaku.ijk.media.player.IjkMediaPlayer: unaccetable codec: OMX.google.hevc.decoder 11-07 10:47:30.014 19505 19615 E IJKMEDIA: mediacodec_select_callback: onSelectCodec failed 11-07 10:47:30.014 19505 19615 E IJKMEDIA: amc: no suitable codec 11-07 10:47:30.014 19505 19615 W IJKMEDIA: fps: 29.076059 (normal) 11-07 10:47:30.014 19505 19615 W IJKMEDIA: fps: 30.000000 (normal) 11-07 10:47:40.059 19505 19617 W AudioTrack: restartIfDisabled(1463): releaseBuffer() track 0xb4000078f6202f70 disabled due to previous underrun, restarting 11-07 10:47:41.883 19505 19617 W AudioTrack: restartIfDisabled(1463): releaseBuffer() track 0xb4000078f6202f70 disabled due to previous underrun, restarting 11-07 10:47:50.160 19505 19617 W AudioTrack: restartIfDisabled(1463): releaseBuffer() track 0xb4000078f6202f70 disabled due to previous underrun, restarting 11-07 10:47:54.046 19505 19617 D AudioTrack: stop(1463): called with 716480 frames delivered 11-07 10:47:54.454 19505 19505 W tv.danmaku.ijk.media.player.IjkMediaPlayer: IjkMediaPlayer went away with unhandled events

deckerst commented 2 years ago

Thanks for the additional details and video.

Wasn't the video you linked reprocessed when it got uploaded? (It's an 1080p / ~30FPS / H.264 video, not the 4K kind you described before.)

That video has jagged movements on my phone, whatever the player I use (Aves, VLC, Google Photos). But it's not stuttering per se, it looks like these jagged movements come from the combination of panning and zooming.

Made me think... Maybe the Pixel phones shoot videos with an additional metadata stream for motion stabilization (you can check the streams in the Info page of your original videos)? I know the Google camera does this for stabilizing motion photos. Screenshot_20211107-104850_Aves  Profile

Edit: when accessing the linked video, it shows it's a 4K video, but when i download it i get a 1080p one :/

petazonk commented 2 years ago

I created a new video so that it would be smaller, eg only 10 seconds long at 55MB in size. You will need to download the video onto your phone (if you didn't already). This video plays smoothly on my Pixel 3 but stutters on the Aves on the P6Pro. You can actually hear the sound cut out as it jumps be a second or two. But maybe I messed something up. I'll do another shorter one so that it is obvious.

On Sun, 7 Nov 2021 at 11:50, Thibault Deckers @.***> wrote:

Thanks for the additional details and video.

Wasn't the video you linked reprocessed when it got uploaded? (It's an 1080p / ~30FPS / H.264 video, not the 4K kind you described before.)

That video has jagged movements on my phone, whatever the player I use (Aves, VLC, Google Photos). But it's not stuttering per se, it looks like these jagged movements come from the combination of panning and zooming.

Made me think... Maybe the Pixel phones shoot videos with an additional metadata stream for motion stabilization (you can check the streams in the Info page of your original videos)? I know the Google camera does this for stabilizing motion photos. [image: Screenshot_20211107-104850_Aves Profile] https://user-images.githubusercontent.com/13898333/140629236-ffe072c7-79c6-48a9-abd7-6d30355aceb5.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deckerst/aves/issues/118#issuecomment-962538041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNKTEK62UV2ICFO7KMMYZTUKXLO7ANCNFSM5HNB4SXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

petazonk commented 2 years ago

This short video stutters on Aves P6PRO. It plays fine on old phone with Aves.

https://photos.app.goo.gl/SNKcWGUkv47UVMDn9

On Sun, 7 Nov 2021, 3:19 pm Peter, @.***> wrote:

I created a new video so that it would be smaller, eg only 10 seconds long at 55MB in size. You will need to download the video onto your phone (if you didn't already). This video plays smoothly on my Pixel 3 but stutters on the Aves on the P6Pro. You can actually hear the sound cut out as it jumps be a second or two. But maybe I messed something up. I'll do another shorter one so that it is obvious.

On Sun, 7 Nov 2021 at 11:50, Thibault Deckers @.***> wrote:

Thanks for the additional details and video.

Wasn't the video you linked reprocessed when it got uploaded? (It's an 1080p / ~30FPS / H.264 video, not the 4K kind you described before.)

That video has jagged movements on my phone, whatever the player I use (Aves, VLC, Google Photos). But it's not stuttering per se, it looks like these jagged movements come from the combination of panning and zooming.

Made me think... Maybe the Pixel phones shoot videos with an additional metadata stream for motion stabilization (you can check the streams in the Info page of your original videos)? I know the Google camera does this for stabilizing motion photos. [image: Screenshot_20211107-104850_Aves Profile] https://user-images.githubusercontent.com/13898333/140629236-ffe072c7-79c6-48a9-abd7-6d30355aceb5.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deckerst/aves/issues/118#issuecomment-962538041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNKTEK62UV2ICFO7KMMYZTUKXLO7ANCNFSM5HNB4SXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

petazonk commented 2 years ago

I reproduced the problem with just 30FPS to reduce file size as the video still plays jerky on the P6PRO Aves.

On Sun, 7 Nov 2021 at 15:24, Peter @.***> wrote:

This short video stutters on Aves P6PRO. It plays fine on old phone with Aves.

https://photos.app.goo.gl/SNKcWGUkv47UVMDn9

On Sun, 7 Nov 2021, 3:19 pm Peter, @.***> wrote:

I created a new video so that it would be smaller, eg only 10 seconds long at 55MB in size. You will need to download the video onto your phone (if you didn't already). This video plays smoothly on my Pixel 3 but stutters on the Aves on the P6Pro. You can actually hear the sound cut out as it jumps be a second or two. But maybe I messed something up. I'll do another shorter one so that it is obvious.

On Sun, 7 Nov 2021 at 11:50, Thibault Deckers @.***> wrote:

Thanks for the additional details and video.

Wasn't the video you linked reprocessed when it got uploaded? (It's an 1080p / ~30FPS / H.264 video, not the 4K kind you described before.)

That video has jagged movements on my phone, whatever the player I use (Aves, VLC, Google Photos). But it's not stuttering per se, it looks like these jagged movements come from the combination of panning and zooming.

Made me think... Maybe the Pixel phones shoot videos with an additional metadata stream for motion stabilization (you can check the streams in the Info page of your original videos)? I know the Google camera does this for stabilizing motion photos. [image: Screenshot_20211107-104850_Aves Profile] https://user-images.githubusercontent.com/13898333/140629236-ffe072c7-79c6-48a9-abd7-6d30355aceb5.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deckerst/aves/issues/118#issuecomment-962538041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNKTEK62UV2ICFO7KMMYZTUKXLO7ANCNFSM5HNB4SXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

deckerst commented 2 years ago

Thanks for these, but i cannot download the original video when it's shared via Google Photos. It doesn't download the original 4K. It downloads instead a resized and reencoded version. Please email it to me if you can.

deckerst commented 2 years ago

TLDR; Google changed the codec names, and fijkplayer was only looking at codecs with the old name format.

After investigating this, I realize my explanations above about codec usage by libraries is mostly... wrong. My understanding now is that the device provides a bunch of codecs: some hardware-accelerated codecs and some software-only codecs. An app that does not ship with its own codecs would use both types (HW and SW) of codecs provided by the device. Aves tries to use the HW codecs available on the device, otherwise it uses the SW codecs from FFmpeg. I guess VLC, MX Player, etc. do something similar.

The codecs used to have standard names starting with OMX.. SW codecs started with OMX.google. and HW codecs started with OMX.Exynos., OMX.qcom., etc., depending on the chip. But lately the codec names have changed and no longer start with OMX. and start instead with c2.. For example, on the Pixel 6 Pro, the HW codec for HEVC is c2.exynos.hevc.decoder and the SW codec is c2.android.hevc.decoder.

fijkplayer (used by Aves) ranks codecs according to a whitelist/blacklist, and it was only accepting standard codecs starting with OMX.. The underlying ijkplayer project needed to be modified to accept modern c2. codecs.

I hope this wall of text will be useful to other devs!

petazonk commented 2 years ago

Great work and you solved the problem so quickly! Your explanation is still way above my understanding :)

On Wed, 10 Nov 2021 at 18:40, Thibault Deckers @.***> wrote:

Closed #118 https://github.com/deckerst/aves/issues/118.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deckerst/aves/issues/118#event-5595378258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNKTEOCNRZHHNMJWC7GFMDULIVXBANCNFSM5HNB4SXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.