> I suppose the problem is that I don't have the correct codec. I tried
> CODEC_ID_RAWVIDEO (probably a dumb idea), but I couldn't find anything
> else that would fit. Can somebody please give me a hint on how to embed
> non-AV data in the final stream?
Replying to myself again.. as it seems, CODEC_ID_RAWVIDEO wasn't such a
dumb idea after all. I've managed to embed my data frames in the AVI
file successfully, however, now I have problems with decoding them
again. I noted that while avienc.c is able to correctly generate a
'dats' header, avidec.c is not able to read them again and fails.

I think it's a bit odd that one part of ffmpeg can write files that the
other part can't read anymore, so here's a tiny patch which at least
allows the stream to be read:

--- avidec.old  2008-06-09 09:06:01.000000000 +0200
+++ avidec.c    2008-06-09 09:06:34.000000000 +0200
@@ -411,6 +411,9 @@
                 //FIXME
                 codec_type = CODEC_TYPE_DATA; //CODEC_TYPE_SUB ?  FIXME
                 break;
+            case MKTAG('d', 'a', 't', 's'):
+                codec_type = CODEC_TYPE_DATA;
+                break;
             default:
                 av_log(s, AV_LOG_ERROR, "unknown stream type %X\n",
tag1);
                 goto fail;

In case the whitespace gets messed up, I have also attached the patch as
a file. Please tell me what you think - is this the right way to go?

On a different topic: I still have some problems understanding how to
handle the pts values.. do I have to generate them? How? Can somebody
point me to a more detailed description?

Thanks again, Yours, Florian
-- 
0666 - Filemode of the Beast
--- avidec.old	2008-06-09 09:06:01.000000000 +0200
+++ avidec.c	2008-06-09 09:06:34.000000000 +0200
@@ -411,6 +411,9 @@
                 //FIXME
                 codec_type = CODEC_TYPE_DATA; //CODEC_TYPE_SUB ?  FIXME
                 break;
+            case MKTAG('d', 'a', 't', 's'):
+                codec_type = CODEC_TYPE_DATA;
+                break;
             default:
                 av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1);
                 goto fail;
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to