MPV Video Player: GPU accelerated Player for Magic Lantern .mlv raw video files

Started by reddeercity, November 15, 2018, 07:06:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

reddeercity

Yes that right GPU accelerated Video player that supports Magic Lantern MLV's !
Just drop & drag  :D



It's uses FFMpeg (RAW Codec) & other open source code , the best part it's a active project .
The black level is off (green cast) but still good to check the files with @ real time play back !!!
Plus it's can be used in command line/terminal , plus many other great features .

Being it's a active project , I'm sure the black level can be fixed

mpv.io Player
mpv-player Source Code

Edit: Seem this has been discussed on github there a work around
use the -vf lut3d command
https://github.com/mpv-player/mpv/issues/4949

issue with ffmpeg's bayer_rggb16 -> rgb24 conversion.
Log file from mpv player

masc

Nice! But where have you found the information that it is GPU based? Would be nice to know how they realized that...
I get maybe around 10-15fps and after 2 seconds the app crashes. I think the greenish look is not only a black level issue - for me it looks the RGGB from RAW is directly leaded to RGB output, without processing at all. At least when commenting out MLVApps processing pipeline (->just debayering the RAW) it looks nearly identical.
5D3.113 | EOSM.202

Danne

You're right masc and hopefully means you can patch and commit a fix for ffmpeg  :D? Would be a great contribution.

ilia3101

Quote from: masc on November 15, 2018, 08:17:33 AM
for me it looks the RGGB from RAW is directly leaded to RGB output, without processing at all.

This is the impression I got when I tested it out before.

Is this playback done with ffmpeg?

Danne

mpv is a fork of ffplay/ffmpeg. I can see if I can find the code parts for mlv in ffmpeg.

Danne

In ffmpeg code here:
https://github.com/FFmpeg/FFmpeg.git

This place:
/FFmpeg-master/libavformat/mlvdec.c

Can´t find it for mpv player?


reddeercity

Quote from: masc on November 15, 2018, 08:17:33 AM
Nice! But where have you found the information that it is GPU based?
It on the windows platform , maybe not on all platforms , I'm running a older build
mpv-x86_64-20161210-git-82855be from dec/2016
In case you can't find it I uploaded to my bitbucket account here the link
mpv-x86_64-20161210-git-82855be.7z

You have to run the
configure-opengl-hq.bat  ,

@echo OFF
cd /D %~dp0\..
set mpv_path=%cd%\mpv.exe
set config_dir=%cd%\mpv
set config_file=%cd%\mpv\mpv.conf
if not exist "%mpv_path%" call :die "mpv.exe not found"
echo.
echo.
echo ////////////////////////////////////////////////////////////////////////////
echo                                                                            /
echo  This script will configure mpv player to use opengl-hq video output for   /
echo  high-quality video rendering.                                             /
echo                                                                            /
echo  Opengl-hq will configure to use many useful video filters like debanding  /
echo  filter,dithering..                                                        /
echo                                                                            /
echo  If the played video lagging a lot after using opengl-hq, delete the "mpv" /
echo  folder to use default mpv's video output (opengl) which suitable for      /
echo  slower computer.                                                          /
echo                                                                            /
echo                                                                            /
echo  Make sure you have write permission to create folder,                     /
echo  %config_dir%
echo                                                                            /
echo  For more info about mpv's settings, read doc\manual.pdf                   /
echo  or visit https://mpv.io/manual/master/                                    /
echo                                                                            /
echo ////////////////////////////////////////////////////////////////////////////
echo.
echo Press "Enter" to continue..
echo.
set /P enterKey={ENTER}

mkdir "%config_dir%"
echo # High quality video rendering for fast computer. > "%config_file%"
echo profile=opengl-hq >> "%config_file%"

:die
if not [%1] == [] echo %~1
pause
exit 1


mpv/changes/2016-12-25
QuoteAdded
•vo_opengl: hwdec_cuda: Support P016 output surfaces
•hwdec_cuda: allow building without CUDA SDK (load CUDA dynamically)

mpv/logs

This looks like the start of the gpu acceleration implementation
mpv/commit/vo_opengl: hwdec_cuda: Use dynamic loading for cuda functions

@masc & Ilia3101
maybe something that like this can be implemented MLV App ?

Edit: Ok found the New GPU build
sourceforge.net/projects/mpv-player-windows/files/64bit
mpv-x86_64-20181110-git-317d3ac.7z

https://mpv.io/manual/stable/

https://mpv.io/manual/stable/#playing-dvds
some stuff on gpu here

https://mpv.io/manual/stable/#video
Ok here you go , look like Windows , OS X (10.8 and up) & Linux are supported
https://mpv.io/manual/stable/#options-hwdec

Quote--hwdec=<api>
Specify the hardware video decoding API that should be used if possible.
Whether hardware decoding is actually done depends on the video codec. If hardware decoding is not possible, mpv will fall back on software decoding

no:always use software decoding (default)
auto:enable best hw decoder (see below)
yes:exactly the same as auto
auto-copy:enable best hw decoder with copy-back (see below)
vdpau:requires --vo=gpu or --vo=vdpau (Linux only)
vdpau-copy:copies video back into system RAM (Linux with some GPUs only)
vaapi:requires --vo=gpu or --vo=vaapi (Linux only)
vaapi-copy:copies video back into system RAM (Linux with some GPUs only)
videotoolbox:requires --vo=gpu (OS X 10.8 and up), or --vo=opengl-cb (iOS 9.0 and up)
videotoolbox-copy:copies video back into system RAM (OS X 10.8 or iOS 9.0 and up)
dxva2:requires --vo=gpu with --gpu-context=d3d11, --gpu-context=angle or --gpu-context=dxinterop (Windows only)
dxva2-copy:copies video back to system RAM (Windows only)
d3d11va:requires --vo=gpu with --gpu-context=d3d11 or --gpu-context=angle (Windows 8+ only)
d3d11va-copy:copies video back to system RAM (Windows 8+ only)
mediacodec:requires --vo=mediacodec_embed (Android only)
mediacodec-copy:copies video back to system RAM (Android only)
mmal:requires --vo=gpu (Raspberry Pi only - default if available)
mmal-copy:copies video back to system RAM (Raspberry Pi only)
cuda:requires --vo=gpu (Any platform CUDA is available)
cuda-copy:copies video back to system RAM (Any platform CUDA is available)
nvdec:requires --vo=gpu (Any platform CUDA is available)
nvdec-copy:copies video back to system RAM (Any platform CUDA is available)
crystalhd:copies video back to system RAM (Any platform supported by hardware)
rkmpp:requires --vo=gpu (some RockChip devices only)