raspberry pi 4 ubuntu Desktop 21.04 64bit video playback with ffplay

The Raspberry Pi OS 32bit has omxplayer and vlc for video playback.

omxplayer and vlc support hardware acceleration.


I wonder how can I play video on 64bit OS, since there are no omxplayer.

I found the ffplay in ffmpeg is very useful.

(Default ubuntu video player is not working)


Depending on a video, it plays well.


On Ubuntu Desktop 21.04 64bit

sudo apt install ffmpeg   (ffplay is part of ffmpeg)

ffplay [file]

(v4l2 hardware acceleration supported for h264 and hevc)

ffmpeg -decoders | grep v4l2
V..... h264_v4l2m2m V4L2 mem2mem H.264 decoder wrapper (codec h264)
V..... hevc_v4l2m2m V4L2 mem2mem HEVC decoder wrapper (codec hevc)

If you use USB external sound card, then I recommend you do disable all other sound device except USB sound card. This way pi4 works more faster.

sudo apt-get install pavucontrol

run pavucontrol

go to Configuration, off all other audio devices.


I found that mpv is also good. it is faster than vlc for now.

sudo apt install mpv

(Only full-screen playback, vlc works fine.)

It seems mpv can be alternative for vlc.

(but ffplay is the fastest, since it is a command line tool.)


A h264 FHD video plays well.

A VP9 FHD video plays ok.

A HEVC video lightly encoded is ok. (if not light, flutters)

video resolution more than QHD(2K) and 10bit video are bad. (no good)


If you don't want to disable all other sound devices, but not happy with the default alsa device. Then below command may useful.

$ SDL_AUDIODRIVER="alsa" AUDIODEV="hw:1,0" ffplay [file]

about hw:1,0 use "aplay -l" to get information.

Card 1: aaaa, device 0: bbbb  will be printed. Focus to a Card and a device.




댓글

이 블로그의 인기 게시물

공유기 2개 쓰는데 동일 네트워크 구성하기 ASUS 공유기 + iptime 공유기, LAN, WIFI 연결

OneDrive가 바꾼 문서, 사진, 바탕화면 기본 폴더 복구하기(레지스트리 사용안하고 복구)

갤럭시북 이온 노트북 소음 잡기