This is an excellent piece of work! It's a shame ffmpeg isn't as efficient as coreavc for h.264 content.<br><br>Thanks for sharing this!!<br><br>- Mark.<br><br><div><span class="gmail_quote">On 4/13/06, <b class="gmail_sendername">
Alan Nisota</b> &lt;<a href="mailto:alannisota@gmail.com">alannisota@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In order to be able to view h264 encoded material in HD on my machine,<br>I have been searching for a solution.&nbsp;&nbsp;ffh264 is too slow to handle<br>720p on my 2.8GHz P4, which I use as my frontend.&nbsp;&nbsp;I thought I was out<br>of luck, until someone pointed out CoreAVCDecoder, which is a
<br>DirectShow filter for Windows, and can play HD h.264 material capably<br>on my hardware.&nbsp;&nbsp;the only problem was, of course, that it only exists<br>for Windows.&nbsp;&nbsp;Well, mplayer can use DirectShow filters, so i thought<br>
perhaps I could use that to play my videos in linux.&nbsp;&nbsp;Of course, the<br>directshow capability in mplayer is basically unsupported, and<br>coreavcdecoder didn't work out of the box.&nbsp;&nbsp;After a bit of mucking<br>around though, I was able to get it working.&nbsp;&nbsp;And then the CoreCodec
<br>team released version 1.0, which does much more significant input<br>validation, as well as including a registration key, and some other<br>difficulties.&nbsp;&nbsp;After a lot more work, I was able to get 1.0 working<br>with mplayer as well.&nbsp;&nbsp;I then moved on to incorporating the decoder
<br>into myth, which turned out not to be difficult at all.<br><br>So, I now have myth using a Windows DirectShow filter to playback H264<br>media, and it is actually able to do so in real time with HD content!<br><br>I am not sure what the myth developers' take on this will be.&nbsp;&nbsp;The
<br>interface code is all based on wine, and is GPL, however the actual<br>driver is non-free (costs between $10 and $20 depending on which<br>version you buy).&nbsp;&nbsp;the old codec 0.0.4 is still meandering about the<br>net, but I would expect that without a license it cannot be legally
<br>redistributed.<br><br>the directshow code could certainly be made to work with other filters<br>as well, though, in general, the free codecs are good enough, so there<br>is no need.&nbsp;&nbsp;Also, since libavformat is still used to split the
<br>streams, it is unlikely it would be useful for handling codecs that<br>aren't available in ffmpeg.&nbsp;&nbsp;If there is any interest in getting this<br>type of functionality into myth, I'll be happy to clean up the patches<br>
and submit them, though.<br><br>So, with all that in mind, here is what I've got:<br><br>apply the patch located here:<br><a href="http://www.files.bz/files/9309/Mythtv/directshow.patch.20060413.bz2">http://www.files.bz/files/9309/Mythtv/directshow.patch.20060413.bz2
</a><br><br>copy the following file into ~mythtv/.mythtv (or whatever user runs<br>the forntend):<br><a href="http://www.files.bz/files/9309/Mythtv/dshowcodecs">http://www.files.bz/files/9309/Mythtv/dshowcodecs</a><br><br>
Purchase CoreAVCDecoder (<a href="http://coreavc.corecodec.org">coreavc.corecodec.org</a>) and install via wine<br>(or if you already have 0.0.4 you can use that instead).<br>copy CoreAVCDecoder.ax to /usr/lib/win32/<br>edit dshowcodecs and change the user-id and product-key to the values
<br>found in your wine registry (~/.wine/system.reg)<br><br>from your mythtv dir:<br>cd libs/libdshowloader &amp;&amp; make &amp;&amp; cd dshow &amp;&amp; make &amp;&amp; cd ../../..<br>build myth as usual.<br><br>You should be good to go.
<br>Caveats:<br>It is likely to only work with linux and gcc/glibc, as I played some<br>tricks with the exception handler in order to load the module.<br>It has only been tested on 32bit machines, I have no idea what will
<br>happen if you try to compile on a 64bit one.<br>The code is still very rough.&nbsp;&nbsp;a lot of work would be needed to make<br>it copile without warnings and as a proper library<br>Because we are using a binary, if it crashes, it is likely there is
<br>nothing I can do to help.<br><br>If you are interested in the mplayer version, it can be found here:<br><a href="http://www.files.bz/files/9309/Mythtv/mplayer_coreavc.patch.20060413.bz2">http://www.files.bz/files/9309/Mythtv/mplayer_coreavc.patch.20060413.bz2
</a><br>you need to directly edit DS_VideoDecoder.c and add your user-id/key<br>there (search for 'Joe User' to find where), and you need to add<br>something like this to your codecs.conf file:<br>videocodec coreavc<br>&nbsp;&nbsp;info &quot;CoreAVC DShow H264 decoder for x86 - 
<a href="http://corecodec.org/">http://corecodec.org/</a>&quot;<br>&nbsp;&nbsp;status untested<br>&nbsp;&nbsp;format 0x10000005<br>;&nbsp;&nbsp;format 0x31637661 ; avc1<br>&nbsp;&nbsp;fourcc H264,h264<br>&nbsp;&nbsp;fourcc X264,x264<br>&nbsp;&nbsp;fourcc avc1<br>&nbsp;&nbsp;fourcc davc,DAVC
<br>&nbsp;&nbsp;driver dshow<br>&nbsp;&nbsp;dll &quot;CoreAVCDecoder.ax&quot;<br>&nbsp;&nbsp;guid 0x09571a4b, 0xf1fe, 0x4c60, 0x97, 0x60, 0xde, 0x6d, 0x31, 0x0c,<br>0x7c, 0x31<br>&nbsp;&nbsp;out YV12,IYUV,I420,YUY2<br>_______________________________________________
<br>mythtv-dev mailing list<br><a href="mailto:mythtv-dev@mythtv.org">mythtv-dev@mythtv.org</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev</a><br>
</blockquote></div><br>