Kodi Community Forum
Solved AVI audio is out of sync since 18.0 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Android (https://forum.kodi.tv/forumdisplay.php?fid=164)
+---- Thread: Solved AVI audio is out of sync since 18.0 (/showthread.php?tid=342165)

Pages: 1 2 3 4


AVI audio is out of sync since 18.0 - rainman74 - 2019-03-18

Update: Tested with Kodi v20.4 and the problem no longer occurs. The audio is now played correctly.

Problem:
  • Audio output is no longer synchronized to the video for AVI files (Xvid/MPEG-4 ASP)
  • Tested with 18.0, 18.1 and 18.2 RC
  • Not affected are AVC and HEVC videos in MP4 or MKV containers

Test environment:
  • Android ARM
  • Sony Bravia TV Oreo - Kodi 18.x - audio is not in sync
  • Sony Bravia TV Oreo - Kodi 17.6 - audio is in sync

Last working version:
  • kodi-17.6-Leia-armeabi-v7a.apk
  • The exact newer build where it doesn't work anymore is not known

Test video:
Test Video


RE: AVI audio is out of sync since 18.0 - rainman74 - 2019-03-21

https://github.com/xbmc/xbmc/issues/15784


RE: AVI audio is out of sync since 18.0 - Julestop - 2019-03-21

I'm also having sync issues and had to go to SPMC 17.6a... but mine are with AC3 Dolby Digital.


RE: AVI audio is out of sync since 18.0 - EventPhotoMan - 2019-03-22

Thank you... mine too


RE: AVI audio is out of sync since 18.0 - rainman74 - 2019-03-22

(2019-03-21, 19:29)Julestop Wrote: I'm also having sync issues and had to go to SPMC 17.6a... but mine are with AC3 Dolby Digital.
Can you please provide me with a test video where this occurs?


RE: AVI audio is out of sync since 18.0 - gamish - 2019-03-29

(2019-03-22, 03:06)EventPhotoMan Wrote: Thank you... mine too

Mine too. With a half-hour AVI, I get about 10 minutes in and video jerks around a bit, then audio falls horribly out of sync. Stopping and resuming from the bookmark fixes the problem, at least temporarily. Looks like some kind of buffer issue.

These are old Xvid AVIs, probably made years ago with AutoGK. Never caused a problem before, in a wide variety of hardware and software players.


RE: AVI audio is out of sync since 18.0 - baza_dwa - 2019-03-29

It's exactly the same for me! Minix U9-H with the latest Kodi v18. There's been no issues with my old WD TV SMP, and also on PC they play OK.


RE: AVI audio is out of sync since 18.0 - KaneSama2k3 - 2019-04-04

(2019-03-18, 14:39)rainman74 Wrote: Problem:
  • Audio output is no longer synchronized to the video for AVI files (Xvid/MPEG-4 ASP)
  • Tested with 18.0, 18.1 and 18.2 RC
  • Not affected are AVC and HEVC videos in MP4 or MKV containers
Test environment:
  • Android ARM
  • Sony Bravia TV Oreo - Kodi 18.x - audio is not in sync
  • Sony Bravia TV Oreo - Kodi 17.6 - audio is in sync
Last working version:
  • kodi-17.6-Leia-armeabi-v7a.apk
  • The exact newer build where it doesn't work anymore is not known
Test video:Test Video 
I have the same issue on my 2016 Sony Android TV with Kodi 18. 
It seems to be an issue specifically with Xvid files with MP3 audio. It seems that Kodi is detecting the framerate of some of these videos as 30 FPS regardless of underlying content while playing the audio at the original rate. As a result UK shows get out of sync almost instantly (25FPS to 30FPS), whereas US shows with the 29.97 FPS deviate more slowly. These files were working fine on v17. Testing them on my desktop copy of Kodi does not exhibit these issues
Annoyingly, it's not even all Xvid / MP3 files.

This file is fine:

Writing application                      : transcode-1.0.7

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L5
Format settings                          : BVOP2
Format settings, BVOP                    : 2
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Muxing mode                              : Packed bitstream
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 24 min 12 s
Bit rate                                 : 870 kb/s
Width                                    : 624 pixels
Height                                   : 352 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.158
Stream size                              : 151 MiB (86%)
Writing library                          : XviD 1.2.1 (UTC 2008-12-04)

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo
Codec ID                                 : 55
Codec ID/Hint                            : MP3
Duration                                 : 24 min 12 s
Bit rate mode                            : Variable
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Delay relative to video                  : 72 ms
Stream size                              : 22.1 MiB (13%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 24  ms (0.60 video frame)

But these two are not:

File 1:

Writing application                      : VirtualDubMod 1.5.10.2 (build 2542/release)
Writing library                          : VirtualDubMod build 2542/release

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L5
Format settings                          : BVOP2
Format settings, BVOP                    : 2
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Muxing mode                              : Packed bitstream
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 22 min 44 s
Bit rate                                 : 994 kb/s
Width                                    : 512 pixels
Height                                   : 384 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 29.970 (30000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.169
Stream size                              : 162 MiB (86%)
Writing library                          : XviD 1.1.2 (UTC 2006-11-01)

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo / MS Stereo
Codec ID                                 : 55
Codec ID/Hint                            : MP3
Duration                                 : 22 min 44 s
Bit rate mode                            : Variable
Bit rate                                 : 151 kb/s
Minimum bit rate                         : 128 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 41.667 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 24.6 MiB (13%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 24  ms (0.72 video frame)
Interleave, preload duration             : 143  ms
Writing library                          : LAME3.97 
Encoding settings                        : -m j -V 2 -q 3 -lowpass 18.6 --vbr-old -b 128

File2:

Writing library                          : VirtualDub build 30091/release

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L5
Format settings                          : BVOP2
Format settings, BVOP                    : 2
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 23 min 45 s
Bit rate                                 : 889 kb/s
Width                                    : 624 pixels
Height                                   : 352 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.162
Stream size                              : 151 MiB (86%)
Writing library                          : XviD 1.2.1 (UTC 2008-12-04)

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo / MS Stereo
Codec ID                                 : 55
Codec ID/Hint                            : MP3
Duration                                 : 23 min 45 s
Bit rate mode                            : Variable
Bit rate                                 : 124 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 41.667 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 21.7 MiB (12%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 24  ms (0.60 video frame)
Interleave, preload duration             : 506  ms
Writing library                          : LAME3.90.
Encoding settings                        : -m j -V 4 -q 2 -lowpass 17.6 --abr 124


RE: AVI audio is out of sync since 18.0 - EventPhotoMan - 2019-04-18

(2019-03-29, 17:46)baza_dwa Wrote: It's exactly the same for me! Minix U9-H with the latest Kodi v18. There's been no issues with my old WD TV SMP, and also on PC they play OK.

I was hoping to retire my WD Live Hub, but it looks like I have to keep it to play the older files.
All the older family videos, priceless...


RE: AVI audio is out of sync since 18.0 - gamish - 2019-04-19

(2019-04-18, 23:10)EventPhotoMan Wrote: I was hoping to retire my WD Live Hub, but it looks like I have to keep it to play the older files.
All the older family videos, priceless...

If you're using an Android or Linux box, don't forget VLC player. It's a pain compared to Kodi, on a TV setup, but it's not a bad solution until the Kodi bug gets ironed out.


RE: AVI audio is out of sync since 18.0 - wrxtasy - 2019-04-20

(2019-03-29, 17:46)baza_dwa Wrote: It's exactly the same for me! Minix U9-H with the latest Kodi v18. There's been no issues with my old WD TV SMP, and also on PC they play OK.

Use CoreELEC Kodi Leia running from a Class 10 U1 microSDHC card.
With (AMLogic) CoreELEC, the OS, Linux Kernel and Kodi have been optimised for older mpeg2, Xvid/mpeg4 and VC-1 video playback:

https://coreelec.org/



The problem with ALL Android platforms is the Kodi developers cannot bug bust the OS or the Linux Kernel to provide such support for old video compression standards.

You get what you are given from the media player vendor.


RE: AVI audio is out of sync since 18.0 - rainman74 - 2019-04-20

(2019-04-20, 04:10)wrxtasy Wrote:
(2019-03-29, 17:46)baza_dwa Wrote: It's exactly the same for me! Minix U9-H with the latest Kodi v18. There's been no issues with my old WD TV SMP, and also on PC they play OK.

Use CoreELEC Kodi Leia running from a Class 10 U1 microSDHC card.
With (AMLogic) CoreELEC, the OS, Linux Kernel and Kodi have been optimised for older mpeg2, Xvid/mpeg4 and VC-1 video playback:

https://coreelec.org/


The problem with ALL Android platforms is the Kodi developers cannot bug bust the OS or the Linux Kernel to provide such support for old video compression standards.

You get what you are given from the media player vendor. 

That can't be the main reason, because the same SD files under KODI 17 with SW decoding are jerk-free and now with KODI 18 with the decoder filter also jerk with SW decoding! And both on a Fire TV Stick with Android 5 and on a Sony Android TV with Android 8. Strangely enough, the videos then play smoothly with SW decoding on the devices with activated debug overlay.


RE: AVI audio is out of sync since 18.0 - EventPhotoMan - 2019-04-21

(2019-03-29, 06:06)gamish Wrote:
(2019-03-22, 03:06)EventPhotoMan Wrote: Thank you... mine too

Mine too. With a half-hour AVI, I get about 10 minutes in and video jerks around a bit, then audio falls horribly out of sync. Stopping and resuming from the bookmark fixes the problem, at least temporarily. Looks like some kind of buffer issue.

These are old Xvid AVIs, probably made years ago with AutoGK. Never caused a problem before, in a wide variety of hardware and software players.

As a matter of fact, I still take video with a camera that uses 720p

Family videos, but still.. need to be able to watch them.


RE: AVI audio is out of sync since 18.0 - baza_dwa - 2019-05-02

(2019-04-18, 23:10)EventPhotoMan Wrote:
(2019-03-29, 17:46)baza_dwa Wrote: It's exactly the same for me! Minix U9-H with the latest Kodi v18. There's been no issues with my old WD TV SMP, and also on PC they play OK.

I was hoping to retire my WD Live Hub, but it looks like I have to keep it to play the older files.
All the older family videos, priceless... 
By all means, keep it. I am terribly disappointed with Kodi/Android on theoretically one of the best boxes. With WD, everything supported is played without slightest problems.


RE: AVI audio is out of sync since 18.0 - gamish - 2019-06-12

Blaming Android runs counter to the obvious facts. My previous version of Kodi played AVIs just fine; the most recent builds, on the exact same box, do not. Moreover, playing an antiquated format like Xvid/AVI should present no challenge on today's octa-core devices. (I did try putting an old Xvid in an MKV container. Doesn't help.)

This is clearly a Kodi issue. Maybe a 'minor' system-wide change that had unintended consequences? Dunno... but I sure wish they'd fix it. There's a vast base of older AVI files out there.