[mythtv] HVEC frame counting broken

John P Poet jppoet at gmail.com
Sun Sep 25 22:48:42 UTC 2022


On Sun, Sep 25, 2022 at 3:16 PM Scott Theisen <scott.the.elm at gmail.com>
wrote:

>
>
> On 9/25/22 12:42, John P Poet wrote:
>
> On Sun, Sep 25, 2022 at 10:40 AM John P Poet <jppoet at gmail.com> wrote:
>
>> On Sun, Sep 25, 2022 at 10:33 AM Scott Theisen <scott.the.elm at gmail.com>
>> wrote:
>>
>>> On 9/25/22 11:43, John P Poet wrote:
>>>
>>>
>>>
>>> Thank you Scott. I just uploaded a HEVC sample to dropbox. It should be
>>> shared with you.
>>>
>>>
>>> I have the sample.
>>>
>>>
>>> Without 7b2ac1eeb5, HEVCParser::parseSPS detects the
>>> sps_id: 0
>>> width, height: 1920x1088
>>> unitsInTick / timeScale: 166817 / 10000000
>>>
>>> With 7b2ac1eeb5, HEVCParser::parseSPS the spd_id, width and height are
>>> garbage and the unitsinTick / timeScale are never decoded --
>>> vps_extension_flag is zero.
>>>
>>> My best guess is that there is an alignment issue and the BitReader that
>>> is being passed into HEVCParser::parseSPS is not pointing at the correct
>>> position.
>>>
>>>
>>> OK, but how are you getting the code to execute on the sample?
>>> mythcommflag --rebuild something?  Adding to Videos and scanning for
>>> changes?
>>>
>>> Thanks,
>>>
>>> Scott
>>>
>>
>> I am using an ExternalRecorder (https://github.com/jpoet/Magewell2TS).
>> Using the mythfilerecorder ExternalRecorder that is packaged with Myth
>> should provide the same result. I am pretty sure that `mythcommflag
>> --rebuild` results in a different code path and I have not tried it.
>>
>> If you have trouble setting up mythfilerecorder I will do that this
>> afternoon and then send you instructions.
>>
>
> Actually, I won't. I keep forgetting that I don't currently have access to
> my development machine and my production machine will be recording football
> today. So, that would have to wait until tomorrow sometime.
>
> John
>
>
> I couldn't figure out how to get mythfilerecorder to work, so instructions
> from you, or anyone, would be appreciated.
>
> Scott
>

I cannot test this until tomorrow, but this should work...

Put the attached config files in /home/mythtv/etc/ . Modify externfile.conf
so it can find the sample hevc file.

Create a new "capture card" of type "External (blackbox) Recorder". For the
command path use "/usr/local/bin/mythexternrecorder --conf
/home/mythtv/etc/externfile.conf". Modify that if your mythexternrecorder
is not in /usr/local/bin.

You may want/need to create a new source for this capture card.

You can do a "channel scan" for the new input and it will pick up the test
channel defined in channels.conf. You can then create a manual record for
that channel and it will effectively "record" the hevc sample file.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20220925/310c7bdc/attachment.htm>
-------------- next part --------------

[1]
NAME=Test1
CALLSIGN=Test1
-------------- next part --------------
[RECORDER]
# The recorder command to execute.  %URL% is optional, and
# will be replaced with the channel's "URL" as defined in the
# [TUNER/channels] (channel conf) configuration file
#command="curl --silent http://uhe2654/8.ts"

command="ffmpeg -hide_banner -loglevel error -i /tmp/hevc-sample.ts -c:v copy -c:a copy -f mpegts -"

# Used in logging events, %ARG% are replaced from the channel info
desc="File"

[TUNER]
# An optional CONF file which provides channel details.  If it does not
# exist, then channel changes are not supported.
channels=/home/mythtv/etc/channels.conf


# If [TUNER/command] is provided, it will be executed to "tune" the
# channel. A %URL% parameter will be substituted with the "URL" as
# defined in the [TUNER/channels] configuration file
# command =

[SCANNER]
# When MythTV scans for channels, The contents of the [TUNER/channels]
# config file are used to populate MythTV's channel information.
# If a command is provided here, it will be executed first, so it can
# populate the [TUNER/channels] config file
#command=/home/mythtv/mythtvguide/scan.sh "%CHANCONF%"

# Timeout for scan command in msecs
#timeout=60000


More information about the mythtv-dev mailing list