[mythtv-users] HD-PVR bitrate not being set in v29?

Dan Wilga mythtv-users2 at dwilga-linux1.amherst.edu
Mon Oct 8 13:11:23 UTC 2018


On 10/5/18 4:11 PM, john wrote:
> On 2018-10-04 9:49 a.m., mythtv-users2 at dwilga-linux1.amherst.edu 
> (Dan Wilga) wrote:
>> I recently noticed that my free disk space was creeping downward, and
>> decided to investigate. I discovered that many recordings made since I
>> switched from 0.28.2 to 29.1 are consistently larger--sometimes double
>> or triple in size.
>>
>> Looking further, I noticed that the bitrate of the HD-PVR (not HD-PVR2)
>> recordings seems to be much higher than it should be. SoI checked the
>> recording profiles in mythtv-setup. I have confirmed that the recordings
>> rules in question are using my Low Quality profile, which has this for
>> all three (low, med, high) resolutions:
>>
>> Avg. Bitrate: 4500 Max. Bitrate: 6200
>>
>> What is clear is that recordingsdon't seem to be using this value.
>> Taking the output of mediainfo from a 0.28.1 recording and comparing it
>> to that of a 29.1 recording of the same program on another night gives
>> this diff:
>>
>> # diff /tmp/1 /tmp/2
>> 5,6c5,6
>> < File size : 835 MiB
>> < Duration : 33 min 25 s
>> ---
>>   > File size : 2.52 GiB
>>   > Duration : 33 min 24 s
>> 8c8
>> < Overall bit rate???????????????????????? : 3 490 kb/s
>> ---
>>   > Overall bit rate???????????????????????? : 10.8 Mb/s
>> 21c21
>> < Duration : 33 min 25 s
>> ---
>>   > Duration : 33 min 23 s
>> 23c23
>> < Bit rate : 2 929 kb/s
>> ---
>>   > Bit rate : 9 891 kb/s
>> 35,36c35,36
>> < Bits/(Pixel*Frame) : 0.047
>> < Stream size : 700 MiB (84%)
>> ---
>>   > Bits/(Pixel*Frame) : 0.159
>>   > Stream size : 2.31 GiB (91%)
>> 48c48
>> < Duration : 33 min 26 s
>> ---
>>   > Duration : 33 min 24 s
>> 58c58
>> < Stream size : 91.8 MiB (11%)
>> ---
>>   > Stream size : 91.8 MiB (4%)
>>
>> At the same time, while a recording is ongoing, the output of "v4l2-ctl
>> -l" gives these values:
>>
>> video_encoding (menu)?? : min=0 max=2 default=2 value=2
>> video_bitrate_mode (menu)?? : min=0 max=1 default=1 value=0 flags=update
>> video_bitrate (int)??? : min=1000000 max=13500000 step=100000
>> default=6500000 value=13500000
>> video_peak_bitrate (int)??? : min=1100000 max=20200000 step=100000
>> default=9000000 value=20200000
>>
>> The recording bitrates are maxed. It's as though the values in the
>> profile aren't being used, even though they are in the range of
>> acceptable values (once you multiply by 1000). Can Anyone else with an
>> HD-PVR confirm this?
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: 
>> <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181004/3a7bbf8b/attachment.html>
>>
> I'm seeing the same thing on 29. Opened a bug report (13317) with more 
> information a little while ago, but don't know if anyone's looking at 
> it or whether this also occurs in 30/testing.
>
> It happens to me with my HD-PVR recordings immediately on upgrade from 
> .28 to 29-fixes (using Mythbuntu PPA). Bitrate settings from Recording 
> Profiles in Mythtv-Setup are applied just fine to recordings in .28, 
> but on upgrade to 29 they are ignored, and some sort of 
> what-looks-like generic settings are applied to all HD-PVR recordings 
> instead: 720p records with VBR at 9000/13500 kbps, regardless of 
> settings in Mythtv-Setup being set to 13500 average bitrate and 6500 
> for max bitrate which should, I believe, result in CBR at 13500.
>
> I verified by checking the recordings from .28 and 29fixes both with 
> mediainfo, and also by checking in-progress recordings by running the 
> v4l2-ctl command to display bitrate info (sorry at work and don't 
> remember exact command).
>
> As you would expect, I also see smaller file sizes and a decrease in 
> video quality with the lower bitrate recordings on 29, despite the 
> fact that the Recording Profile settings for the HD-PVR are unchanged.
>
> I tried swapping in a new hdpvr power supply and a replacement hdpvr 
> board to eliminate hardware issues but got the same results. Tried it 
> out on a test machine with a fresh install to eliminate corrupted 
> database possibility, got same results: bitrate settings work in 28 
> but are no longer applied once I upgrade to 29.
Over the weekend I enabled extra logging (-v record:info) on my backend. 
In my case, I can see "Checking Resolution" and "Got Resolution" log 
messages when it enters MpegRecorder::HandleResolutionChanges, but it 
doesn't alter the bitrate. It thinks the rate is already correct.

I think I need to add some more logging, to see what values are present 
when it first enters this method. This will take some time, as I don't 
want to adversely affect WAF.


More information about the mythtv-users mailing list