[MPlayer-advusers] ID_DEMUXER=nuv + ID_VIDEO_FORMAT=RJPG --> no picture ?!

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon May 28 11:23:23 CEST 2007


Hello,
On Mon, May 28, 2007 at 10:55:40AM +0200, tormen at gmx.net wrote:
> > > Are the missing quantizers part of the .nuv container format or part of 
> > > the RJPG video compression?
> 
> > Not sure what exactly you mean.
> As far as I know .nuv is (just) a container format like .avi.
> RJPG is the video codec/format that is used to compress/encode the video 
> information inside this audio+video-container-nuv-file.
> 
> So I thought the missing information could be missing in the .nuv part 
> of the file or the RJPG part of the file... but maybe I am talking blue 
> here, because I am missing some video-format knowledge here... :-)

Well, they are not separate parts, but the demuxing seems to work fine.

> But is more likely that the information is missing in the RJPG part, 
> because...
> there is also the possibility to create .nuv files with DIVX inside with 
> mythtv. And these files can be played with mplayer!
> I appended file informations about such a file.

There are some RTJpeg nuv files that play in MPlayer, too, e.g. the
nirvana.nuv on our samples server.

[...]
> > > I know that I can't expect anything here.
> > I didn't say I wouldn't fix it, I just don't know yet exactly when and
> > how.
> You got this wrong. I wanted to express that "I can't expect anything 
> here", because it is not /your/ task to puzzle the format of mythtv, but 
> should be mythtv's task to provide you with the according information.
> I really did /not/ want to express in any way that I don't expect help 
> here or something. The opposite impression is the caase: I really find 
> you very helpfull / willing to help!

Ok, misunderstandings happen all the time with email esp. when not
speaking your own language ;-).

> P.S.: How can I get completly "english" output from mplayer?
> I tried to set all locales to POSIX... but still german.

You'd have to recompile for that, but don't worry I am the maintainer
for that format and I speak German so it's okay.
I got a bit of an image with attached patch, but it's still not quite
right.
I don't think I will install MythTV with that huge amount of
dependencies, but I should meet some people from MythTV at LinuxTag, so
I hope we can make some progress there.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libavcodec/nuv.c
===================================================================
--- libavcodec/nuv.c	(revision 9144)
+++ libavcodec/nuv.c	(working copy)
@@ -168,6 +168,28 @@
     return orig_size;
 }
 
+static uint8_t fallback_lquant[] = {
+     8,  5,  5,  8, 12, 20, 25, 30,
+     6,  6,  7,  9, 13, 29, 30, 27,
+     7,  6,  8, 12, 20, 28, 34, 28,
+     7,  8, 11, 14, 25, 43, 40, 31,
+     9, 11, 18, 28, 34, 54, 51, 38,
+    12, 17, 27, 32, 40, 52, 56, 46,
+    24, 32, 39, 43, 51, 61, 60, 50,
+    36, 46, 47, 49, 56, 50, 51, 49
+};
+
+static uint8_t fallback_cquant[] = {
+     8,  9, 12, 23, 49, 49, 49, 49,
+     9, 10, 13, 33, 49, 49, 49, 49,
+    12, 13, 28, 49, 49, 49, 49, 49,
+    23, 33, 49, 49, 49, 49, 49, 49,
+    49, 49, 49, 49, 49, 49, 49, 49,
+    49, 49, 49, 49, 49, 49, 49, 49,
+    49, 49, 49, 49, 49, 49, 49, 49,
+    49, 49, 49, 49, 49, 49, 49, 49
+};
+
 static int decode_init(AVCodecContext *avctx) {
     NuvContext *c = avctx->priv_data;
     avctx->width = (avctx->width + 1) & ~1;
@@ -188,6 +210,13 @@
     dsputil_init(&c->dsp, avctx);
     if (avctx->extradata_size)
         get_quant(avctx, c, avctx->extradata, avctx->extradata_size);
+    else {
+        int i;
+        for (i = 0; i < 64; i++) {
+          c->lq[i] = (fallback_lquant[i] << 8) / 177;
+          c->cq[i] = (fallback_cquant[i] << 8) / 177;
+        }
+    }
     rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
     return 0;
 }


More information about the MPlayer-advusers mailing list