Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: rohitggarg on August 31, 2021, 12:07:51 PM
-
Hello everybody,
I am looking for some pointers here to get ffplay working on my Raspberry pi B.
Whenever I try to play a video, I get an error
error: XDG_RUNTIME_DIR not set in the environment.
Could not initialize SDL - No available video device
(Did you set the DISPLAY variable?)
I tried exporting DISPLAY=:0 but it didn't help.
Here is the list of files in my /dev directory:
agpgart loop110 loop6 ram4 tty36
atibm loop111 loop60 ram5 tty37
audio loop112 loop61 ram6 tty38
autofs loop113 loop62 ram7 tty39
beep loop114 loop63 ram8 tty4
block/ loop115 loop64 ram9 tty40
bus/ loop116 loop65 random tty41
cachefiles loop117 loop66 raw/ tty42
char/ loop118 loop67 rfkill tty43
console loop119 loop68 sda tty44
core loop12 loop69 sda1 tty45
disk/ loop120 loop7 sda2 tty46
dma_heap/ loop121 loop70 sda3 tty47
fb0 loop122 loop71 sda4 tty48
fd loop123 loop72 sda5 tty49
fd0 loop124 loop73 sda6 tty5
fd0D360 loop13 loop74 sda7 tty50
fd0D720 loop14 loop75 sda8 tty51
fd0H1440 loop15 loop76 sda9 tty52
fd0H1722 loop16 loop77 sdb tty53
flash loop17 loop78 sdb1 tty54
full loop18 loop79 sdb2 tty55
gpiochip0 loop19 loop8 sdb3 tty56
gpiomem loop2 loop80 sdb4 tty57
hda loop20 loop81 sdb5 tty58
hda1 loop21 loop82 sdb6 tty59
hda2 loop22 loop83 sdb7 tty6
hda3 loop23 loop84 sdb8 tty60
hda4 loop24 loop85 sdb9 tty61
hda5 loop25 loop86 shm/ tty62
hda6 loop26 loop87 snd/ tty63
hda7 loop27 loop88 sr0 tty7
hda8 loop28 loop89 sr1 tty8
hda9 loop29 loop9 stderr tty9
hdb loop3 loop90 stdin ttyAMA0
hdb1 loop30 loop91 stdout ttyS0
hdb2 loop31 loop92 tty ttyprintk
hdb3 loop32 loop93 tty0 urandom
hdb4 loop33 loop94 tty1 usb/
hdb5 loop34 loop95 tty10 vc-mem
hdb6 loop35 loop96 tty11 vchiq
hdb7 loop36 loop97 tty12 vcio
hdb8 loop37 loop98 tty13 vcs
hdb9 loop38 loop99 tty14 vcs0
hdc loop39 mem tty15 vcs1
hdd loop4 mmcblk0 tty16 vcs2
hwrng loop40 mmcblk0p1 tty17 vcs3
inportbm loop41 mmcblk0p2 tty18 vcs4
input/ loop42 net/ tty19 vcs5
kmem loop43 null tty2 vcs6
kmsg loop44 nvram tty20 vcs7
logibm loop45 port tty21 vcsa
loop-control loop46 ppp tty22 vcsa0
loop0 loop47 psaux tty23 vcsa1
loop1 loop48 ptmx tty24 vcsa2
loop10 loop49 pts/ tty25 vcsa3
loop100 loop5 ram tty26 vcsa4
loop101 loop50 ram0 tty27 vcsa5
loop102 loop51 ram1 tty28 vcsa6
loop103 loop52 ram10 tty29 vcsa7
loop104 loop53 ram11 tty3 vcsu
loop105 loop54 ram12 tty30 vcsu1
loop106 loop55 ram13 tty31 watchdog
loop107 loop56 ram14 tty32 watchdog0
loop108 loop57 ram15 tty33 zero
loop109 loop58 ram2 tty34 zram0
loop11 loop59 ram3 tty35
Dmesg says display is available
tc@box:~$ dmesg | grep disp
[ 2.747435] bcm2708_fb soc:fb: FB found 1 display(s)
[ 2.810608] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 1824x984
Not sure what has gone wrong. Kindly help
-
I’d guess that a dep is missing or broken - what does this give:
$ ldd /usr/local/lib/lib*.so | grep found
-
Hello Juanito, thanks for your reply.
tc@box:~$ ldd /usr/local/lib/lib*.so.* | grep found
tc@box:~$
tc@box:~$ ldd /usr/local/lib/lib*.so
libgbm.so.1 => /usr/local/lib/libgbm.so.1 (0xb6e8f000)
libglapi.so.0 => /usr/local/lib/libglapi.so.0 (0xb6e54000)
libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0xb6e28000)
libX11-xcb.so.1 => /usr/local/lib/libX11-xcb.so.1 (0xb6e16000)
libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0xb6dea000)
libxcb-dri2.so.0 => /usr/local/lib/libxcb-dri2.so.0 (0xb6dd6000)
libxcb-xfixes.so.0 => /usr/local/lib/libxcb-xfixes.so.0 (0xb6dc0000)
libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0xb6da3000)
libwayland-client.so.0 => /usr/local/lib/libwayland-client.so.0 (0xb6d89000)
libwayland-server.so.0 => /usr/local/lib/libwayland-server.so.0 (0xb6d6c000)
libdl.so.2 => /lib/libdl.so.2 (0xb6d59000)
libm.so.6 => /lib/libm.so.6 (0xb6ced000)
libxcb-dri3.so.0 => /usr/local/lib/libxcb-dri3.so.0 (0xb6cda000)
....
-
I tried to install Xorg after your reply thinking it could be about missing libraries.
I was successful in installing it, I can confirm that it started up as it shows up in the processes list.
After that, if I tried to run ffplay, it doesn't show me the error of no display but it doesn't show anything on the screen.
Thanks in advance!
-
I just tested ffplay - albeit in piCore-12.x - remotely using vinagre to connect to an x11 session and it played without problems.
-
Can you please send me set of steps and packages you installed? I just want to cross verify things.
If it works on 12.x, I am happy to make that switch as well.
-
I don't believe there's any need to downgrade to piCore-12.x, you just have to check you have nettle7 loaded as an upgrade broke gnutls in piCore-13.x
In the interim I updated SDL2.
I have loaded: Xorg flwm aterm wbar x11vnc (to connect, you shouldn't need this) ffmpeg and ffplay works.
-
Cool! It does work but with following caveats:
- its terribly slow.. runs at like 1 frame per second
- no audio
Can you provide some tips around that as well? Thanks!
-
What resolution are you using? Anything less than uhd works fine for me.
Are you trying to use the headphone socket or hdmi for audio? You can use either alsa or pulseaudio for sound - alsa is less bloat, but pulseaudio is probably easier via pavucontrol.
-
I am trying to use hdmi audio. I set the config to use force hdmi.
When I run the stream, an error pops up saying alsa.conf is missing. What should I do to fix this up?
Thanks!!
-
Ok my bad, I had to install alsa package.
One curious question, I think h264_mmal codec is missing in ffmpeg build probably that's why its so slow. Any chance we could have it for 13.x please?
Thanks!
-
It’s the h264m2m codec and it’s in ffmpeg - I believe you’ll need to load Xorg-3d and set the dtoverlay as per the info file.
-
Something like:
$ ffplay -i filename.mp4 -vcodec h264_v4l2m2m
I'm using an RPi4 with dtoverlay=vc4-kms-v3d-pi4
-
I discovered that the bcm2835 drivers were missing from the v4l-dvb-5.10.16-piCore-v7l extension - this has been corrected.
With the drivers, ffplay will not work with "-vcodec h264_v4l2m2m", which I suspect is due to a kernel bug - it works with the more recent kernel in aarch64.
In any case, this is on an RPi4 and I believe you are using an RPi3.
-
After updating ffmpeg in the piCore repos, ffplay now works with "-vcodec h264_v4l2m2m" on both RPi3 and RPi4.
-
there are many FLAGS for FFPLAY
$tcl................ ffplay -fast -framedrop -threads 4 -sync audio -cpuflags armv6 etc etc "THE MOVIE LINK.mp4"
an interesting flag is "-threads 4"
i believe you set it's value to the CORES of your cpu or logical THREADS your OS is seeing
from those cores.
thx
C.
-
or even
$tcl............ffplay -fast - framedrop -threads auto (other flags here) then "THE MOVIE LINK.mp4"
"-threads auto" flag
thx
C
-
Hello F,
here below is command line command and arguments used for FFPLAY media player
FOR RADIO (audio only)
tcl$........ffplay -nodisp -vn -threads auto -framedrop -fast -cpuflags -sse+sse2+sse3+sse4.1+sse4.2+mmx+avx -sync audio -infbuf -hide_banner "https://vprbbc.streamguys1.com/vprbbc24.mp3"
-------------------------------------------------------------------------------------
FOR COMBINED VIDEO and AUDIO STREAM (movie)
tcl$.........ffplay -fast -framedrop -cpuflags -sse+sse2+sse3+sse4.1+sse4.2+mmx+avx -threads auto -x 195 -y 158 -hide_banner -sync audio -infbuf " "the movie link.mp4"
where the above gives a nice small video window.
YOUR CPU FLAGS MAY DIFFER...........for example ( -cpuflags -armv6+something+somethin etc )
Thx
C