Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Mythtvnz

Question about building Pauls Mythtv + Patches

 

 

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded


graeme.joy at paradise

Aug 23, 2008, 7:18 PM

Post #1 of 10 (882 views)
Permalink
Question about building Pauls Mythtv + Patches

Sorry if I've missed the obvious places for the instructions. I can
only find references to the tar ball...

This is the deb for the binary

deb http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main


Are there deb-source packages available that can be modified and built
into debs the "debian way " rather then the tar ball approach.

This way all the development file dependencies are taken care of making
the source much easier to build

If so what is the deb-src line I need to use, what does the apt-get line
look like?

My CPU isn't quite fast enough for TV3 so I need to make binaries that
have it enabled.

Thats unless somebody else has made some custom debs with it enabled?

I'm quite happy changing files but don't have the time to manually
satisfy all the dev dependencies.


Thanks

_______________________________________________
mythtvnz mailing list
mythtvnz[at]lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


steven at openmedia

Aug 23, 2008, 7:57 PM

Post #2 of 10 (858 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

On 24/08/2008, at 2:18 PM, Graeme Woollett wrote:

> Sorry if I've missed the obvious places for the instructions. I can
> only find references to the tar ball...
>
> This is the deb for the binary
>
> deb http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
>

Add the following for getting the source as well

deb-src http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main


>
> Are there deb-source packages available that can be modified and built
> into debs the "debian way " rather then the tar ball approach.
>
> This way all the development file dependencies are taken care of
> making
> the source much easier to build
>
> If so what is the deb-src line I need to use, what does the apt-get
> line
> look like?
>
> My CPU isn't quite fast enough for TV3 so I need to make binaries that
> have it enabled.

Thinking the same myself

>
> Thats unless somebody else has made some custom debs with it enabled?
>
> I'm quite happy changing files but don't have the time to manually
> satisfy all the dev dependencies.


mkdir src
cd src
sudo apt-get source mythtv
sudo apt-get build-dep mythtv

You should then have an Ubuntu/Debian friendly build tree to play with.

Steve



Steven Ellis - Technical Director
OpenMedia Limited
email - steven[at]openmedia.co.nz
website - http://www.openmedia.co.nz


steven at openmedia

Aug 23, 2008, 10:10 PM

Post #3 of 10 (858 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

On 24/08/2008, at 2:57 PM, Steven Ellis wrote:

>
> On 24/08/2008, at 2:18 PM, Graeme Woollett wrote:
>
>> Sorry if I've missed the obvious places for the instructions. I can
>> only find references to the tar ball...
>>
>> This is the deb for the binary
>>
>> deb http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
>>
>
> Add the following for getting the source as well
>
> deb-src http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
>
>
>>
>> Are there deb-source packages available that can be modified and
>> built
>> into debs the "debian way " rather then the tar ball approach.
>>
>> This way all the development file dependencies are taken care of
>> making
>> the source much easier to build
>>
>> If so what is the deb-src line I need to use, what does the apt-get
>> line
>> look like?
>>
>> My CPU isn't quite fast enough for TV3 so I need to make binaries
>> that
>> have it enabled.
>
> Thinking the same myself
>
>>
>> Thats unless somebody else has made some custom debs with it enabled?
>>
>> I'm quite happy changing files but don't have the time to manually
>> satisfy all the dev dependencies.
>
>
> mkdir src
> cd src
> sudo apt-get source mythtv
> sudo apt-get build-dep mythtv
>
> You should then have an Ubuntu/Debian friendly build tree to play
> with.
>

Well I just had a try with the skip loop filter patch which helped a
little bit.

Also tried running the system with a CPU disabled to see how it would
affect performance and it made the HD channels unusable on an AMD 3600
X2.

Going to try a rebuild with CODEC_FLAG2_FAST enabled in addition to
the skiploopfilter.

Steve



Steven Ellis - Technical Director
OpenMedia Limited
email - steven[at]openmedia.co.nz
website - http://www.openmedia.co.nz


steven at openmedia

Aug 23, 2008, 10:46 PM

Post #4 of 10 (854 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

On 24/08/2008, at 5:10 PM, Steven Ellis wrote:

>
> On 24/08/2008, at 2:57 PM, Steven Ellis wrote:
>
>>
>> On 24/08/2008, at 2:18 PM, Graeme Woollett wrote:
>>
>>> Sorry if I've missed the obvious places for the instructions. I can
>>> only find references to the tar ball...
>>>
>>> This is the deb for the binary
>>>
>>> deb http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
>>>
>>
>> Add the following for getting the source as well
>>
>> deb-src http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
>>
>>
>>>
>>> Are there deb-source packages available that can be modified and
>>> built
>>> into debs the "debian way " rather then the tar ball approach.
>>>
>>> This way all the development file dependencies are taken care of
>>> making
>>> the source much easier to build
>>>
>>> If so what is the deb-src line I need to use, what does the apt-
>>> get line
>>> look like?
>>>
>>> My CPU isn't quite fast enough for TV3 so I need to make binaries
>>> that
>>> have it enabled.
>>
>> Thinking the same myself
>>
>>>
>>> Thats unless somebody else has made some custom debs with it
>>> enabled?
>>>
>>> I'm quite happy changing files but don't have the time to manually
>>> satisfy all the dev dependencies.
>>
>>
>> mkdir src
>> cd src
>> sudo apt-get source mythtv
>> sudo apt-get build-dep mythtv
>>
>> You should then have an Ubuntu/Debian friendly build tree to play
>> with.
>>
>
> Well I just had a try with the skip loop filter patch which helped a
> little bit.
>
> Also tried running the system with a CPU disabled to see how it
> would affect performance and it made the HD channels unusable on an
> AMD 3600 X2.
>
> Going to try a rebuild with CODEC_FLAG2_FAST enabled in addition to
> the skiploopfilter.
>
>

My current patch to libs/libmythtv/avformatdecoder.cpp around line
1588 is as follows

if (CODEC_ID_H264 == enc->codec_id)
{
VERBOSE(VB_PLAYBACK, LOC + "Turning off loop
filter");
enc->skip_loop_filter = AVDISCARD_ALL;
VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast decode
mode");
enc->flags |= CODEC_FLAG2_FAST;
}

This appears to give me a 4-5 % boost on the SD channels, and possibly
15-30% on the HD channels. It is hard to tell on TV One HD at the
moment as the bitrate for the sports is all over the place. TV3 is
almost watch-able on my CPU so hopefully Graeme will get full support
on his 5600 X2. Watching TV2 now sits at an average of 70-80% rather
than close to 100%.

Paul - I'd love to get any additional patches you have to stabilise
the audio. I haven't had time to play with debug builds to trace the
audio segfaults yet.

Steve



Steven Ellis - Technical Director
OpenMedia Limited
email - steven[at]openmedia.co.nz
website - http://www.openmedia.co.nz


paul at kcbbs

Aug 24, 2008, 12:12 AM

Post #5 of 10 (852 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

On Sunday 24 August 2008 17:46:28 Steven Ellis wrote:
> On 24/08/2008, at 5:10 PM, Steven Ellis wrote:
> > On 24/08/2008, at 2:57 PM, Steven Ellis wrote:
> >> On 24/08/2008, at 2:18 PM, Graeme Woollett wrote:
> >>> Sorry if I've missed the obvious places for the instructions. I can
> >>> only find references to the tar ball...
> >>>
> >>> This is the deb for the binary
> >>>
> >>> deb http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
> >>
> >> Add the following for getting the source as well
> >>
> >> deb-src http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
> >>
> >>> Are there deb-source packages available that can be modified and
> >>> built
> >>> into debs the "debian way " rather then the tar ball approach.
> >>>
> >>> This way all the development file dependencies are taken care of
> >>> making
> >>> the source much easier to build
> >>>
> >>> If so what is the deb-src line I need to use, what does the apt-
> >>> get line
> >>> look like?
> >>>
> >>> My CPU isn't quite fast enough for TV3 so I need to make binaries
> >>> that
> >>> have it enabled.
> >>
> >> Thinking the same myself
> >>
> >>> Thats unless somebody else has made some custom debs with it
> >>> enabled?
> >>>
> >>> I'm quite happy changing files but don't have the time to manually
> >>> satisfy all the dev dependencies.
> >>
> >> mkdir src
> >> cd src
> >> sudo apt-get source mythtv
> >> sudo apt-get build-dep mythtv
> >>
> >> You should then have an Ubuntu/Debian friendly build tree to play
> >> with.
> >
> > Well I just had a try with the skip loop filter patch which helped a
> > little bit.
> >
> > Also tried running the system with a CPU disabled to see how it
> > would affect performance and it made the HD channels unusable on an
> > AMD 3600 X2.
> >
> > Going to try a rebuild with CODEC_FLAG2_FAST enabled in addition to
> > the skiploopfilter.
>
> My current patch to libs/libmythtv/avformatdecoder.cpp around line
> 1588 is as follows
>
> if (CODEC_ID_H264 == enc->codec_id)
> {
> VERBOSE(VB_PLAYBACK, LOC + "Turning off loop
> filter");
> enc->skip_loop_filter = AVDISCARD_ALL;
> VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast decode
> mode");
> enc->flags |= CODEC_FLAG2_FAST;
> }
>
> This appears to give me a 4-5 % boost on the SD channels, and possibly
> 15-30% on the HD channels. It is hard to tell on TV One HD at the
> moment as the bitrate for the sports is all over the place. TV3 is
> almost watch-able on my CPU so hopefully Graeme will get full support
> on his 5600 X2. Watching TV2 now sits at an average of 70-80% rather
> than close to 100%.
>
> Paul - I'd love to get any additional patches you have to stabilise
> the audio. I haven't had time to play with debug builds to trace the
> audio segfaults yet.
>
> Steve
>
>
>
> Steven Ellis - Technical Director
> OpenMedia Limited
> email - steven[at]openmedia.co.nz
> website - http://www.openmedia.co.nz

The main problem with the audio is that it seems the sse2 version of
float_to_int16_interleave_sse2 causes the segfault. What I did to fix this was
to go the end of libavcodec/i386/dsputil_mmx.c change the assignment
c->float_to_int16_interleave = float_to_int16_interleave_sse2;
on line 2864 to
c->float_to_int16_interleave = float_to_int16_interleave_sse;

That fixed the audio for me. YMMV.

Cheers
Paul

_______________________________________________
mythtvnz mailing list
mythtvnz[at]lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


steven at openmedia

Aug 24, 2008, 3:17 PM

Post #6 of 10 (813 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

On 24/08/2008, at 7:12 PM, Paul Kendall wrote:

> On Sunday 24 August 2008 17:46:28 Steven Ellis wrote:
>> On 24/08/2008, at 5:10 PM, Steven Ellis wrote:
>>
>> My current patch to libs/libmythtv/avformatdecoder.cpp around line
>> 1588 is as follows
>>
>> if (CODEC_ID_H264 == enc->codec_id)
>> {
>> VERBOSE(VB_PLAYBACK, LOC + "Turning off loop
>> filter");
>> enc->skip_loop_filter = AVDISCARD_ALL;
>> VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast decode
>> mode");
>> enc->flags |= CODEC_FLAG2_FAST;
>> }
>>
>> This appears to give me a 4-5 % boost on the SD channels, and
>> possibly
>> 15-30% on the HD channels. It is hard to tell on TV One HD at the
>> moment as the bitrate for the sports is all over the place. TV3 is
>> almost watch-able on my CPU so hopefully Graeme will get full support
>> on his 5600 X2. Watching TV2 now sits at an average of 70-80% rather
>> than close to 100%.
>>
>> Paul - I'd love to get any additional patches you have to stabilise
>> the audio. I haven't had time to play with debug builds to trace the
>> audio segfaults yet.
>>
>> Steve
>>
>
> The main problem with the audio is that it seems the sse2 version of
> float_to_int16_interleave_sse2 causes the segfault. What I did to
> fix this was
> to go the end of libavcodec/i386/dsputil_mmx.c change the assignment
> c->float_to_int16_interleave = float_to_int16_interleave_sse2;
> on line 2864 to
> c->float_to_int16_interleave = float_to_int16_interleave_sse;
>
> That fixed the audio for me. YMMV.
>
>

Thanks Paul for that tip. It does appear to be a more stable if I use
the SSE call.

Steve


Steven Ellis - Technical Director
OpenMedia Limited
email - steven[at]openmedia.co.nz
website - http://www.openmedia.co.nz


graeme.joy at paradise

Aug 25, 2008, 2:45 AM

Post #7 of 10 (795 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

>>> My current patch to libs/libmythtv/avformatdecoder.cpp around line
>>> 1588 is as follows
>>>
>>> if (CODEC_ID_H264 == enc->codec_id)
>>> {
>>> VERBOSE(VB_PLAYBACK, LOC + "Turning off loop
>>> filter");
>>> enc->skip_loop_filter = AVDISCARD_ALL;
>>> VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast decode
>>> mode");
>>> enc->flags |= CODEC_FLAG2_FAST;
>>> }
>>
The above patch appears to have lowered the CPU demand on 720p, doesn't
go above 80%.
Alias TV3 is still topping out the CPU peaking at 113% at nice -17.
Still no cigar.
Are there any other fiddles I can do to get TV3 to play without stuttering

>> The main problem with the audio is that it seems the sse2 version of
>> float_to_int16_interleave_sse2 causes the segfault. What I did to fix
>> this was
>> to go the end of libavcodec/i386/dsputil_mmx.c change the assignment
>> c->float_to_int16_interleave = float_to_int16_interleave_sse2;
>> on line 2864 to
>> c->float_to_int16_interleave = float_to_int16_interleave_sse;
>>
>> That fixed the audio for me. YMMV.
>>
The above change with SSE2 to SSE has made a big difference to the stability


_______________________________________________
mythtvnz mailing list
mythtvnz[at]lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


steven at openmedia

Aug 25, 2008, 3:00 AM

Post #8 of 10 (795 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

On 25/08/2008, at 9:45 PM, graeme wrote:

>
>>>> My current patch to libs/libmythtv/avformatdecoder.cpp around line
>>>> 1588 is as follows
>>>>
>>>> if (CODEC_ID_H264 == enc->codec_id)
>>>> {
>>>> VERBOSE(VB_PLAYBACK, LOC + "Turning off loop
>>>> filter");
>>>> enc->skip_loop_filter = AVDISCARD_ALL;
>>>> VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast decode
>>>> mode");
>>>> enc->flags |= CODEC_FLAG2_FAST;
>>>> }
>>>
> The above patch appears to have lowered the CPU demand on 720p,
> doesn't
> go above 80%.
> Alias TV3 is still topping out the CPU peaking at 113% at nice -17.
> Still no cigar.
> Are there any other fiddles I can do to get TV3 to play without
> stuttering


Bugger. Well it looks like we need some of the ffmpeg mult-threading
enhancements that are still in development.

>
>
>>> The main problem with the audio is that it seems the sse2 version of
>>> float_to_int16_interleave_sse2 causes the segfault. What I did to
>>> fix
>>> this was
>>> to go the end of libavcodec/i386/dsputil_mmx.c change the assignment
>>> c->float_to_int16_interleave = float_to_int16_interleave_sse2;
>>> on line 2864 to
>>> c->float_to_int16_interleave = float_to_int16_interleave_sse;
>>>
>>> That fixed the audio for me. YMMV.
>>>
> The above change with SSE2 to SSE has made a big difference to the
> stability
>

Agreed. No more crashes here.

Did a test record tonight of Private Practice and City Homicide, both
of which were in 720p HD. Multirec did its job and I had no issues
recording either show. Quality was a serious step up from DVB-S based
SD.

Steve


Steven Ellis - Technical Director
OpenMedia Limited
email - steven[at]openmedia.co.nz
website - http://www.openmedia.co.nz


g.woollett at irl

Aug 25, 2008, 2:23 PM

Post #9 of 10 (782 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

After the continuing problems with TV3 stuttering last night with the
loop filter patch included, I've been double checking that I have the
patch right. Steve in your post from the 24/8 17:46 this was left
out. :-)

In the archives in this block I've noticed the inclusion of this line -

enc->thread_count = 2;

It looks important, but is it something that would make a difference?

#endif // USING_XVMC || USING_DVDV

if (!handled)
{
if (CODEC_ID_H264 == enc->codec_id)
{
VERBOSE(VB_PLAYBACK, LOC + "Turning off loop
filter");
enc->skip_loop_filter = AVDISCARD_ALL;
VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast decode
mode");
enc->flags |= CODEC_FLAG2_FAST;
video_codec_id = kCodec_H264;
}

else
video_codec_id = kCodec_MPEG2; // default to MPEG2
}

if (enc->codec)
{
VERBOSE(VB_IMPORTANT, LOC
<<"Warning, video codec "<<enc<<" "
<<"id("<<codec_id_string(enc->codec_id)
<<") type ("<<codec_type_string(enc->codec_type)
<<") already open.");
}


If I'm stuck with the TV3, situation are there transcoding options (that
work) in mythtv to say downscale/convert 1080i to 720p for instance?
I'm quite happy to wait for TV3 recordings to go though the mill before
watching them.


Cheers
Graeme

_______________________________________________
mythtvnz mailing list
mythtvnz[at]lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


steven at openmedia

Aug 25, 2008, 3:48 PM

Post #10 of 10 (781 views)
Permalink
Re: Question about building Pauls Mythtv + Patches [In reply to]

On 26/08/2008, at 9:23 AM, Graeme Woollett wrote:

> After the continuing problems with TV3 stuttering last night with the
> loop filter patch included, I've been double checking that I have the
> patch right. Steve in your post from the 24/8 17:46 this was left
> out. :-)
>
> In the archives in this block I've noticed the inclusion of this
> line -
>
> enc->thread_count = 2;

It helps a little bit, but as Paul mentioned this option can be set
via the GUI, hence I removed it from the patch.

My video playback settings are currently setup as CPU++, and the
XVideo mode to Max 2 CPUsm and Bob 2x Deinterlacer.

It looks like the slice based decoder does offload part of some frames
to the second Core, but not enough to make a huge difference.

>
>
> It looks important, but is it something that would make a difference?
>
> #endif // USING_XVMC || USING_DVDV
>
> if (!handled)
> {
> if (CODEC_ID_H264 == enc->codec_id)
> {
> VERBOSE(VB_PLAYBACK, LOC + "Turning off loop
> filter");
> enc->skip_loop_filter = AVDISCARD_ALL;
> VERBOSE(VB_PLAYBACK, LOC + "Enabling Fast
> decode
> mode");
> enc->flags |= CODEC_FLAG2_FAST;
> video_codec_id = kCodec_H264;
> }
>
> else
> video_codec_id = kCodec_MPEG2; // default to
> MPEG2
> }
>
> if (enc->codec)
> {
> VERBOSE(VB_IMPORTANT, LOC
> <<"Warning, video codec "<<enc<<" "
> <<"id("<<codec_id_string(enc->codec_id)
> <<") type ("<<codec_type_string(enc-
> >codec_type)
> <<") already open.");
> }
>
>
> If I'm stuck with the TV3, situation are there transcoding options
> (that
> work) in mythtv to say downscale/convert 1080i to 720p for instance?
> I'm quite happy to wait for TV3 recordings to go though the mill
> before
> watching them.

I haven't tried to transcode any HD output yet..

Steve

Steven Ellis - Technical Director
OpenMedia Limited
email - steven[at]openmedia.co.nz
website - http://www.openmedia.co.nz

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.