<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[哪吒D1使用gstreamer硬解码 (转)]]></title><description><![CDATA[<p dir="auto">D1的tina系统支持了libcedar的openmax接口 使得gstreamer可以用gst-omx插件调用libcedar进行视频硬解码<br />
再加上tina支持了gst-aw插件 提供了gst的一个元件sunxifbsink  就是一个可以进行硬件转换YV12-&gt;RGB的硬件图层插件 即DE的应用<br />
这样一来 D1使用gst进行播放视频 效果会非常流畅</p>
<p dir="auto">演示环境搭建<br />
用PhoenixSuit.exe烧录flash镜像<br />
附件提供了flash镜像</p>
<p dir="auto">把视频文件用adb发送到D1 附件中提供了测试视频文件</p>
<pre><code>adb push D:\bad_apple.mp4 /root/
</code></pre>
<p dir="auto">使用playbin元件自动寻找元件播放音视频</p>
<pre><code>gst-launch-1.0 playbin uri=file:///root/bad_apple.mp4
</code></pre>
<p dir="auto">因为加了一些同类的元件 为了调试方便 再写几条用来测试的命令<br />
使用decodebin元件自动寻找解码器 指定fb元件播放视频</p>
<pre><code>gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! decodebin ! sunxifbsink
</code></pre>
<p dir="auto">指定硬解码器 指定fb元件播放视频</p>
<pre><code>gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! h264parse ! omxh264dec ! sunxifbsink
</code></pre>
<p dir="auto">指定元件播放音视频</p>
<pre><code>gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux name=demux demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! alsasink demux.video_0 ! queue ! h264parse ! omxh264dec ! sunxifbsink
</code></pre>
<p dir="auto">演示效果</p>
<p dir="auto">配置流程<br />
首先 SDK版本为tina1.01要打上0730补丁 要配置HDMI作为fb输出</p>
<p dir="auto">SDK配置</p>
<p dir="auto">make menuconfig<br />
-<em>- libcedarx<br />
Select cedarx configuration options  ---&gt;<br />
（拉到最后）<br />
{</em>} Add for openmax support</p>
<p dir="auto">Multimedia  ---&gt;</p>
<p dir="auto">&lt;<em>&gt; gst-omx<br />
-</em>- gstreamer1-libs<br />
Select GStreamer libraries  ---&gt;<br />
{ }Include all GStreamer1 core libraries<br />
*** Libraries ***<br />
-<em>- GStreamer core library libgstreamer1<br />
-</em>- GStreamer core library libgst1check<br />
-<em>- GStreamer core library libgst1controller<br />
-</em>- GStreamer core library libgst1net</p>
<p dir="auto">&lt;*&gt; gst1-libav（这个不是用来软解视频的 而是用来软解音频）</p>
<p dir="auto">&lt;<em>&gt; gstreamer1-plugins-aw<br />
Select GStreamer aw modules  ---&gt;<br />
{ } Include all GStreamer aw plugins<br />
*** Modules ***<br />
&lt;</em>&gt; GStreamer fbdev2sink module<br />
&lt;<em>&gt; GStreamer sunxifbsink module<br />
{</em>}   sunxi g2d rotation support<br />
*** Libraries ***<br />
-*- GStreamer framebuffersink library</p>
<p dir="auto">&lt;<em>&gt; gstreamer1-plugins-bad<br />
Select GStreamer bad modules and libraries  ---&gt;<br />
&lt;</em>&gt; GStreamer fbdevsink module<br />
&lt;<em>&gt; GStreamer id3tag module（MP3的id3信息封装）<br />
&lt;</em>&gt; GStreamer videoparsersbad module<br />
-*- GStreamer codecparsers library</p>
<p dir="auto">-<em>- gstreamer1-plugins-base<br />
Select GStreamer base modules and libraries  ---&gt;<br />
-</em>- GStreamer alsa module<br />
&lt;<em>&gt; GStreamer audioconvert module<br />
&lt;</em>&gt; GStreamer audiorate module<br />
&lt;<em>&gt; GStreamer audioresample module<br />
&lt;</em>&gt; GStreamer audiotestsrc module<br />
&lt;<em>&gt; GStreamer playback module （playbin元件 自动寻找连接元件）<br />
&lt;</em>&gt; GStreamer typefindfunctions module （这个是给playbin自动寻找解封装元件 之前不知道 导致playbin播不了）</p>
<p dir="auto">&lt;<em>&gt; GStreamer videoconvert module<br />
&lt;</em>&gt; GStreamer videorate module<br />
&lt;<em>&gt; GStreamer videoscale module<br />
&lt;</em>&gt; GStreamer videotestsrc module<br />
-<em>- GStreamer allocators library<br />
-</em>- GStreamer app library<br />
-<em>- GStreamer audio library<br />
-</em>- GStreamer pbutils library<br />
-<em>- GStreamer riff library<br />
-</em>- GStreamer rtp library<br />
-<em>- GStreamer tag library<br />
-</em>- GStreamer video library</p>
<p dir="auto">&lt;<em>&gt; gstreamer1-plugins-good<br />
Select GStreamer good modules  ---&gt;<br />
&lt;</em>&gt; GStreamer audioparsers module<br />
&lt;<em>&gt; GStreamer flv module<br />
&lt;</em>&gt; GStreamer id3demux module（MP3的id3信息解封装）<br />
&lt;<em>&gt; GStreamer matroska module（mkv文件解封装）<br />
&lt;</em>&gt; GStreamer isomp4 module（mp4文件解封装）<br />
&lt;*&gt; GStreamer soup module</p>
<p dir="auto">&lt;*&gt; gstreamer1-utils</p>
<p dir="auto">附件提供SDK配置的config文件 方便出问题排查<br />
配置完成后编译打包就可以了 如果编译报错 主要检查补丁有没生效</p>
<p dir="auto">文件下载： <a href="/assets/uploads/files/1631278874606-%E5%93%AA%E5%90%92d1%E4%BD%BF%E7%94%A8gstreamer%E7%A1%AC%E8%A7%A3%E7%A0%81%E9%99%84%E4%BB%B6.zip">哪吒D1使用gstreamer硬解码附件.zip</a></p>
<p dir="auto">转载地址： <a href="https://whycan.com/t_7078.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://whycan.com/t_7078.html</a><br />
原作者： @逸俊晨晖</p>
]]></description><link>https://bbs.aw-ol.com/topic/410/哪吒d1使用gstreamer硬解码-转</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 01:59:47 GMT</lastBuildDate><atom:link href="https://bbs.aw-ol.com/topic/410.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Sep 2021 13:06:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 哪吒D1使用gstreamer硬解码 (转) on Fri, 10 Sep 2021 13:08:49 GMT]]></title><description><![CDATA[<p dir="auto"></p><div class="embed-wrapper" style="max-width:100%">
   <div class="embed-container">
    <iframe src="/video-player.html?url=/assets/uploads/files/1631279293347-b49cb5a9e71012c06ce011a6251ce829.mp4" style="max-width:100%;border:0"></iframe>
  </div>
</div><p></p>
]]></description><link>https://bbs.aw-ol.com/post/1839</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/1839</guid><dc:creator><![CDATA[dreamer]]></dc:creator><pubDate>Fri, 10 Sep 2021 13:08:49 GMT</pubDate></item></channel></rss>