lettier / movie-monad

:tv: A free and simple to use video player made with Haskell.
https://lettier.github.io/movie-monad
BSD 3-Clause "New" or "Revised" License
420 stars 24 forks source link

DNxHR Support on Linux #13

Open magdesign opened 6 years ago

magdesign commented 6 years ago

There is no DNxHR Support. Would be very nice if someone can implement this, FFMPEG v3 supports the new DNxHR and DNxHD formats. So far I am only able to play them with ffplay, would be nice to have a GUI like movie-nomad.

lettier commented 6 years ago

Hello @magdesign,

FFmpeg considers dnxhr to be a profile of dnxhd since dnxhr is meant to be backwards compatible.

Looking over the different profiles, Movie Monad supports the dnxhd profile since GStreamer supports it if you have gst-libav installed.

ffmpeg -h encoder=dnxhd
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
Encoder dnxhd [VC3/DNxHD]:
    General capabilities: threads 
    Threading capabilities: frame and slice
    Supported pixel formats: yuv422p yuv422p10le yuv444p10le gbrp10le
dnxhd AVOptions:
  -nitris_compat     <boolean>    E..V.... encode with Avid Nitris compatibility (default false)
  -ibias             <int>        E..V.... intra quant bias (from INT_MIN to INT_MAX) (default 0)
  -profile           <int>        E..V.... (from 0 to 5) (default dnxhd)
     dnxhd                        E..V....
     dnxhr_444                    E..V....
     dnxhr_hqx                    E..V....
     dnxhr_hq                     E..V....
     dnxhr_sq                     E..V....
     dnxhr_lb                     E..V....

I tried the other dnxhr_* profiles and yes you are correct. Movie Monad cannot play them since GStreamer cannot.

When attempting to discover a mxf file encoded with the dnxhr_* profile, GStreamer reports an internal data stream error.

An error was encountered while discovering the file
 Internal data stream error.

Not sure if this is a bug with GStreamer.

When attempting to discover a mov file encoded with the dnxhr_* profile, GStreamer reports missing plugins.

Missing plugins
 (gstreamer|1.0|gst-discoverer-1.0|video/x-gst-fourcc-AVdh decoder|decoder-video/x-gst-fourcc-AVdh)

GStreamer should support the other profiles since it uses FFmpeg which supports all the profiles listed up above.

gst-inspect-1.0  | grep -i dnxhd
libav:  avenc_dnxhd: libav VC3/DNxHD encoder
libav:  avdec_dnxhd: libav VC3/DNxHD decoder

I'll have to open a ticket with GStreamer to see if it should already support dnxhr and if not, can they add it to gst-libav.

Once GStreamer supports the various dnxhr_* profiles, Movie Monad will be able to play any video encoded with dnxhr.

:+1:

magdesign commented 6 years ago

Thanks! Hopefully the get an ear for this...