Mailing List Archive

garbage output from external HDMI source
MythTV 32 on Ubuntu 22 LTS

I recently switched from an ancient Hauppauge PVR box to a simple HDMI
capture card and am setting it up as an external recorder using the wiki
and some config suggestions from list member Dave Pearson (thanks Dave!).

Scheduled recordings work, but for reasons that aren't clear to me the
output is just digital noise. I could use help in understanding why ––
configs and logs pasted below.

My setup is the HDMI input of the capture device [1] connected to the
the HDMI port of my set Arris DCX3200-M top box (via a 2-port powered
HDMI splitter [2] for viewing live TV). In mythtv-setup I use the 6200ch
command to change channels (and this works when executed manually).

Config files and logs from a sample bad recording below. Thanks in
advance for helping understand what's missing here.

dn


[1] Capture device:

https://www.amazon.com/gp/product/B089ZWX5MY

[2] Powered HDMI splitter:

https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

-----

/usr/local/bin/MythExternalRecorder (called out in mythtv-setup step 2):

#!/bin/bash

## echo "`date`: /usr/bin/mythexternrecorder" "${@}" >>
/var/log/mythtv/mythexternrecorder.log

/usr/bin/mythexternrecorder -v all:debug --exec --conf
/usr/share/mythtv/external.conf "${@}"

-----

/usr/share/mythtv/external.conf:

[RECORDER]
# This is the recorder command to execute
command="mythffmpeg -f v4l2 -framerate 30 -input_format mjpeg
-video_size 1920x1080 -i /dev/video0 -f alsa -ac 2 -itsoffset 0.150 -i
hw:1,0 -f mpegts -c:v libx264 -b:v 5200k -preset ultrafast -x264opts
keyint=50 -c:a aac -b:a 160k pipe:1"

# Optional cleanup command which is executed when this recorder is shut down
#cleanup="/home/mythtv/bin/input-finished.sh"
cleanup="killall mythffmpeg"

# Used in logging events, %ARG% are replaced from the channel info
desc=mythffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"

-----

recording output from mythbackend.log:

Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I Scheduler
scheduler.cpp:2330 (HandleReschedule) Reschedule requested for MATCH
2800 0 0 - SaveRule Bob's Burgers
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I Scheduler
scheduler.cpp:2444 (HandleReschedule) Scheduled 1 items in 0.0 = 0.02
match + 0.00 check + 0.00 place
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
tv_rec.cpp:1077 (HandleStateChange) TVRec[1]: Changing from None to
RecordingOnly
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
tv_rec.cpp:3600 (TuningFrequency) TVRec[1]: TuningFrequency
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Terminated
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Killed
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Terminated
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Killed
Jun  9 20:10:48 buster mythbackend: mythbackend[5592]: I Scheduler
scheduler.cpp:2899 (HandleRecordingStatusChange) Tuning recording:
"Bob's Burgers":"Romancing the Beef": channel 1109 on cardid [1], sourceid 1
Jun  9 20:10:51 buster mythbackend: mythbackend[5592]: I ExternSH
recorders/dtvsignalmonitor.cpp:343 (HandlePAT) DTVSigMon[1]: Program 1
found in PAT of SPTS
Jun  9 20:10:51 buster mythbackend: mythbackend[5592]: I CoreContext
scheduler.cpp:717 (UpdateRecStatus) Updating status for "Bob's
Burgers":"Romancing the Beef" on cardid [1] (Tuning => Recording)
Jun  9 20:10:51 buster mythbackend: mythbackend[5592]: I TVRecEvent
tv_rec.cpp:4146 (TuningNewRecorder) TVRec[1]: rec->GetPathname():
'/mnt/md0/mythtv/1109_20230610031100.ts'
Jun  9 20:10:51 buster mythbackend: mythbackend[5592]: I TVRecEvent
tv_rec.cpp:4179 (TuningNewRecorder) TVRec[1]: TuningNewRecorder -
CreateRecorder()
Jun  9 20:10:51 buster mythbackend: mythbackend[5592]: E TVRecEvent
recorders/recorderbase.cpp:214 (SetStrOption)
RecBase[1](/usr/local/bin/MythExternalRecorder):
SetStrOption(...recordingtype): Option not in profile.
Jun  9 20:10:51 buster mythbackend: mythbackend[5592]: E TVRecEvent
recorders/recorderbase.cpp:204 (SetIntOption)
RecBase[1](/usr/local/bin/MythExternalRecorder):
SetIntOption(...recordmpts): Option not in profile.
Jun  9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
mainserver.cpp:1811 (HandleAnnounce) MainServer: MainServer::ANN Monitor
Jun  9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
mainserver.cpp:1813 (HandleAnnounce) MainServer: adding:
buster(55bfc66f1870) as a client (events: 0)
Jun  9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
mainserver.cpp:1811 (HandleAnnounce) MainServer: MainServer::ANN Monitor
Jun  9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
mainserver.cpp:1813 (HandleAnnounce) MainServer: adding:
buster(55bfc670c720) as a client (events: 1)
Jun  9 20:11:38 buster mythbackend: mythbackend[5592]: I
MythSocketThread(78) mainserver.cpp:7889 (connectionClosed) Monitor
sock(55bfc66f1870) 'buster' disconnected
Jun  9 20:11:38 buster mythbackend: mythbackend[5592]: I
MythSocketThread(81) mainserver.cpp:7889 (connectionClosed) Monitor
sock(55bfc670c720) 'buster' disconnected
Jun  9 20:11:40 buster mythbackend: mythbackend[5592]: I ProcessRequest
mainserver.cpp:1811 (HandleAnnounce) MainServer: MainServer::ANN Playback

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: garbage output from external HDMI source [ In reply to ]
This sounds exactly like what HDMI was supposed to do: Prevent people from
easily copying a digital source.

In the past certain HDMI splitters have worked to remove HDCP content
protection, perhaps you could find one of those still lying around
somewhere? That's about the only way this will actually work.

Mike


On Fri, Jun 9, 2023, 21:25 David Newman <dnewman@networktest.com> wrote:

> MythTV 32 on Ubuntu 22 LTS
>
> I recently switched from an ancient Hauppauge PVR box to a simple HDMI
> capture card and am setting it up as an external recorder using the wiki
> and some config suggestions from list member Dave Pearson (thanks Dave!).
>
> Scheduled recordings work, but for reasons that aren't clear to me the
> output is just digital noise. I could use help in understanding why ––
> configs and logs pasted below.
>
> My setup is the HDMI input of the capture device [1] connected to the
> the HDMI port of my set Arris DCX3200-M top box (via a 2-port powered
> HDMI splitter [2] for viewing live TV). In mythtv-setup I use the 6200ch
> command to change channels (and this works when executed manually).
>
> Config files and logs from a sample bad recording below. Thanks in
> advance for helping understand what's missing here.
>
> dn
>
>
> [1] Capture device:
>
> https://www.amazon.com/gp/product/B089ZWX5MY
>
> [2] Powered HDMI splitter:
>
>
> https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
>
> -----
>
> /usr/local/bin/MythExternalRecorder (called out in mythtv-setup step 2):
>
> #!/bin/bash
>
> ## echo "`date`: /usr/bin/mythexternrecorder" "${@}" >>
> /var/log/mythtv/mythexternrecorder.log
>
> /usr/bin/mythexternrecorder -v all:debug --exec --conf
> /usr/share/mythtv/external.conf "${@}"
>
> -----
>
> /usr/share/mythtv/external.conf:
>
> [RECORDER]
> # This is the recorder command to execute
> command="mythffmpeg -f v4l2 -framerate 30 -input_format mjpeg
> -video_size 1920x1080 -i /dev/video0 -f alsa -ac 2 -itsoffset 0.150 -i
> hw:1,0 -f mpegts -c:v libx264 -b:v 5200k -preset ultrafast -x264opts
> keyint=50 -c:a aac -b:a 160k pipe:1"
>
> # Optional cleanup command which is executed when this recorder is shut
> down
> #cleanup="/home/mythtv/bin/input-finished.sh"
> cleanup="killall mythffmpeg"
>
> # Used in logging events, %ARG% are replaced from the channel info
> desc=mythffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"
>
> -----
>
> recording output from mythbackend.log:
>
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I Scheduler
> scheduler.cpp:2330 (HandleReschedule) Reschedule requested for MATCH
> 2800 0 0 - SaveRule Bob's Burgers
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I Scheduler
> scheduler.cpp:2444 (HandleReschedule) Scheduled 1 items in 0.0 = 0.02
> match + 0.00 check + 0.00 place
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
> tv_rec.cpp:1077 (HandleStateChange) TVRec[1]: Changing from None to
> RecordingOnly
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
> tv_rec.cpp:3600 (TuningFrequency) TVRec[1]: TuningFrequency
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
> mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Terminated
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
> mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Killed
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
> mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Terminated
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I TVRecEvent
> mythsystemunix.cpp:795 (Signal) Child PID 6601 killed with Killed
> Jun 9 20:10:48 buster mythbackend: mythbackend[5592]: I Scheduler
> scheduler.cpp:2899 (HandleRecordingStatusChange) Tuning recording:
> "Bob's Burgers":"Romancing the Beef": channel 1109 on cardid [1], sourceid
> 1
> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: I ExternSH
> recorders/dtvsignalmonitor.cpp:343 (HandlePAT) DTVSigMon[1]: Program 1
> found in PAT of SPTS
> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: I CoreContext
> scheduler.cpp:717 (UpdateRecStatus) Updating status for "Bob's
> Burgers":"Romancing the Beef" on cardid [1] (Tuning => Recording)
> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: I TVRecEvent
> tv_rec.cpp:4146 (TuningNewRecorder) TVRec[1]: rec->GetPathname():
> '/mnt/md0/mythtv/1109_20230610031100.ts'
> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: I TVRecEvent
> tv_rec.cpp:4179 (TuningNewRecorder) TVRec[1]: TuningNewRecorder -
> CreateRecorder()
> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: E TVRecEvent
> recorders/recorderbase.cpp:214 (SetStrOption)
> RecBase[1](/usr/local/bin/MythExternalRecorder):
> SetStrOption(...recordingtype): Option not in profile.
> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: E TVRecEvent
> recorders/recorderbase.cpp:204 (SetIntOption)
> RecBase[1](/usr/local/bin/MythExternalRecorder):
> SetIntOption(...recordmpts): Option not in profile.
> Jun 9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
> mainserver.cpp:1811 (HandleAnnounce) MainServer: MainServer::ANN Monitor
> Jun 9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
> mainserver.cpp:1813 (HandleAnnounce) MainServer: adding:
> buster(55bfc66f1870) as a client (events: 0)
> Jun 9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
> mainserver.cpp:1811 (HandleAnnounce) MainServer: MainServer::ANN Monitor
> Jun 9 20:11:36 buster mythbackend: mythbackend[5592]: I ProcessRequest
> mainserver.cpp:1813 (HandleAnnounce) MainServer: adding:
> buster(55bfc670c720) as a client (events: 1)
> Jun 9 20:11:38 buster mythbackend: mythbackend[5592]: I
> MythSocketThread(78) mainserver.cpp:7889 (connectionClosed) Monitor
> sock(55bfc66f1870) 'buster' disconnected
> Jun 9 20:11:38 buster mythbackend: mythbackend[5592]: I
> MythSocketThread(81) mainserver.cpp:7889 (connectionClosed) Monitor
> sock(55bfc670c720) 'buster' disconnected
> Jun 9 20:11:40 buster mythbackend: mythbackend[5592]: I ProcessRequest
> mainserver.cpp:1811 (HandleAnnounce) MainServer: MainServer::ANN Playback
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: garbage output from external HDMI source [ In reply to ]
On Fri, 9 Jun 2023 20:23:53 -0700, you wrote:

>MythTV 32 on Ubuntu 22 LTS
>
>I recently switched from an ancient Hauppauge PVR box to a simple HDMI
>capture card and am setting it up as an external recorder using the wiki
>and some config suggestions from list member Dave Pearson (thanks Dave!).
>
>Scheduled recordings work, but for reasons that aren't clear to me the
>output is just digital noise. I could use help in understanding why ??
>configs and logs pasted below.
>
>My setup is the HDMI input of the capture device [1] connected to the
>the HDMI port of my set Arris DCX3200-M top box (via a 2-port powered
>HDMI splitter [2] for viewing live TV). In mythtv-setup I use the 6200ch
>command to change channels (and this works when executed manually).
>
>Config files and logs from a sample bad recording below. Thanks in
>advance for helping understand what's missing here.
>
>dn
>
>
>[1] Capture device:
>
>https://www.amazon.com/gp/product/B089ZWX5MY
>
>[2] Powered HDMI splitter:
>
>https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

My first guess would be HDCP - those HDMI capture devices do not do
HDCP, so if your Arris box requires HDCP they will not work. But if
the Hauppauge PVR box was working, as far as I know they do not do
HDCP either, so replacing the PVR box with your new HDMI capture
device should work.

Does the TV side of the splitter output work? Does it still work if
you swap to the other splitter output? Does a recording work if the
TV is also on and displaying a good picture at the same time?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: garbage output from external HDMI source [ In reply to ]
> On Jun 9, 2023, at 11:23 PM, David Newman <dnewman@networktest.com> wrote:
>
> MythTV 32 on Ubuntu 22 LTS
>
> I recently switched from an ancient Hauppauge PVR box to a simple HDMI capture card and am setting it up as an external recorder using the wiki and some config suggestions from list member Dave Pearson (thanks Dave!).
>
> Scheduled recordings work, but for reasons that aren't clear to me the output is just digital noise. I could use help in understanding why –– configs and logs pasted below.
>
> My setup is the HDMI input of the capture device [1] connected to the the HDMI port of my set Arris DCX3200-M top box (via a 2-port powered HDMI splitter [2] for viewing live TV). In mythtv-setup I use the 6200ch command to change channels (and this works when executed manually).
>
> Config files and logs from a sample bad recording below. Thanks in advance for helping understand what's missing here.
>
>
>


You can always execute the command below to test that you are getting something out of the adapter. Just substitute a filename for pipe:1. And use vlc or similar to check the video. This test will definitely validate whether you are getting good video from the device.

I tried this route several months ago and found I didn’t have any cpu powerful enough to create a viable stream from it. Converting from mjpeg to x264 requires quite a bit of grunt from the cpu. My last test using this device was with a core i5 quad from around 6 years ago and it couldn’t keep up, only getting around 20 fps or so on the same video settings as you have below.


> command="mythffmpeg -f v4l2 -framerate 30 -input_format mjpeg -video_size 1920x1080 -i /dev/video0 -f alsa -ac 2 -itsoffset 0.150 -i hw:1,0 -f mpegts -c:v libx264 -b:v 5200k -preset ultrafast -x264opts keyint=50 -c:a aac -b:a 160k pipe:1"
>
> # Optional cleanup command which is executed when this recorder is shut down
> #cleanup="/home/mythtv/bin/input-finished.sh"
> cleanup="killall mythffmpeg"
>
> # Used in logging events, %ARG% are replaced from the channel info
> desc=mythffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"
>
> -----
>
> recording output from mythbackend.log:
>

These 2 efforts below are suspicious. I”m not sure what they mean though.

> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: E TVRecEvent recorders/recorderbase.cpp:214 (SetStrOption) RecBase[1](/usr/local/bin/MythExternalRecorder): SetStrOption(...recordingtype): Option not in profile.
> Jun 9 20:10:51 buster mythbackend: mythbackend[5592]: E TVRecEvent recorders/recorderbase.cpp:204 (SetIntOption) RecBase[1](/usr/local/bin/MythExternalRecorder): SetIntOption(...recordmpts): Option not in profile.
>

Regards
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: garbage output from external HDMI source [ In reply to ]
On 6/9/23 23:23, David Newman wrote:
> MythTV 32 on Ubuntu 22 LTS
>
> I recently switched from an ancient Hauppauge PVR box to a simple HDMI
> capture card and am setting it up as an external recorder using the
> wiki and some config suggestions from list member Dave Pearson (thanks
> Dave!).
>
> Scheduled recordings work, but for reasons that aren't clear to me the
> output is just digital noise. I could use help in understanding why ––
> configs and logs pasted below.
>
> My setup is the HDMI input of the capture device [1] connected to the
> the HDMI port of my set Arris DCX3200-M top box (via a 2-port powered
> HDMI splitter [2] for viewing live TV). In mythtv-setup I use the
> 6200ch command to change channels (and this works when executed
> manually).
>
> Config files and logs from a sample bad recording below. Thanks in
> advance for helping understand what's missing here.
>
> dn
>
>
> [1] Capture device:
>
> https://www.amazon.com/gp/product/B089ZWX5MY
>
> [2] Powered HDMI splitter:
>
> https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
>
>
> -----
>
> /usr/local/bin/MythExternalRecorder (called out in mythtv-setup step 2):
>
> #!/bin/bash
>
> ## echo "`date`: /usr/bin/mythexternrecorder" "${@}" >>
> /var/log/mythtv/mythexternrecorder.log
>
> /usr/bin/mythexternrecorder -v all:debug --exec --conf
> /usr/share/mythtv/external.conf "${@}"
>
> -----
>
> /usr/share/mythtv/external.conf:
>
> [RECORDER]
> # This is the recorder command to execute
> command="mythffmpeg -f v4l2 -framerate 30 -input_format mjpeg
> -video_size 1920x1080 -i /dev/video0 -f alsa -ac 2 -itsoffset 0.150 -i
> hw:1,0 -f mpegts -c:v libx264 -b:v 5200k -preset ultrafast -x264opts
> keyint=50 -c:a aac -b:a 160k pipe:1"
>
> # Optional cleanup command which is executed when this recorder is
> shut down
> #cleanup="/home/mythtv/bin/input-finished.sh"
> cleanup="killall mythffmpeg"
>
> # Used in logging events, %ARG% are replaced from the channel info
> desc=mythffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"


I have been using the identical device for all of my recordings for a
few years now.

My scripts are all here https://github.com/bennettpeter/MythTV-LeanCapture .

They are customized for Amazon fire stick. You will have to create your
own for the set top box.

Test out the capture with a command like this to see if it works. You
will need to figure out the VIDEO_IN and AUDIO_IN, that depends on what
devices you have.

(from script leanrec.sh)

INPUT_FORMAT=mjpeg
FRAMERATE=60
VIDEO_IN=/dev/video2
AUDIO_IN=hw:2,0
X264_PRESET=veryfast
X264_CRF=21
AUDIO_OFFSET=0.150

ffmpeg -hide_banner -loglevel error \
-f v4l2 \
-thread_queue_size 256 \
-input_format $INPUT_FORMAT \
-framerate $FRAMERATE \
-video_size $RESOLUTION \
-use_wallclock_as_timestamps 1 \
-i $VIDEO_IN \
-f alsa \
-ac 2 \
-ar 48000 \
-thread_queue_size 1024 \
-itsoffset $AUDIO_OFFSET \
-i $AUDIO_IN \
-c:v libx264 \
-vf format=yuv420p \
-preset $X264_PRESET \
-crf $X264_CRF \
-c:a aac \
output_file.mkv

You can also test it by playing video from the capture device through vlc:

(from script leanvlc.sh)

ifparam=":v4l2-chroma=MJPG
audio=":input-slave=alsa://$AUDIO_IN"
video="v4l2://$VIDEO_IN"

vlc $video  :v4l2-width=1280 :v4l2-height=720  \
 $ifparam :v4l2-fps=30 :v4l2-aspect-ratio=16:9 $audio \
 --audio-desync $offset_ms

Note that vlc 3.0.16 has a bug that does not play audio with this setup.
You can get vlc 3.0.18 from savoury1 ppa.

Peter

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: garbage output from external HDMI source [ In reply to ]
On 6/10/23 09:34, Peter Bennett wrote:
>
> On 6/9/23 23:23, David Newman wrote:
>> MythTV 32 on Ubuntu 22 LTS
>>
>> I recently switched from an ancient Hauppauge PVR box to a simple
>> HDMI capture card and am setting it up as an external recorder using
>> the wiki and some config suggestions from list member Dave Pearson
>> (thanks Dave!).
>>
>> Scheduled recordings work, but for reasons that aren't clear to me
>> the output is just digital noise. I could use help in understanding
>> why –– configs and logs pasted below.
>>
>> My setup is the HDMI input of the capture device [1] connected to the
>> the HDMI port of my set Arris DCX3200-M top box (via a 2-port powered
>> HDMI splitter [2] for viewing live TV). In mythtv-setup I use the
>> 6200ch command to change channels (and this works when executed
>> manually).
>>
>> Config files and logs from a sample bad recording below. Thanks in
>> advance for helping understand what's missing here.
>>
>> dn
>>
>>
>> [1] Capture device:
>>
>> https://www.amazon.com/gp/product/B089ZWX5MY
>>
>> [2] Powered HDMI splitter:
>>
>> https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
>>
>>
>> -----
>>
>> /usr/local/bin/MythExternalRecorder (called out in mythtv-setup step 2):
>>
>> #!/bin/bash
>>
>> ## echo "`date`: /usr/bin/mythexternrecorder" "${@}" >>
>> /var/log/mythtv/mythexternrecorder.log
>>
>> /usr/bin/mythexternrecorder -v all:debug --exec --conf
>> /usr/share/mythtv/external.conf "${@}"
>>
>> -----
>>
>> /usr/share/mythtv/external.conf:
>>
>> [RECORDER]
>> # This is the recorder command to execute
>> command="mythffmpeg -f v4l2 -framerate 30 -input_format mjpeg
>> -video_size 1920x1080 -i /dev/video0 -f alsa -ac 2 -itsoffset 0.150
>> -i hw:1,0 -f mpegts -c:v libx264 -b:v 5200k -preset ultrafast
>> -x264opts keyint=50 -c:a aac -b:a 160k pipe:1"
>>
>> # Optional cleanup command which is executed when this recorder is
>> shut down
>> #cleanup="/home/mythtv/bin/input-finished.sh"
>> cleanup="killall mythffmpeg"
>>
>> # Used in logging events, %ARG% are replaced from the channel info
>> desc=mythffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"
>
>
> I have been using the identical device for all of my recordings for a
> few years now.
>
> My scripts are all here
> https://github.com/bennettpeter/MythTV-LeanCapture .
>
> They are customized for Amazon fire stick. You will have to create
> your own for the set top box.
>
> Test out the capture with a command like this to see if it works. You
> will need to figure out the VIDEO_IN and AUDIO_IN, that depends on
> what devices you have.
>
> (from script leanrec.sh)
>
> INPUT_FORMAT=mjpeg
> FRAMERATE=60
> VIDEO_IN=/dev/video2
> AUDIO_IN=hw:2,0
> X264_PRESET=veryfast
> X264_CRF=21
> AUDIO_OFFSET=0.150
>
> ffmpeg -hide_banner -loglevel error \
> -f v4l2 \
> -thread_queue_size 256 \
> -input_format $INPUT_FORMAT \
> -framerate $FRAMERATE \
> -video_size $RESOLUTION \
> -use_wallclock_as_timestamps 1 \
> -i $VIDEO_IN \
> -f alsa \
> -ac 2 \
> -ar 48000 \
> -thread_queue_size 1024 \
> -itsoffset $AUDIO_OFFSET \
> -i $AUDIO_IN \
> -c:v libx264 \
> -vf format=yuv420p \
> -preset $X264_PRESET \
> -crf $X264_CRF \
> -c:a aac \
> output_file.mkv
>
> You can also test it by playing video from the capture device through
> vlc:
>
> (from script leanvlc.sh)
>
> ifparam=":v4l2-chroma=MJPG
> audio=":input-slave=alsa://$AUDIO_IN"
> video="v4l2://$VIDEO_IN"
>
> vlc $video  :v4l2-width=1280 :v4l2-height=720  \
>  $ifparam :v4l2-fps=30 :v4l2-aspect-ratio=16:9 $audio \
>  --audio-desync $offset_ms
>
> Note that vlc 3.0.16 has a bug that does not play audio with this
> setup. You can get vlc 3.0.18 from savoury1 ppa.
>
> Peter
>
Note: You do not need any splitter for this.

Peter

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: garbage output from external HDMI source [ In reply to ]
On 6/10/23 6:35 AM, Peter Bennett wrote:

>
> On 6/10/23 09:34, Peter Bennett wrote:
>>
>> On 6/9/23 23:23, David Newman wrote:
>>> MythTV 32 on Ubuntu 22 LTS
>>>
>>> I recently switched from an ancient Hauppauge PVR box to a simple
>>> HDMI capture card and am setting it up as an external recorder using
>>> the wiki and some config suggestions from list member Dave Pearson
>>> (thanks Dave!).
>>>
>>> Scheduled recordings work, but for reasons that aren't clear to me
>>> the output is just digital noise. I could use help in understanding
>>> why –– configs and logs pasted below.
>>>
>>> My setup is the HDMI input of the capture device [1] connected to
>>> the the HDMI port of my set Arris DCX3200-M top box (via a 2-port
>>> powered HDMI splitter [2] for viewing live TV). In mythtv-setup I
>>> use the 6200ch command to change channels (and this works when
>>> executed manually).
>>>
>>> Config files and logs from a sample bad recording below. Thanks in
>>> advance for helping understand what's missing here.
>>>
>>> dn
>>>
>>>
>>> [1] Capture device:
>>>
>>> https://www.amazon.com/gp/product/B089ZWX5MY
>>>
>>> [2] Powered HDMI splitter:
>>>
>>> https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
>>>
>>>
>>> -----
>>>
>>> /usr/local/bin/MythExternalRecorder (called out in mythtv-setup step
>>> 2):
>>>
>>> #!/bin/bash
>>>
>>> ## echo "`date`: /usr/bin/mythexternrecorder" "${@}" >>
>>> /var/log/mythtv/mythexternrecorder.log
>>>
>>> /usr/bin/mythexternrecorder -v all:debug --exec --conf
>>> /usr/share/mythtv/external.conf "${@}"
>>>
>>> -----
>>>
>>> /usr/share/mythtv/external.conf:
>>>
>>> [RECORDER]
>>> # This is the recorder command to execute
>>> command="mythffmpeg -f v4l2 -framerate 30 -input_format mjpeg
>>> -video_size 1920x1080 -i /dev/video0 -f alsa -ac 2 -itsoffset 0.150
>>> -i hw:1,0 -f mpegts -c:v libx264 -b:v 5200k -preset ultrafast
>>> -x264opts keyint=50 -c:a aac -b:a 160k pipe:1"
>>>
>>> # Optional cleanup command which is executed when this recorder is
>>> shut down
>>> #cleanup="/home/mythtv/bin/input-finished.sh"
>>> cleanup="killall mythffmpeg"
>>>
>>> # Used in logging events, %ARG% are replaced from the channel info
>>> desc=mythffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"
>>
>>
>> I have been using the identical device for all of my recordings for a
>> few years now.
>>
>> My scripts are all here
>> https://github.com/bennettpeter/MythTV-LeanCapture .


Thanks to all who've responded. In my case, the culprit was either the
splitter and/or the power-up sequence. Recording and live TV viewing
work OK after making these two changes:

1. Replaced original HDMI splitter with this model:

https://www.amazon.com/dp/B005HXFARS

2. Power-cycled Arris DCX3200-M set top box, as in pulled the plug and
let it reboot. Previously, I'd only turned off the set top box via the
TV remote, not actually power-cycled it, forcing a reboot from the cable
provider.

I'm unable to say if 1 or 2 was the problem. I mention 2 because I have
had issues with the past with power-up sequence for devices connected
over HDMI.

Thanks again for your many good pointers.

dn


>>
>> They are customized for Amazon fire stick. You will have to create
>> your own for the set top box.
>>
>> Test out the capture with a command like this to see if it works. You
>> will need to figure out the VIDEO_IN and AUDIO_IN, that depends on
>> what devices you have.
>>
>> (from script leanrec.sh)
>>
>> INPUT_FORMAT=mjpeg
>> FRAMERATE=60
>> VIDEO_IN=/dev/video2
>> AUDIO_IN=hw:2,0
>> X264_PRESET=veryfast
>> X264_CRF=21
>> AUDIO_OFFSET=0.150
>>
>> ffmpeg -hide_banner -loglevel error \
>> -f v4l2 \
>> -thread_queue_size 256 \
>> -input_format $INPUT_FORMAT \
>> -framerate $FRAMERATE \
>> -video_size $RESOLUTION \
>> -use_wallclock_as_timestamps 1 \
>> -i $VIDEO_IN \
>> -f alsa \
>> -ac 2 \
>> -ar 48000 \
>> -thread_queue_size 1024 \
>> -itsoffset $AUDIO_OFFSET \
>> -i $AUDIO_IN \
>> -c:v libx264 \
>> -vf format=yuv420p \
>> -preset $X264_PRESET \
>> -crf $X264_CRF \
>> -c:a aac \
>> output_file.mkv
>>
>> You can also test it by playing video from the capture device through
>> vlc:
>>
>> (from script leanvlc.sh)
>>
>> ifparam=":v4l2-chroma=MJPG
>> audio=":input-slave=alsa://$AUDIO_IN"
>> video="v4l2://$VIDEO_IN"
>>
>> vlc $video  :v4l2-width=1280 :v4l2-height=720  \
>>  $ifparam :v4l2-fps=30 :v4l2-aspect-ratio=16:9 $audio \
>>  --audio-desync $offset_ms
>>
>> Note that vlc 3.0.16 has a bug that does not play audio with this
>> setup. You can get vlc 3.0.18 from savoury1 ppa.
>>
>> Peter
>>
> Note: You do not need any splitter for this.
>
> Peter
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: garbage output from external HDMI source [ In reply to ]
DN:

Would you mind sharing your "config suggestions from list member Dave
Pearson"?

I am still using one of those "ancient HD-PVR" devices (which will
eventually croak) and an old HDHomeRun which uses CableCard, which will
soon no longer be supported.

I have ordered the capture device and the second splitter you
mentioned.  I'd love to get this set up and running; I am running 33 on
Ubuntu 22.04, also with the same Arris STB.

Thanks!

Bob
Re: garbage output from external HDMI source [ In reply to ]
> On Jun 13, 2023, at 4:22 PM, Bob Sully <malibyte56@gmail.com> wrote:
>
> I have ordered the capture device and the second splitter you mentioned. I'd love to get this set up and running; I am running 33 on Ubuntu 22.04, also with the same Arris STB.
>

NOTE that you ONLY need a splitter if you want to watch what you are recording live at the same time.

If it is to become an input device ONLY for mythtv then cancel your order for the splitter… save some $$! :-)

Regards,

Jay
Re: garbage output from external HDMI source [ In reply to ]
On 6/13/23 1:31 PM, Jay Harbeston wrote:

>
>
>> On Jun 13, 2023, at 4:22 PM, Bob Sully <malibyte56@gmail.com> wrote:
>>
>> I have ordered the capture device and the second splitter you
>> mentioned. I'd love to get this set up and running; I am running 33
>> on Ubuntu 22.04, also with the same Arris STB.
>>
>
> NOTE that you ONLY need a splitter if you want to watch what you are
> recording live at the same time.
>
> If it is to become an input device ONLY for mythtv then cancel your
> order for the splitter… save some $$! :-)
>
Agree with Jay – you only need a splitter if you also watch live TV.

Also, I spoke too soon about this working. After some initial success,
the video now records fine but for audio all I'm getting is static. I
will try my previous troubleshooting steps of (a) taking the splitter
out of the system to see if it's the problem and (b) doing hard power
resets on all devices before trying again.

As for my low-rent setup, I use this el cheapo HDMI capture device:

https://www.amazon.com/gp/product/B089ZWX5MY

And this powered splitter:

https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

The latter includes a power cable but does not include a charger with a
USB-A socket.


Here is /usr/local/bin/MythExternalRecorder, which I point to in
mythtv-setup:

#!/bin/bash

## echo "`date`: /usr/bin/mythexternrecorder" "${@}" >>
/var/log/mythtv/mythexternrecorder.log

/usr/bin/mythexternrecorder -v all:debug --exec --conf
/usr/share/mythtv/external.conf "${@}"




And here is /usr/share/mythtv/external.conf:

[RECORDER]
# This is the recorder command to execute
command="mythffmpeg -f v4l2 -framerate 30 -input_format mjpeg
-video_size 1920x1080 -i /dev/video0 -f alsa -ac 2 -itsoffset 0.150 -i
hw:1,0 -f mpegts -c:v libx264 -b:v 5200k -preset ultrafast -x264opts
keyint=50 -c:a aac -b:a 160k pipe:1"

# Optional cleanup command which is executed when this recorder is shut down
#cleanup="/home/mythtv/bin/input-finished.sh"
cleanup="killall mythffmpeg"

# Used in logging events, %ARG% are replaced from the channel info
desc=mythffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"


Hope this helps.

dn
Re: garbage output from external HDMI source [ In reply to ]
On 14/06/2023 04:22, David Newman wrote:
> On 6/13/23 1:31 PM, Jay Harbeston wrote:
>
(snip)
>
> And this powered splitter:
>
> https://www.amazon.com/gp/product/B0B2R3GXL9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
>
> The latter includes a power cable but does not include a charger with a USB-A socket.
>
That seems to be common these days. I'm actually using a cheap powered HMDI combiner/switch on my
monitor and that didn't come with a power supply either.

There are probably two reasons: to avoid unnecessary electro-waste and I think they expect you to
power it from the equipment you're connecting it to, which means that it is only on when that
equipment is powered up. No wall warts sucking power 24/7.

--

Mike Perkins


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org