I would like to be able to open some uncompressed AVI's on mac via
Perian. FFMpeg is able to open then, but I'm not sure where to begin.
I'm not trying to pose this as a "feature request" but rather how can
I go about adding this ability and compiling the Perian component
myself.
This revision: http://trac.perian.org/ticket/419 seems to indicate
that it is now fairly straightforward to add a new codec, but
"uncompressed" or "rawvideo" (as is reported by ffmpeg) is not really
a codec.
I would greatly appreciate any pointers anyone can provide me to get
me started.
Thanks.
--Thanks.
You received this message because you are subscribed to the Google Groups "perian discussion" group.
To post to this group, send email to perian-...@googlegroups.com.
To unsubscribe from this group, send email to perian-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/perian-discuss?hl=en.
Thank you very much!
That link was a huge shove in the right direction. It only took a
moment to find that the REGISTER_DECODER() functions have been moved
out of ff_MovieImporter.c to FFMpegUtils.c.
I think I have a good idea of how to add codecs, but now I'm at the
point where I'd like to try to test my component.
I tried just drag-n-dropping my compiled Perian.component into my /
Library/QuickTime directory, but it appears to do nothing.
Must I reboot in order for my changed Perian component to get used by
the system or the QuickTime player app? Or is there a "safer" way to
test my builds without having to muck with the Perian that was
installed?
On Dec 21, 2:43 pm, Graham Booker <gboo...@cod3r.com> wrote:
> On Wed, Dec 21, 2011 at 4:29 PM, ischou <ic...@trinity.westhost.com> wrote:> > This revision:http://trac.perian.org/ticket/419seems to indicate
> > I would like to be able to open some uncompressed AVI's on mac via
> > Perian. FFMpeg is able to open then, but I'm not sure where to begin.
>
> That likely means that it can be played in Perian; depending on what color
> space the codec outputs.
>
> > I'm not trying to pose this as a "feature request" but rather how can
> > I go about adding this ability and compiling the Perian component
> > myself.
>
> > that it is now fairly straightforward to add a new codec, but> I'd start withhttp://trac.perian.org/changeset/1315 That should give you
> > "uncompressed" or "rawvideo" (as is reported by ffmpeg) is not really
> > a codec.
>
> a good start. FFmpeg (and us by extension) view these as codecs, so the
> terminology is still correct. The CODEC definition is a resourceID (I
> believe you make one here that's not in use), FFmpeg codec id, human
> readable name, human readable description, fourcc code. The m4 file is
> then used to generate .r, .h, and .c files.
>
> > I would greatly appreciate any pointers anyone can provide me to get
> > me started.
>
> If you get it working, let us know; we'd appreciate a patch.
>
>
>
>
>
>
>
> > Thanks.
> I found my problem. I had Perian.component in both /Library/Quicktime
> as well as ~/Library/Quicktime and the system kept ignoring the one
> that I put in /Library/Quicktime.
>
> I've added
>
> Codec(kRawVideoCodecInfoResID, CODEC_ID_RAWVIDEO, "Raw Video",
> "Decompresses video stored in raw uncompressed format.", 0x00000000 )
>
> to codecList.m4 and
>
> REGISTER_DECODER(rawvideo);
>
> to FFMpegUtils.c and things compile, but it seems that neither the
> getCodecID() never gets called. What registers a particular codec to
> be opened with Perian with QuickTime? Or is the 0x00000000 fourcc a
> problem?
Yes, that would likely be a problem; See below:
> I put some fprintf() into my code to prove that the one that I've
> compiled is getting called. I get those debug messages on the Console
> when I open AVI's with codecs that only Perian can handle, but I don't
> get any of my debugging messages when I try to open my uncompressed
> raw AVIs.
You can actually use the debugger. It's tricky, and Apple strives to make it more and more difficult. You can add QuickTime Player as an application to Xcode, and then debug it. You have to get info on the file and run it in 32-bit mode since it won't work in 64-bit mode (QuickTime's architecture is 32-bit). This will *NOT* work in QT Player 7 since Apple changed how dtrace works with it and my bug report on the subject was marked works as intended.
The codec entry adds, among other things, an entry to the resource files. Check the .r files to make sure it's in there. In there, it registers the Perian component as a codec for a particular fourcc or set of fourccs. I imagine that Apple's code will reject a fourcc of 0x00000000. The avi file likely assigns a fourcc to this codec already, so you should likely use that in the codec entry. I'd suggest using QT Player 7 as the info box tends to give you the fourcc. Otherwise, you can save a reference movie with it and open that with dumpster or something to see the fourcc there, but I think that putting printfs in the code is likely easier than this route. I'm betting the fourcc is ms followed by a 16-bit number since many of AVIs use these.
- Graham