<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 7/23/20 6:37 AM, Roland Ernst wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAO+qqbN1-xgHB+ThUemojsY2P0HOboubgROPs3Tsa997Pyq6Qg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Facts:<br>
          The 'recordedfile' table stores details about the<br>
          containerformat and the used codecs of a recording,<br>
          as well as the file properties of that recording.<br>
          <br>
          The 'recordedfile' table gets updated during in <br>
          progress-recording or after a recording is finished.<br>
          Mythtranscode updates the content of a recordedfile as well.<br>
          The entry of the 'recordedfile' is deleted on deletion of the
          recording.<br>
          Upnp reads codec and other data from the 'recordedfile' table.<br>
          <br>
          Parts of the content of the 'recordedfile' is available<br>
          in the 'recordedmarkup' table as well:<br>
          Aspect, dimensions, duration, average frames speed of a
          recording.<br>
          <br>
          The program "mythcommflag --rebuild" updates the markup table
          entries<br>
          listed above, but does not update the 'recordedfile' table
          entry.<br>
          <br>
          In contrast, the frontend displays details about a recording
          which<br>
          are taken from the entry of the 'recordedprogram' table:<br>
          See file mythtv\programs\mythfrontend\progdetails.cpp<br>
          For example, the icons for the videodimensions (HD, 1080, 720)<br>
          are derived from the 'recordedprogram' entry, <br>
          i.e.: from the 'videoprop' and 'audioprop' values.<br>
          <br>
          <br>
          Please consider the following use case:<br>
          An existing recording is transcoded in place by a user job,<br>
          which changed the filename, codecs, duration, dimensions<br>
          etc. of that recording.<br>
          The user job has to take care that the 'recordedfile' table<br>
          and the 'recordedmarkup' table are updated accordingly.<br>
          <br>
          <br>
          Now my questions:<br>
          By what means do you update the 'recordedfile' table? <br>
          I know of the Python Bindings (v31+) or running an SQL command<br>
          directly, but are there other means to achieve this, like the<br>
          ServicesAPI or "mythutil" ?<br>
          <br>
          In case of transcoding to a suitable video container format,<br>
          like matroska or mp4, do I need to preserve the entries in the<br>
          'recordedmarkup' table at all?<br>
          Can I simply clear the recorded-seek and -markup table entries<br>
          for that recording in that case?<br>
          <br>
        </div>
        Roland<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
    </blockquote>
    <p>Hi Roland</p>
    <p>I have been transcoding with handbrake for a long time. I use a
      script which updates recorded and recordedfile. I also run
      "mythutil --clearseektable" because seektables do not work with
      mkv files and confuse the playback. The script is here <a
href="https://github.com/bennettpeter/mythscripts/blob/master/install/opt/mythtv/bin/tcimport.sh">https://github.com/bennettpeter/mythscripts/blob/master/install/opt/mythtv/bin/tcimport.sh</a>
      . This works fine but is not the best solution since I have to
      change it from time to time when there are schema changes.</p>
    <p> Regarding the recordedfile table, I don't know how necessary it
      is or how accurate it is. <br>
    </p>
    <p>I should really have used an api or mythutil for all the updates
      and not have accessed the database directly. But this was done
      long ago.<br>
    </p>
    <p>Peter<br>
    </p>
    <p><br>
    </p>
  </body>
</html>