Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] kodi just plays the first frame of a video
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
jssilva
n00b
n00b


Joined: 27 Sep 2017
Posts: 64

PostPosted: Fri Oct 20, 2017 10:35 am    Post subject: [SOLVED] kodi just plays the first frame of a video Reply with quote

Hello,

This is one of the two last problems I have to solve to complete my migration from Manjaro-openrc (now Artix). In fact, it has worked already, I wonder if it was an update.

So, kodi works if I boot my Manjaro partition on the same laptop. Vlc and kaffeine play those videos on gentoo. Kodi just presents the first frame and then I only see the time line advancing but the picture is frozen. The CPU is at 80%.

I suspect it could be related to the USE system-ffmpeg which I'm not able to unmask, even with package.use.force.

My emerges:
Code:
[ebuild   R    ] media-tv/kodi-17.4-r1::gentoo  USE="X alsa bluetooth bluray css dbus dvd java lcms nonfree opengl pulseaudio sftp (system-ffmpeg) udev udisks upower vaapi vdpau xslt -airplay -caps -cec -debug -gles -libressl -libusb -lirc -mysql -nfs -samba -systemd {-test} -upnp -webserver -zeroconf" PYTHON_TARGETS="python2_7"

[ebuild   R    ] media-libs/mesa-17.2.3::gentoo  USE="classic dri3 egl gallium gbm llvm nptl vaapi vdpau -bindist -d3d9 -debug -gles1 -gles2 -opencl -openmax -osmesa -pax_kernel -pic (-selinux) -unwind -valgrind -vulkan -wayland -xa -xvmc" ABI_X86="(64) -32 (-x32)" VIDEO_CARDS="i915 intel radeon (-freedreno) -i965 -imx -nouveau -r100 -r200 -r300 -r600 -radeonsi (-vc4) (-vivante) -vmware"

And excerpts of kodi debug log:
Code:

10:55:22.813 T:140537681394048   DEBUG: OnPlayMedia /home/user/data/Temp/All Summer in a Day.mp4
10:55:22.820 T:140537358857984   DEBUG: GetMovieId (/home/user/data/Temp/All Summer in a Day.mp4), query = select idMovie from movie where idFile=123
...
10:55:22.822 T:140537681394048   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
10:55:22.822 T:140537681394048   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (VideoPlayer)
10:55:22.822 T:140537681394048   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
10:55:22.822 T:140537681394048   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
10:55:22.822 T:140537681394048   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
10:55:22.823 T:140537681394048   DEBUG: Radio UECP (RDS) Processor - new CDVDRadioRDSData
10:55:22.823 T:140537681394048  NOTICE: VideoPlayer: Opening: /home/user/data/Temp/All Summer in a Day.mp4
10:55:22.823 T:140537681394048 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
...
10:55:22.844 T:140536445261568   DEBUG: Open - probing detected format [mov,mp4,m4a,3gp,3g2,mj2]
10:55:22.844 T:140536445261568   DEBUG: ffmpeg[7FD130E5D700]: [mov,mp4,m4a,3gp,3g2,mj2] type:'ftyp' parent:'root' sz: 32 8 133502025
... long list of ffmpeg messages...
10:55:22.849 T:140536445261568   DEBUG: ffmpeg[7FD130E5D700]: [mov,mp4,m4a,3gp,3g2,mj2] count=1, duration=0
10:55:22.849 T:140536445261568   DEBUG: ffmpeg[7FD130E5D700]: [mov,mp4,m4a,3gp,3g2,mj2] count=1, duration=6006
...

There are only some unrelated ERROR messages, mostly about unfound station icons. So, no clue.

It's very frustrating to be forced to boot Manjaro every day at lunch time just to watch my recorded news. Can somebody help, please?


Last edited by jssilva on Fri Oct 20, 2017 1:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16920
Location: here

PostPosted: Fri Oct 20, 2017 11:23 am    Post subject: Re: kodi just plays the first frame of a video Reply with quote

jssilva wrote:
I suspect it could be related to the USE system-ffmpeg which I'm not able to unmask, even with package.use.force.

You are in unstable system? if yes probably your suspect are correct, see here

As workaround you can mask ffmpeg-3.4 and rebuild version 3.3.4
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
kajzer
Apprentice
Apprentice


Joined: 27 Nov 2014
Posts: 163

PostPosted: Fri Oct 20, 2017 11:51 am    Post subject: Reply with quote

Same happened to me when I upgraded ffmpeg to 3.4, downgrading ffmpeg to 3.3.4 solved the problem.

btw I'm not using VDPAU, it's something else in the ffmpeg 3.4 that triggers this problem (or something in Kodi related to ffmpeg, other players are working fine)
Back to top
View user's profile Send private message
jssilva
n00b
n00b


Joined: 27 Sep 2017
Posts: 64

PostPosted: Fri Oct 20, 2017 1:57 pm    Post subject: [SOLVED] kodi just plays the first frame of a video Reply with quote

Thank you both for replying. It's working!

@fedeliallalinea: You were right, it was the system-ffmpeg flag.

So, portage was not accepting my package.use.force because I was not placing it as a file inside the profile sub-folder. I also masked -vdpau at the advice of @kajzer just above and tested. It then accepted -system-ffmpeg, compiled and success!

@kajzer: If I had not succeeded, I would have tried the downgrade. Anyway, I disabled vdpau which I don't really know why I unmasked because my laptop doesn't have nvidia, it's a muxed intel+amd (macbook pro 8.2)

Thank you again, I'm marking this as solved.

Now, to finalize my system, I just have to discover why it doesn't mount cifs shares:
https://forums.gentoo.org/viewtopic-t-1070712.html
Back to top
View user's profile Send private message
jssilva
n00b
n00b


Joined: 27 Sep 2017
Posts: 64

PostPosted: Sat Oct 21, 2017 2:26 pm    Post subject: Reply with quote

Late news:

It works but kodi puts all the 8 cpu cores at 80%, just doing nothing, in the main menu. This makes a lot of fan noise which I don't like and is not the same behavior as I had in Manjaro-openrc but I can't afford wasting more time with this.

My videos and TV recordings reside on a home NAS server, which is also my tvheadend recorder. So, now that I solved the cifs shares access, I guess I'll have to live with vlc player and forget kodi.

EDIT: Forget what I just said!
This might look as a reality show but it's not. Just a person looking for improvement.

I discovered that my GPU, one of them, the one I use, is a i965 instead of i915. So, made the adjustments in make.conf, fiddled with other USE flags, namely vaapi, and kodi is now running quietly as it should.

If someone needs to know my USE flags setting, please ask.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11434

PostPosted: Sat Oct 21, 2017 9:13 pm    Post subject: Reply with quote

Readers sometimes find value in these threads long after the original poster has lost interest. If you think your settings are important to the solution, it is better to volunteer them with your initial success report than to wait for someone to ask for them.
Back to top
View user's profile Send private message
jssilva
n00b
n00b


Joined: 27 Sep 2017
Posts: 64

PostPosted: Sat Oct 21, 2017 10:12 pm    Post subject: Reply with quote

All right,

But please do not forget my machine is peculiar, it's a macbook pro 8.2 and has 2 GPU's switched by a hardware mux (not optimus like); one is intel i965 (I thought it was i915, but it uses the driver with this name), and one radeon. You can look the characteristics here: https://en.wikipedia.org/wiki/MacBook_Pro

So, in make.conf:
Code:
VIDEO_CARDS="intel i965 radeon"

Then, kodi must not use the system ffmpeg because it seems the api is buggy, so I was advised above:
Code:
# cat /etc/portage/profile/package.use.force
media-tv/kodi -system-ffmpeg

Check that this masking is really working, otherwise try other ways to mask it, see posts above.

Finally, this is working for me:
Code:
# cat /etc/portage/package.use
media-tv/kodi sftp vaapi -system-ffmpeg bluray java gles
media-video/ffmpeg-3.4 vaapi
media-libs/mesa vaapi gles2


Of course this assumes that you have switched to the intel GPU, and optionally have shut-off the amd GPU to save battery power and reduce heating. For that I use the kernel parameters:
Code:
i915.modeset=1 i915.lvds_channel_mode=2 radeon.modeset=1 elevator=noop vt.handoff=7 acpi_backlight=video"

And activate the kernel config for vgaswitcheroo (bbswitch doesn't work, it's only for optimus), both drivers should be also activated as modules (i915 and radeon, see wikis on this):
Code:
CONFIG_APPLE_GMUX=m

And finally switch to intel, turn-off amd on boot, turn it on again on shutdown to prevent shutdown hanging problems:
Code:
#cat /etc/init.d/my-switcheroo
#!/sbin/openrc-run
# My switcheroo service
# To switch the gpu from amd to intel and switch the power off to amd at boot
 
description="Switch ON/OFF the discrete GPU"

depend()
{
    need sysfs
}

start()
{
    ebegin "Switching to Integrated GPU, shutdown Discrete"
    # Turn-on both gpu's
    echo ON > /sys/kernel/debug/vgaswitcheroo/switch
    # Switch to integrated (intel) gpu
    echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
    # Power-off the disabled GPU
    echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
    return 0
}

stop()
{
    ebegin "Power ON both GPUs to avoid suspend/shutdown problems"
    echo ON > /sys/kernel/debug/vgaswitcheroo/switch
    return 0
}


Don't forget to make it executable and:
Code:
# rc-update add my-switcheroo default


This has become a little lengthy, hope it's useful to somebody.
Back to top
View user's profile Send private message
papandreoos
Tux's lil' helper
Tux's lil' helper


Joined: 17 Dec 2014
Posts: 80

PostPosted: Mon Oct 23, 2017 2:21 pm    Post subject: Reply with quote

i can say that it is also happened in archlinux.
today i upgraded ffmpeg to 3.4 and got the same behaviour.
(kodi worked great before the upgrade)
so after seeing your post i just downgrade my package (to 3.3.4 from archlinux package archive) and after restart kodi it was working again :-).
thank you all!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 5962
Location: Saint Amant, Acadiana

PostPosted: Mon Oct 23, 2017 2:27 pm    Post subject: Reply with quote

Kodi developers insist to use bundled ffmpeg. While Gentoo ebuild does not make it easy.
_________________
Please learn how to denote units correctly!

Political Correctness is all about replacing imaginary injustice with real injustice.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7316
Location: ~Brussels - Belgique

PostPosted: Wed Oct 25, 2017 7:22 am    Post subject: Reply with quote

Hi,

Do we have a bug open at our bugzilla?
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16920
Location: here

PostPosted: Wed Oct 25, 2017 7:56 am    Post subject: Reply with quote

xaviermiller wrote:
Do we have a bug open at our bugzilla?

No, apparently not

EDIT: I can open a bug but I don't use kodi
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7316
Location: ~Brussels - Belgique

PostPosted: Wed Oct 25, 2017 9:17 am    Post subject: Reply with quote

634802
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
jssilva
n00b
n00b


Joined: 27 Sep 2017
Posts: 64

PostPosted: Wed Oct 25, 2017 9:36 pm    Post subject: Reply with quote

After carefully reading all the posts above, after my last one, I also became scared of using bundled ffmpeg in kodi. I read with special attention the bug thread 634802 referred in the post just above.

So, for the record and continuing my reality show, I downgraded ffmpeg to 3.3.4, deleted the unmask of system-ffmpeg use flag, and reinstalled kodi. It's working and using the system ffmpeg libraries.

As I said some times before, I came from canned binaries distro where this fine grain control is not possible, or at least not easy or usual. People that are using these distros probably don't even dream what they are exposed to. That's why I'm liking Gentoo more and more.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum