[MPlayer-dev-eng] Adding new codec to codecs.conf

compn tempn at mi.rr.com
Sat Jul 2 15:21:00 CEST 2016


On Thu, 30 Jun 2016 09:02:29 +0100
Mark Sugrue <mark at kinesensevca.com> wrote:

> Hi All,
> 
> I'm looking for some advice on adding a new codec to mplayer. The
> codec is for CCTV video (*.asf) and made by Quadrox Codec Pack
> WebCCTV (link -
> http://www.webcctv.com/ftp/SoftwareTools/CodecsPack/QuadroxCodecsPackSetup-4.3.0.0.exe )

do you have a sample jr24 video file we can test?

> The installer has two Dlls and I believe the OPJpegProc.dll is the
> one I need. fourcc is JR24 (this codec is some type of mjpeg, but
> ffmpeg doesn't play the files).

did you try ffmpeg -f mjpeg -i file.asf ?
or ffmpeg -vcodec mjpeg -i file.asf ?
or mplayer -vc +ffmjpeg file.asf 

cant hurt to try... :)

spready says jr24 is a modified mjpeg. so probably ffmpeg wont be able
to decode it.
https://spreadys.wordpress.com/2013/07/22/formats-standard-or-modified/

if you send us a sample, we maybe able to reverse engineer it.

> 
> I followed the instructions here (
> http://www.mplayerhq.hu/DOCS/tech/win32-codec-howto.txt) and here (
> http://www.mplayerhq.hu/DOCS/tech/codecs.conf.txt)
> 
> Using GraphEdit, I got this data:
> 
> [image: Inline image 1]
> 
> I have added this to codecs.conf, but mplayer doesn't play the video
> so I must have made an error:
> 
> videocodec qwtjr24
>   info "Quadrox Jr24"
>   status working
>   driver DMO
>   dll "OPJpegProc.dll"
>   fourcc JR24
>   guid 0x4A69B442, 0x28BE, 0x4991, 0x969C, 0xB500ADF5D8A8
>   ;guid 9004f687-fefc-4f8f-b23a-ddd3748082e7
>   out RGB24
> 
> The parts I am unsure about are:
> 
>  - Am I picking the right Guid from graphedit?

no, the 900 number is the right one.
you can tell by looking at other dmo decoders, 

@device:dmo:{9004F687-FEFC-4F8F-B23A-DDD3748082E7}{4A69B442-28BE-4991-969C-B500ADF5D8A8}
@device:dmo:{F371728A-6052-4D47-827C-D039335DFE0A}{4A69B442-28BE-4991-969C-B500ADF5D8A8}
@device:dmo:{82D353DF-90BD-4382-8BC2-3F6192B76E34}{4A69B442-28BE-4991-969C-B500ADF5D8A8}

the 4a6 guid is just to say its a dmo decoder, i think.
this info should probably go in the codecs.conf help files if its not
there already.

in your screenshot it says the dll is OPJPEGDecmprDMO.dll
so you need to put that in your codecs.conf dll entry.

OPJPEGDecmprDMO.dll , from what i've seen, requires mfplat.dll.
mfplat is only available on vista or newer windows os. this means it
will not work on winxp.

>  - how to format the guid in the correct way for codecs.conf

look at other DMO codecs.conf entries for guidance.

9004F687-FEFC-4F8F-B23A-DDD3748082E7
becomes
0x9004F687, 0xFEFC, 0x4F8F, 0xB2, 0x3A, 0xDD, 0xD3, 0x74, 0x80, 0x82, 0xE7


>  - What goes in 'out'?

'out' should be the supported output colorspaces. the codec mentions RGB24 in graphedit. 
so that seems good in your codecs.conf entry. sometimes this is not the case and you need BGR24 or BGR16 / BGR32. its not easy to figure it out, and usually requires trial and error.

>  - Whether some extra steps are needed for DMO codecs (these seem
> unusual).

its possible that other things are needed in the win32/loader code to get this codec working on linux, due to it requiring mfplat.dll. i have not tested. i need a sample video file to test with.

so try this, and let us know if it works on windows vista or newer:

 videocodec qwtjr24
   info "Quadrox Jr24"
   status working
   fourcc JR24
   driver DMO
   dll "OPJPEGDecmprDMO.dll"
   guid 0x9004F687, 0xFEFC, 0x4F8F, 0xB2, 0x3A, 0xDD, 0xD3, 0x74, 0x80, 0x82, 0xE7
   out RGB24

its also possible that the dll will not work in mplayer, due to the way some dlls reference other dlls in dmo codecs.

please let us know how it goes.

-compn


More information about the MPlayer-dev-eng mailing list