[mythtv-users] Raspberry PI 2 as a mythtv backend.

Chris Isip cmisipster at gmail.com
Tue Aug 11 17:58:06 UTC 2015


I again decided on a FINAL gstreamer pipeline and settled on 1750000
bitrate.  Who knows how final this would be.  The yadif deinterlace just
took too long to be practical.  I switched on to the ffmpeg deinterlacer
via libav.  I removed the cpulimit line and run the transcode full bore.
Hour length video encodes are now finnishing at about 3 hours (
approximately ).  At a bitrate setting of 1750000 bits, the file size is
reduced to about 16% of original.   And all system services seem to be
running fine.  The system remains stable.  The only issue concerning is
that mysql is sluggish in responding to queries with a transcode running in
the background.   So listing epg in mythweb is sluggish and there was an
instance when Kodi could not query the epg from mysql.  Renicing mysql
seemed to fix the Kodi issue.  This is becoming more and more a practical
fully functioning stand alone  myth server with transcode capability.

gst-launch-1.0  -e filesrc location="${INPUT}" \
! decodebin name=demux \
! queue \
! avenc_ac3 \
! mux. mpegtsmux name=mux \
! filesink location="temp.ts" demux. \
! queue \
! avdeinterlace \
! videoscale \
! videoconvert \
! omxh264enc target-bitrate=${TARGET_BIT_RATE} control-rate=1
inline-header=true periodicty-idr=250 interval-intraframes=250 \
! video/x-h264,width=${TARGET_WIDTH},height=${TARGET_HEIGHT}, \
      stream-format=byte-stream,profile=high \
! h264parse \
! mux. &

For anyone intersted here is the relative encoding times for various
deinterlace settings for a 30 second mpg video ( I used the Running wild
with Bear Grylls intro as it had a lot of scene transitions and interlacing
and fast motion):

0:01:48.652748817-out-deint-default-2MB-scale-.ts
0:00:55.908726491-out-deint-tomsmocomp-2MB-scale.ts
0:06:14.429371221-out-deint-greedyh-2MB-scale.ts
0:02:02.278393867-out-deint-greedyl-2MB-scale.ts
0:02:30.893909519-out-deint-vfir-2MB-scale.ts
0:01:48.811999772-out-deint-linear-2MB-scale.ts
0:02:20.386074013-out-deint-linearblend-2MB-scale.ts
0:01:46.741174898-out-deint-scalerbob-2MB-scale.ts
0:01:51.047711303-out-deint-weave-2MB-scale.ts
0:01:50.042523669-out-deint-weavetff-2MB-scale.ts
0:01:50.202601339-out-deint-weavebff-2MB-scale.ts
0:16:48.724998233-out-deint-yadif-2MB-scale.ts
0:01:37.221198306-out-avdeinterlace-2MB-scale.ts

The above times are for the gstreamer process only. I did not time the
subsequent ffmpeg conversion of audio to aacplus.
tomsmocomp was fastest but with deinterlacing artifacts ( broken horizontal
lines on fast motion ).  avdeinterlace did not have the artifacts and was
second fastest.  I'll post the question of improving the transcode pipeline
in gstreamer mailing list to see if further optimization can be done to
speed it up.  I'm particularly interested on maybe the possibility of
skipping the ac3 decode and subsequent reencode prior to muxing.

Have Fun!


On Tue, Aug 11, 2015 at 1:30 PM, Chris Isip <cmisipster at gmail.com> wrote:

> I'm using kodi as a frontend.  I think mythfrontend does not have support
> for the hardware mpeg2 and h264 decode yet.  Kodi does have a weather addon.
>
> On Mon, Aug 10, 2015 at 10:32 AM, George Nassas <gnassas at mac.com> wrote:
>
>> On Aug 8, 2015, at 8:31 PM, Chris Isip <cmisipster at gmail.com> wrote:
>>
>>
>> Mythtv uses myisam exclusively
>>
>>
>> Are you using the weather plugin for the frontend? I thought those tables
>> insisted on using innodb for some reason but that could have changed.
>>
>> - George
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150811/a8a3dbbb/attachment.html>


More information about the mythtv-users mailing list