MediaCodec: AVI XVID Packed Bitstream jerky playback and desynchronized audio
Description
The title says it all. The Packed Bitstream of AVI MPEG-4 Part 2 ASP (typically XVID ASP@L5 BVOP2 PB) is not handled properly.
Expected behavior
Smooth playback like in VLC for PC.
Actual behavior
The video is jerky and not synchronized with audio.
Steps to reproduce
Screenshot / video
Context
App version
3.2.7
Android version
9
Device model
App mode
Smartphone
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Thomas Guillem moved from vlc-android#1194 (moved)
moved from vlc-android#1194 (moved)
Further investigation:
- There is no problem with unpacked bitstream at all.
- I tried to remux XVID PB into MKV container/encapsulation, but the playback was jerky, too.
- Then I tried to check some settings in VLC. Hardware Acceleration: Default "Automatic" or "Full acceleration" were causing the reported issue, while "Disabled" or "Decoding acceleration" played the XVID PB very well.
Perhaps a detected PB could ask users to reduce the Hardware Acceleration setting or to proceed with "Full acceleration".
- Owner
Please share:
- logs
- files
- Jean-Baptiste Kempf added VLC core in VLC-Android label
added VLC core in VLC-Android label
- Owner
- Jean-Baptiste Kempf mentioned in issue vlc-android#441 (closed)
mentioned in issue vlc-android#441 (closed)
- Owner
Can you share logs too? and information about the device used?
Redmi 8 Android 9 PKQ1.190319.001 MIUI Global 11.0.6 VLC 3.2.10 vlc_logs.txt xvid_pb_logs.txt
- Owner
OMX.qti.video.decoder.mpeg4sw
is used... Which I guess is software... Can you reproduce the issue on different device? Xiaomi Redmi 8 crap? As there is the Hardware Acceleration setting that helps to play the video properly, you can close the issue if you think, that it is not possible to automatically set a proper way of playback. Here I attach some more logs to compare just in case they could somehow help:
Edited by mederi- Owner
04-18 12:05:55.643 D/VLC (10448): [00000079de867890/28d0] libvlc vout display: VoutDisplayEvent 'resize' 720x1520 04-18 12:05:55.645 I/OMXClient(10448): IOmx service obtained 04-18 12:05:55.650 D/SurfaceUtils(10448): connecting to surface 0x79de754010, reason connectToSurface 04-18 12:05:55.650 I/MediaCodec(10448): [OMX.qti.video.decoder.mpeg4sw] setting surface generation to 10698754 04-18 12:05:55.651 D/SurfaceUtils(10448): disconnecting from surface 0x79de754010, reason connectToSurface(reconnect) 04-18 12:05:55.651 D/SurfaceUtils(10448): connecting to surface 0x79de754010, reason connectToSurface(reconnect) 04-18 12:05:55.655 I/ExtendedACodec(10448): setupVideoDecoder() 04-18 12:05:55.657 I/ExtendedACodec(10448): Decoder will be in frame by frame mode 04-18 12:05:55.659 W/ExtendedACodec(10448): Failed to get extension for extradata parameter 04-18 12:05:55.669 D/SurfaceUtils(10448): set up nativeWindow 0x79de754010 for 604x320, color 0x7fa30c04, rotation 0, usage 0x2933
Collapse replies - Owner
The
Failed to get extension for extradata parameter
seems weird. - Please register or sign in to reply
XviD playbook is also jerky on my device using "Hardware Acceleration: Automatic". It is fine with "Hardware Acceleration: Disabled".
I'm using VLC 3.3.4 on a Samsung Galaxy Note 10.1 Wi-Fi (2014) (n1awifi) with LineageOS 14.1 (Android 7.1).
Here are the logs with "Hardware Acceleration: Automatic": vlc_logcat_20210529_012855_edit.log
05-29 01:28:23.435 D/VLC (19770): [56957530/4e14] libvlc decoder: looking for video decoder module matching "mediacodec_ndk,all": 13 candidates 05-29 01:28:23.435 W/VLC (19770): [56957530/4e14] libvlc decoder: Exception occurred in MediaCodecInfo.getCapabilitiesForType 05-29 01:28:23.435 W/VideoCapabilities(19770): Unrecognized profile/level 1/32 for video/mp4v-es 05-29 01:28:23.435 W/VideoCapabilities(19770): Unrecognized profile/level 32768/2 for video/mp4v-es 05-29 01:28:23.435 W/VideoCapabilities(19770): Unrecognized profile/level 32768/64 for video/mp4v-es 05-29 01:28:23.436 D/VLC (19770): [56957530/4e14] libvlc decoder: Number of profile levels: 16 05-29 01:28:23.436 D/VLC (19770): [56957530/4e14] libvlc decoder: using OMX.Exynos.MPEG4.Decoder
I don't know which other parts of the log are significative.
Edited by pihug12- Thomas Guillem added Component::Video: Android label
added Component::Video: Android label
- Thomas Guillem changed title from AVI XVID Packed Bitstream jerky playback and desynchronized audio to MediaCodec: AVI XVID Packed Bitstream jerky playback and desynchronized audio
changed title from AVI XVID Packed Bitstream jerky playback and desynchronized audio to MediaCodec: AVI XVID Packed Bitstream jerky playback and desynchronized audio
- Mangal Kushwah mentioned in merge request !5870 (merged)
mentioned in merge request !5870 (merged)
- Mangal Kushwah mentioned in merge request !5919 (merged)
mentioned in merge request !5919 (merged)