<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 10/12/18 10:01 AM, Dan Wilga wrote:<br>
    <blockquote type="cite"
cite="mid:582c80c0-d1bc-708f-902b-c826aacb66e9@dwilga-linux1.amherst.edu">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <p><font size="-1"><font face="Verdana">I've been trying to debug
            a pro<font face="Verdana">blem both another user and I are
              having in v29:</font></font></font></p>
      <p><font size="-1"><font face="Verdana"><font face="Verdana"><font
                face="Verdana">  <a class="moz-txt-link-freetext"
                  href="https://code.mythtv.org/trac/ticket/13317"
                  moz-do-not-send="true">https://code.mythtv.org/trac/ticket/13317</a></font></font></font></font></p>
      <p><font size="-1"><font face="Verdana"><font face="Verdana"><font
                face="Verdana"><font face="Verdana">where not all
                  recording profile settings are being <font
                    face="Verdana">read correctly. <font face="Verdana">Th<font
                        face="Verdana">e end result is that<font
                          face="Verdana">, at least for the HD-PVR
                          device, the bitrate settings present in the
                          recording profile are being ignored.</font></font></font></font></font></font></font></font></font></p>
      <p><font size="-1"><font face="Verdana"><font face="Verdana"><font
                face="Verdana"><font face="Verdana"><font face="Verdana"><font
                      face="Verdana"><font face="Verdana"><font
                          face="Verdana"><font face="Verdana">By adding
                          </font></font></font></font></font></font></font></font></font></font>extra
        logging in RecordingProfile::CompleteLoad
        (libs/libmythtv/recordingprofile.cpp) I can see that the correct
        profile is being loaded. From a log of database calls, I can see
        that the settings are being retrieved properly from the
        codecparams table in the database.</p>
      <p>However, in MpegRecorder::SetIntOption
        (libs/libmythtv/recorders/mpegrecorder.cpp),
        profile->byName(name) fails to find any of the settings from
        that table. With the additional logging code I get:</p>
      <p>SetIntOption(...mpeg2bitrate): Option not in profile.<br>
        SetIntOption(...mpeg2maxbitrate): Option not in profile.<br>
        SetStrOption(...mpeg2streamtype): Option not in profile.<br>
        SetStrOption(...mpeg2aspectratio): Option not in profile.<br>
        SetStrOption(...mpeg2language): Option not in profile.<br>
        SetIntOption(...samplerate): Option not in profile.<br>
        SetStrOption(...mpeg2audtype): Option not in profile.<br>
        SetIntOption(...mpeg2audbitratel1): Option not in profile.<br>
        SetIntOption(...mpeg2audbitratel2): Option not in profile.<br>
        SetIntOption(...mpeg2audbitratel3): Option not in profile.<br>
        SetIntOption(...mpeg2audvolume): Option not in profile.<br>
        SetIntOption(...width): Option not in profile.<br>
        SetIntOption(...height): Option not in profile.<br>
        SetIntOption(...low_mpeg4avgbitrate): Option not in profile.<br>
        SetIntOption(...low_mpeg4peakbitrate): Option not in profile.<br>
        SetIntOption(...medium_mpeg4avgbitrate): Option not in profile.<br>
        SetIntOption(...medium_mpeg4peakbitrate): Option not in profile.<br>
        SetIntOption(...high_mpeg4avgbitrate): Option not in profile.<br>
        SetIntOption(...high_mpeg4peakbitrate): Option not in profile.</p>
      <p>It's as though the settings are being initially loaded into a
        part of the profile that is different from where it's being
        asked to look in SetIntOption and SetStrOption. The fact that
        the two settings beginning with "high_mpeg4" aren't being set is
        what's causing my HD-PVR to always record using the default
        values (the highest possible bitrate), which takes up
        considerably more disk space than similar recordings in 0.28.<br>
      </p>
      <p>Unfortunately, my understanding of how this should work is
        lacking, and so I'm hoping someone else here with more knowledge
        than I have can help.<br>
      </p>
    </blockquote>
    A follow-up for anyone following this thread:  Jonatan Lindblad
    suggested a patch, both the original reporter and I tested it, and
    it has now been committed to fixes/29 (987159173d) and master
    (658dd95fd0).<br>
    <br>
    It turns out that this bug would have likely affected several
    different kinds of tuner, not just the HD-PVR.
  </body>
</html>