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

AVI audio is out of sync since 18.0 *fixed* #15784

Closed
1 of 7 tasks
rainman74 opened this issue Mar 20, 2019 · 41 comments
Closed
1 of 7 tasks

AVI audio is out of sync since 18.0 *fixed* #15784

rainman74 opened this issue Mar 20, 2019 · 41 comments

Comments

@rainman74
Copy link

rainman74 commented Mar 20, 2019

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

  • 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

Expected Behavior

Here is a clear and concise description of what was expected to happen:

  • Audio output is synchronized to the video

Actual Behavior

  • Audio output is not in sync

Possible Fix

Fix Video/Audio-synchronization in MPEG-4 ASP HW-Decoding

To Reproduce

Steps to reproduce the behavior:

  1. Enable both MediaCodecs
  2. Play test video on Android ARM:
    https://mega.nz/#!66pw0ADC!gq0ORSlEHixCVW64xyTcyP_uq9GcjUaS0mFuI654vws
  3. Sony Bravia TV Oreo - Kodi 18.x - audio is not in sync
  4. Sony Bravia TV Oreo - Kodi 17.6 - audio is in sync

Debuglog

The debuglog can be found here:
kodi.log

kodi.log - Google Docs

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • Android

  • iOS

  • Linux

  • OSX

  • Raspberry-Pi

  • Windows

  • Windows UWP

  • Operating system version/name:

  • Kodi version: 18.x

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label Mar 20, 2019
@DaVukovic
Copy link
Member

Where is your debuglog?

As the log is missing and we can't see it....is your problem solved by enabling "Sync playback to display"?

@DaVukovic DaVukovic added the Ignored rules issue that does not follow the rules (no template, missing debug log, ...) label Mar 21, 2019
@rainman74
Copy link
Author

rainman74 commented Mar 21, 2019

@DaVukovic
kodi.log

@rainman74
Copy link
Author

Synchronizing playback with the display or screen to match playback makes no difference.

@DaVukovic DaVukovic removed the Ignored rules issue that does not follow the rules (no template, missing debug log, ...) label Mar 21, 2019
@M2k80
Copy link

M2k80 commented Mar 24, 2019

i ve tested your demo video file on Nvidia Shield (Android) and Windows, both playbacks are looking exactly same without a problem.
seems to be a sony tv android problem only, on my sony i can reproduce it

@DaVukovic DaVukovic added Component: Video Platform: Android v18 Leia and removed Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels Mar 25, 2019
@rainman74
Copy link
Author

rainman74 commented Mar 25, 2019

Kodi seems to have a problem here with H/W acceleration of MPEG-4 ASP videos with the Android Media Codec (AMC), which only affects AMLogic and Mediatek chips.

I can confirm that it does not occur with Windows (DXVA), nor with Snapdragons (AMC).

@stepman0
Copy link

Funny, your demo video works on my FireTv 4K (3rd generation), while I have huge problems with other MPEG4 on this plattform. Maybe the issues are related: #15599

@rainman74
Copy link
Author

@stepman0 I'm referring to the German audio track. Did you listen to it on the Fire TV and was it in sync? (pay attention to the screaming of Carlos with his hands, that's the best way to notice it!)

@M2k80
Copy link

M2k80 commented Mar 26, 2019

if needed i can upload a logcat when playing this file

@rainman74
Copy link
Author

@M2k80 yes, please provide your logcat.

@M2k80
Copy link

M2k80 commented Mar 28, 2019

kodi start at line 6312
demo file start at line 7300
its a huge file so i uploaded to dropbox
https://www.dropbox.com/s/6u70drdjvaer8hr/logcat.txt?dl=0

@M2k80
Copy link

M2k80 commented Mar 31, 2019

@rainman74 did you found something usefull?

@rainman74
Copy link
Author

@M2k80 look here

@lukjak
Copy link

lukjak commented Apr 1, 2019

@M2k80 look here

What is actually required to fix the issue? Paste the sample verbatim to the file? Is max-height element supported - I have issues with very old, small files.

@rainman74
Copy link
Author

@lukjak Read the post in the link in detail, there is everything you need to do to play videos smaller than 600 pixels smoothly with the software decoder.

@lukjak
Copy link

lukjak commented Apr 1, 2019

Here is another sample file I have issues with:
http://www.mediafire.com/file/7qycngxc59fa8h8/08_Uklad_oddechowy_s01e08.mkv/file
230MB, cartoon
Video: Xvid 640x480 25fps [V: mpeg4 advanced simple profile, yuv420p, 640x480 [default]]
Audio: Dolby AC3 48000Hz stereo 192kbps [A: ac3, 48000 Hz, stereo, 192 kb/s [default]]

At last watch, issues started at 8 minutes, then happened 4 times more before the end. At each time I needed to pause, rewind a minute or so and play again in order to restore sync and get rid of video stuttering. Also, at first problem occurrence the video was rapidly rewind until the start of the file instead of just some seconds.

Hope it helps.

@lukjak
Copy link

lukjak commented Apr 7, 2019

@lukjak Read the post in the link in detail, there is everything you need to do to play videos smaller than 600 pixels smoothly with the software decoder.

As I experience issues with HD/FullHD as well, does it mean I am out of luck as this would need stronger hw to be decoded in software?

@rainman74
Copy link
Author

SD videos should play back any available Android hardware in software fluently.

@hornet95
Copy link

I have the same problem only on Sony Bravia. Version 18 on the phone Huawei P30 is OK

@lupo112
Copy link

lupo112 commented Mar 13, 2020

Same problem on Sony Bravia 65XD7505, after system update last month.

@latuszek
Copy link

latuszek commented Apr 7, 2020

Does anybody found a fix for this? I have the same problem on Sony 60XF8305.

@rainman74
Copy link
Author

rainman74 commented Apr 30, 2020

install VLC and use playercorefactory.xml

<playercorefactory>

<players>
	<player name="VLC" type="ExternalPlayer" audio="true" video="true">
		<filename>org.videolan.vlc</filename>
		<args>"{1}"</args>
		<hidexbmc>true</hidexbmc>
		<hideconsole>true</hideconsole>
		<playcountminimumtime>120</playcountminimumtime>
	</player>
</players>
<rules name="system rules">
	<rule video="true" videocodec="xvid|divx|div3|div4|div5|dx50" player="VLC"/>
</rules>

</playercorefactory>

@hornet95
Copy link

I think I found the solution. Set to OFF HW acceleration. In my case that was the problem

@rainman74
Copy link
Author

With Android (Sony TV) you would have to switch off HW-decoding via decoderfilter.xml but then the picture quality really gets visibly worse and it jerks slightly. Even with 480p content. VLC does not have this problem.

@hornet95
Copy link

I don't see that quality of picture is worse. I mostly have 1080 movies and 5.1 sound

@rainman74
Copy link
Author

me too meanwhile, but the good old series are still many in DIVX ;-)

@rainman74
Copy link
Author

rainman74 commented Apr 30, 2020

The difference in picture quality is enormous with Sony TVs, as special picture enhancement filters take effect here with HW decoding, which are not available with SW decoding. And especially with upscaled SD Content it looks great.

Sony calls that 4K HDR-Prozessor X1™

https://www.flatpanelshd.com/pictures/sonyx1ultimate-3l.jpg

@mcbglug
Copy link

mcbglug commented May 26, 2020

Same problem on Sony Bravia 65XD7505, after system update last month.

Hi have you upgraded from Nougat to Oreo?

@Jon12345
Copy link

Jon12345 commented Jul 6, 2020

Same issue here, Sony X950G with latest updates, Kodi 18.7. Disabling mediacodec fixes the issue. VLC on the tv works fine.
Is playercorefactory above the best workaround?

@rainman74
Copy link
Author

Same issue here, Sony X950G with latest updates, Kodi 18.7. Disabling mediacodec fixes the issue. VLC on the tv works fine.
Is playercorefactory above the best workaround?

yes ;-)

@macmpi
Copy link

macmpi commented Jul 14, 2020

@rainman74 any quick & easy trick to set such playercorefactory.xml file on a Sony TV until a definitive fix is available ?
Thanks!

@liquidblasted
Copy link

playercorefactory.xml not works 4 me because VLC can't access to my NAS's shared folders, still can't understand, why (and other players like MX Player or Kodi itself - can access it without problem)

@liquidblasted
Copy link

So still waiting for fix in Kodi

@rainman74
Copy link
Author

playercorefactory.xml not works 4 me because VLC can't access to my NAS's shared folders, still can't understand, why (and other players like MX Player or Kodi itself - can access it without problem)

You only have to start the VLC app once and browse the shares manually, entering user + password. From then on KODI can start VLC and VLC can also play the files.

@rainman74
Copy link
Author

So still waiting for fix in Kodi

There will be no fix. The Kodi team does not see it as relevant to support old proprietary formats.

I can understand that on the one hand, but on the other hand it would have been easy to re-implement that.

@rainman74
Copy link
Author

@rainman74 any quick & easy trick to set such playercorefactory.xml file on a Sony TV until a definitive fix is available ?
Thanks!

Simply save the file above and copy it via ADB into the appropriate directory /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/playercorefactory.xml

@DaVukovic
Copy link
Member

Guys....it would be really cool, if you would stop giving support in here. This is not the forums and with every post in here you are notifying a bunch of devs with emails. So please stop that. Use the forums for any help.

I don't want to lock this conversation, but I will ;)

@Jon12345
Copy link

Sure, forum link for this issue is here, everyone please post there instead: https://forum.kodi.tv/showthread.php?tid=342165

@DaVukovic, that thread is marked "Solved" which discourages users from posting to it or finding it. Perhaps it should be "Won't fix" instead.

@DaVukovic
Copy link
Member

Noone says that it's not useful to post "useful" information in here. Or discuss the topic.

But the topic is not how to create a playercorefactory.xml or how to implement an external player. This has nothing to do with the current topic at all. Hence I did NOT say "Stop posting here". My wordings might have been more clear by saying "Please stop giving off-topic support"

Anyway.... @rainman74 is able to edit his own thread/posting and mark that thread to whatever he wants it to be

@rainman74
Copy link
Author

Thread is reopend

@vanhux
Copy link

vanhux commented Jan 21, 2021

Dear devs, just wonder if you are planning to fix this issue in v19. It has been quite a long time since this issue was reported.
In SPMC the sync is working just fine.

Many Thanks !

@rainman74 rainman74 changed the title AVI audio is out of sync since 18.0 AVI audio is out of sync since 18.0 *fixed* Feb 20, 2024
@rainman74
Copy link
Author

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

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

No branches or pull requests