gnome3 Posted January 4, 2017 Posted January 4, 2017 Hello All, I have Orange Pi one board with Armbian 5.20 Desktop and Kodi/mpv/mplayer installed. I want to make OP1 a home media center. Desktop is set to 1080p60 (1920x1080p 60Hz, by h3disp script). My problem: Everything works perfect when playing videos mkv (x264/h264), mpeg2, mpeg etc. for mpv, mplayer, kodi even 1080p materials. But I have a problem playing videos coded with MPEG4 (popular avi xvid). MPV config: vo=vdpauhwdec=vdpaufs=yesframedrop=voVideo looks like this: http://pasteboard.co/i5YOuOebV.jpg When I use vo=x11 and video is not in fullscreen everyting is OK, on full screen i get: LIBGL: Initialising glshim Playing: The.English.Patient[Eng]Dvdrip.Dino.avi (+) Video --vid=1 (mpeg4) (+) Audio --aid=1 (mp3) [vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO. VO does not support requested hardware decoder, or loading it failed. AO: [pulse] 44100Hz stereo 2ch s16 Using software decoding. VO: [x11] 624x336 yuv420p [osd/libass] PlayResX undefined, setting to -1 AV: 00:00:03 / 02:35:08 (0%) A-V: 0.018 Dropped: 66 [ffmpeg] swscaler: No accelerated colorspace conversion found from yuv420p to bgra. AV: 00:00:03 / 02:35:08 (0%) A-V: 0.000 Dropped: 67 [vo/x11] can't keep up! Waiting for XShm completion events... AV: 00:00:15 / 02:35:08 (0%) A-V: 0.000 Dropped: 142 [ffmpeg] swscaler: No accelerated colorspace conversion found from yuv420p to bgra. AV: 00:00:19 / 02:35:08 (0%) A-V: 0.000 Dropped: 147 and image freezes or is see one frame every 1 second. Mplayer/SMplayer Evething is set to auto. Video looks like this: http://pasteboard.co/i62Avb8k9.jpg VLC behaves the same like mplayer. Kodi: Video look normal but it has only 15fps and there are frames drops. http://pasteboard.co/i6iSVoB2A.png vdpauinfo output: [VDPAU SUNXI] VE version 0x1680 opened [VDPAU SUNXI] OSD enabled, using pixman display: :0 screen: 0 API version: 1 Information string: sunxi VDPAU Driver Video surface: name width height types ------------------------------------------- 420 8192 8192 NV12 YV12 Decoder capabilities: name level macbs width height ------------------------------------------- MPEG1 0 32400 3840 2160 MPEG2_SIMPLE 3 32400 3840 2160 MPEG2_MAIN 3 32400 3840 2160 H264_BASELINE 51 32400 3840 2160 H264_MAIN 51 32400 3840 2160 H264_HIGH 51 32400 3840 2160 MPEG4_PART2_SP 5 32400 3840 2160 MPEG4_PART2_ASP 5 32400 3840 2160 Output surface: name width height nat types ---------------------------------------------------- B8G8R8A8 8192 8192 - R8G8B8A8 8192 8192 - Bitmap surface: name width height ------------------------------ B8G8R8A8 8192 8192 R8G8B8A8 8192 8192 Video mixer: feature name sup ------------------------------------ DEINTERLACE_TEMPORAL - DEINTERLACE_TEMPORAL_SPATIAL - INVERSE_TELECINE - NOISE_REDUCTION - SHARPNESS - LUMA_KEY - HIGH QUALITY SCALING - L1 - HIGH QUALITY SCALING - L2 - HIGH QUALITY SCALING - L3 - HIGH QUALITY SCALING - L4 - HIGH QUALITY SCALING - L5 - HIGH QUALITY SCALING - L6 - HIGH QUALITY SCALING - L7 - HIGH QUALITY SCALING - L8 - HIGH QUALITY SCALING - L9 - parameter name sup min max ----------------------------------------------------- VIDEO_SURFACE_WIDTH y 0 8192 VIDEO_SURFACE_HEIGHT y 0 8192 CHROMA_TYPE y LAYERS y 0 0 attribute name sup min max ----------------------------------------------------- BACKGROUND_COLOR - CSC_MATRIX - NOISE_REDUCTION_LEVEL - SHARPNESS_LEVEL - LUMA_KEY_MIN_LUMA - LUMA_KEY_MAX_LUMA - Video file information: Playing The.English.Patient[Eng]Dvdrip.Dino.avi. Detected file format: AVI (Audio Video Interleaved) (libavformat) [lavf] stream 0: video (mpeg4), -vid 0 [lavf] stream 1: audio (mp3), -aid 0 [ass] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.35 (COMPLEX) [ass] Using font provider fontconfig Clip info: encoder: VirtualDubMod 1.5.4.1 (build 2178/release) Load subtitles in . [VDPAU SUNXI] VE version 0x1680 opened [VDPAU SUNXI] OSD enabled, using pixman Selected video codec: MPEG-4 part 2 [libavcodec] Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123] AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400) AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample) Starting playback... VIDEO: 624x336 25.000 fps 0.0 kbps ( 0.0 kB/s) VO: [vdpau] 624x336 => 624x336 Planar YV12 Please help me solve this problem, so i could watch mpeg4 videos. 1
RagnerBG Posted January 5, 2017 Posted January 5, 2017 mpeg4 codec in vdpau for those boards is broken. For mplayer find config file, it usually is in /usr/local/etc/mplayer/mplayer.conf , but it can be in home folder also. And add this : vc=ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, But this will solve the problem for mplayer itself, not for SMplayer. I think i managed to solve the problem in SMplayer by adding this as custom parameter for launched mplayer. For mpv i haven't found full solution yet. The config file must be located here in Armbian - /etc/mpv/mpv.conf . And the parameter is "hwdec-codecs=all". I replace it with: hwdec-codecs=ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffhevcvdpau, and this solve the issue with mpeg4 files, but i guess i missing some encoder, because the picture become with different colors (more green) for h264 files and is a bit laggy although it's not droping frames. Maybe you could execute the player from terminal with those parameters for mpeg4 files only and leave parameter in config as it is. For vlc i have no clue. It have to be mplayer fork, but i don't now where vdpau codecs can be selected.
gnome3 Posted January 5, 2017 Author Posted January 5, 2017 Unfortunately RagnerBG your suggestion didnt work for me For mplayer: Playing The.English.Patient[Eng]Dvdrip.Dino.avi. Detected file format: AVI (Audio Video Interleaved) (libavformat) [lavf] stream 0: video (mpeg4), -vid 0 [lavf] stream 1: audio (mp3), -aid 0 [ass] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.35 (COMPLEX) [ass] Using font provider fontconfig Clip info: encoder: VirtualDubMod 1.5.4.1 (build 2178/release) Load subtitles in . Forced video codec: ffmpeg12vdpau Forced video codec: ffh264vdpau Forced video codec: ffhevcvdpau Cannot find codec matching selected -vo and video format 0x5634504D. Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123] AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400) AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... and no video, only sound. For mpv: video looks just like for mplayer in first post. Maybe there are some dependencies missing?
jernej Posted January 5, 2017 Posted January 5, 2017 AFAIK mpeg4 is only partially implemented. If it doesn't work for you, try to use SW decoding instead. Just run mpv without any argument/configuration file.
zador.blood.stained Posted January 5, 2017 Posted January 5, 2017 Just run mpv without any argument/configuration file. Default Armbian configuration file forces HW decoding, so it needs to be explicitly disabled or config file should be temporarily renamed. 1
RagnerBG Posted January 5, 2017 Posted January 5, 2017 Unfortunately RagnerBG your suggestion didnt work for me For mplayer: Playing The.English.Patient[Eng]Dvdrip.Dino.avi. Detected file format: AVI (Audio Video Interleaved) (libavformat) [lavf] stream 0: video (mpeg4), -vid 0 [lavf] stream 1: audio (mp3), -aid 0 [ass] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.35 (COMPLEX) [ass] Using font provider fontconfig Clip info: encoder: VirtualDubMod 1.5.4.1 (build 2178/release) Load subtitles in . Forced video codec: ffmpeg12vdpau Forced video codec: ffh264vdpau Forced video codec: ffhevcvdpau Cannot find codec matching selected -vo and video format 0x5634504D. Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123] AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400) AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... and no video, only sound. For mpv: video looks just like for mplayer in first post. Maybe there are some dependencies missing? Did you put comma at the end of forced codecs? vc=ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, This is the exact line for mplayer. Comma is important because it allow player to use external decoder if there is no compatible. This should be xvid which have to be build in all Armbian distros, but in case it's missing, you can install it manually. Or ffmpeg.
gnome3 Posted January 5, 2017 Author Posted January 5, 2017 Default Armbian configuration file forces HW decoding, so it needs to be explicitly disabled or config file should be temporarily renamed. I tried to run: mpv --vo=vdpau --hwdec=no <filename>.avi and result were the same as this http://pasteboard.co/i62Avb8k9.jpg. I tried every available posision from --hwdec=help: mpv --hwdec=help LIBGL: Initialising glshim Invalid value for option hwdec: help Valid values are: no auto auto-copy vdpau videotoolbox videotoolbox-copy vaapi vaapi-copy dxva2 dxva2-copy d3d11va d3d11va-copy rpi mediacodec
gnome3 Posted January 5, 2017 Author Posted January 5, 2017 Did you put comma at the end of forced codecs? vc=ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, This is the exact line for mplayer. Comma is important because it allow player to use external decoder if there is no compatible. This should be xvid which have to be build in all Armbian distros, but in case it's missing, you can install it manually. Or ffmpeg. I tried: mplayer -vc ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau -vo vdpau The.English.Patient\[Eng\]Dvdrip.Dino.avi mplayer --vc=ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau --vo=vdpau The.English.Patient\[Eng\]Dvdrip.Dino.avi mplayer -vc ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, -vo vdpau The.English.Patient\[Eng\]Dvdrip.Dino.avi mplayer --vc=ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, --vo=vdpau The.English.Patient\[Eng\]Dvdrip.Dino.avi Result was the same on my OP1. <http://pasteboard.co/i62Avb8k9.jpg>
RagnerBG Posted January 5, 2017 Posted January 5, 2017 You are right. I just tested and it's appear to nor working for all mpeg4 files. I tried 4 files, they looked like http://pasteboard.co/i5YOuOebV.jpg in mpv with "hwdec-codecs=all". With "hwdec-codecs=ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffhevcvdpau," 2 of the files start playing normal, other 2 looked like http://pasteboard.co/i62Avb8k9.jpg . So try other mpeg4 file. But this obviously is not the solution for all yet. I don't have mplayer installed at the moment, but as far as i remember when i compile it from source, mpeg4 files sometimes start playing fine (in SMplayer with ffodivxvdpau disabled). But it's a bit of dice game. Every of my compilation, with the same steps and almost the same packages, lead to different results.
gnome3 Posted January 5, 2017 Author Posted January 5, 2017 RagnerBG thank you for your explanation. This maybe sound like a dumb question, but is there anyway to change video codec on the fly (without writing to disk, example mpeg4->mkv (x264)) and then redirect videostream to mpv or mplayer?
rutopy Posted September 20, 2017 Posted September 20, 2017 +1 same issue on cubietruck, vc= is not supported now, how to fix this bug? up. ovc=ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, does not helped up2. change hwdec-codecs=all to hwdec-codecs=h264,vc1,wmv3,hevc,mpeg2video,vp9 helped, but CPU is 60% while mpeg4 playing
magicfiresnake Posted December 11, 2017 Posted December 11, 2017 My 2 cents. Im running Orange PI PC+ and so far my best option for mpv is : vo=x11 hwdec-codecs=all hwdec=auto That way , nonscaled movie (an xvid avi) plays smooth, but full screen is jaggy, with noticeable banding, but it plays... you can watch a movie... kind of like streaming from video sites. I don't know if is relevant: I've previously installed ffmpeg and the Codecs Pack from The Software Boutique. Probably not.
Naguissa Posted December 11, 2017 Posted December 11, 2017 Instead vo=x11 you could try vo=xvIt should perform a little bit better, even more on scaling.Enviado desde mi Jolla mediante Tapatalk
Recommended Posts