<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 3/27/22 02:37, OpenMedia Support
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:093ae063f9773f283fb7fbbffc761139.squirrel@webmail.stevencherie.net">
<pre class="moz-quote-pre" wrap="">Just upgraded from Ubuntu 18.04 -> 20.04 and MythTV V31 -> V32
I had a nicely working external recorder working with our local FTA
channels, and even documented the process for others to use under
- <a class="moz-txt-link-freetext" href="https://github.com/steven-ellis/mypvr-nz-iptv">https://github.com/steven-ellis/mypvr-nz-iptv</a>
I'm using
-
<a class="moz-txt-link-freetext" href="https://github.com/steven-ellis/mypvr-nz-iptv/blob/main/external/youtube-dl-nz.conf">https://github.com/steven-ellis/mypvr-nz-iptv/blob/main/external/youtube-dl-nz.conf</a>
-
<a class="moz-txt-link-freetext" href="https://github.com/steven-ellis/mypvr-nz-iptv/blob/main/external/youtube-dl-nz-channels.conf">https://github.com/steven-ellis/mypvr-nz-iptv/blob/main/external/youtube-dl-nz-channels.conf</a>
With the upgrade to V32 the youtube-dl command just exits almost
immediately and I can't debug any reasonable reason why.
If I run youtube-dl on the command line and pipe the output to mpv
playback works
mythfe@mythtv:/tmp$ /usr/bin/youtube-dl -q -o - --hls-use-mpegts
--external-downloader-args "-hide_banner -nostats -loglevel panic -re"
<a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a> | mpv - --vo=x11
[file] Reading from stdin...
WARNING: Could not send HEAD request to
<a class="moz-txt-link-freetext" href="https://d2ce82tpc3p734.cloudfront.net/v1/master/b1f4432f8f95be9e629d97baabfed15b8cacd1f8/TVNZ_1/master.m3u8">https://d2ce82tpc3p734.cloudfront.net/v1/master/b1f4432f8f95be9e629d97baabfed15b8cacd1f8/TVNZ_1/master.m3u8</a>:
HTTP Error 404: Not Found
(+) Video --vid=1 (h264 1280x720 25.000fps)
(+) Audio --aid=1 (aac 2ch 48000Hz)
[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your
graphics drivers, or not forcing the x11 VO.
ALSA lib conf.c:5187:(snd_config_expand) Unknown parameters
CARD=Generic,DEV=0
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM
hdmi:CARD=Generic,DEV=0
[ao/alsa] Playback open error: Invalid argument
[ao] Failed to initialize audio driver 'alsa'
[ao] This audio driver/device was forced with the --audio-device option.
[ao] Try unsetting it.
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [x11] 1280x720 yuv420p
[vo/x11] Shared memory not supported
[vo/x11] Reverting to normal Xlib
[vo/x11] Shared memory not supported
[vo/x11] Reverting to normal Xlib
V: 00:00:00 / 00:00:00 (2%) Cache: 0.6s/162KB
[vo/x11] Shared memory not supported
[vo/x11] Reverting to normal Xlib
[vo/x11] Shared memory not supported
[vo/x11] Reverting to normal Xlib
V: 00:00:02 / 00:00:02 (82%) Cache: 0.3s/99KB
Exiting... (Quit)
ERROR: ffmpeg exited with code 1
If I try to debug the external recorder I can see it tries to start
youtube-dl but it appears to exit immediately
mythfe@mythtv:/tmp$ /usr/bin/mythexternrecorder -v all:debug --conf
/usr/local/share/myPVR/iptv/youtube-dl-nz.conf
2022-03-27 19:33:42.088353 C mythexternrecorder version: fixes/32
[v32.0+fixes.202203250633.f69ce764b7~ubuntu20.04.1] <a class="moz-txt-link-abbreviated" href="http://www.mythtv.org">www.mythtv.org</a>
2022-03-27 19:33:42.088377 C Qt version: compile: 5.12.8, runtime: 5.12.8
2022-03-27 19:33:42.088411 I Ubuntu 20.04.4 LTS (x86_64)
2022-03-27 19:33:42.088414 N Enabled verbose msgs: all
2022-03-27 19:33:42.088423 N Setting Log Level to LOG_INFO
2022-03-27 19:33:42.098880 I : Buffer: Ready for data.
2022-03-27 19:33:42.098904 I Added logging to the console
2022-03-27 19:33:42.099003 I : Command parser ready.
2022-03-27 19:33:42.099285 I Channels in
'/usr/local/share/myPVR/iptv/youtube-dl-nz-channels.conf', Tuner: '',
Scanner: ''
1:APIVersion:2
1:OK:2
2022-03-27 19:33:47.157093 I : Processing '1:APIVersion:2' --> '1:OK:2'
2:Version?
2:OK:1.0
2022-03-27 19:33:54.954597 I : Processing ' 2:Version?' --> ' 2:OK:1.0'
4:HasTuner?
4:OK:Yes
2022-03-27 19:33:59.734855 I : Processing 'HasTuner' --> '4:OK:Yes'
8:LoadChannels
8:OK:28
2022-03-27 19:34:05.520257 I : Processing 'LoadChannels' --> '8:OK:28'
9:FirstChannel
9:OK:201,TVNZ 1,TVNZ 1,tv.9,tvone.png
2022-03-27 19:34:09.175082 I youtube-dl "" "" "" "" : NextChannel
Name:'TVNZ 1',Callsign:'TVNZ 1',xmltvid:tv.9,Icon:tvone.png
2022-03-27 19:34:09.175104 I : Processing 'FirstChannel' -->
'9:OK:201,TVNZ 1,TVNZ 1,tv.9,tvone.png'
10:TuneChannel:201
10:OK:Tuned to 201
2022-03-27 19:34:14.972243 I youtube-dl <a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>
"201" "TVNZ 1" "TVNZ 1" : Processing 'TuneChannel' --> '10:OK:Tuned to
201'
:13:TuneStatus
13:ERR:Unrecognized command 'TuneStatus '
2022-03-27 19:34:21.159414 I youtube-dl <a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>
"201" "TVNZ 1" "TVNZ 1" : Processing ':13:TuneStatus ' -->
'13:ERR:Unrecognized command 'TuneStatus ''
14:TuneStatus?
14:OK:Tuned to
2022-03-27 19:34:31.949952 I youtube-dl <a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>
"201" "TVNZ 1" "TVNZ 1" : Tuned
2022-03-27 19:34:31.949985 I youtube-dl <a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>
"201" "TVNZ 1" "TVNZ 1" : Processing 'TuneChannel' --> '14:OK:Tuned to '
15:StartStreaming
15:ERR:No channel has been tuned
2022-03-27 19:34:38.895756 E youtube-dl <a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>
"201" "TVNZ 1" "TVNZ 1" : No channel has been tuned
2022-03-27 19:34:38.895779 I youtube-dl <a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>
"201" "TVNZ 1" "TVNZ 1" : Processing 'StartStreaming' --> ' 15:ERR:No
channel has been tuned'
10:TuneChannel:201
10:OK:Tuned to 201
2022-03-27 19:34:44.378092 I youtube-dl <a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>
"201" "TVNZ 1" "TVNZ 1" : Processing 'TuneChannel' --> '10:OK:Tuned to
201'
15:StartStreaming
15:OK:Streaming Started
2022-03-27 19:34:48.598888 I (pid 10459) youtube-dl
<a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a> "201" "TVNZ 1" "TVNZ 1" : Starting process
'/usr/bin/youtube-dl' args: '-q -o - --hls-use-mpegts
--external-downloader-args "-hide_banner -nostats -loglevel panic -re"
<a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a>'
2022-03-27 19:34:48.649591 I (pid 10459) youtube-dl
<a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a> "201" "TVNZ 1" "TVNZ 1" : Started process
'/usr/bin/youtube-dl' PID 10459
2022-03-27 19:34:48.649639 I (pid 10459) youtube-dl
<a class="moz-txt-link-rfc2396E" href="https://i.mjh.nz/nz/tv.9.m3u8">"https://i.mjh.nz/nz/tv.9.m3u8"</a> "201" "TVNZ 1" "TVNZ 1" : Processing
'StartStreaming' --> '15:OK:Streaming Started'
Checking for processes there is no PID 10459
Any tips on additional debugging steps.
</pre>
</blockquote>
<p>I have scripts for an external recorder that are working fine.
(<a class="moz-txt-link-freetext" href="https://github.com/bennettpeter/MythTV-LeanCapture">https://github.com/bennettpeter/MythTV-LeanCapture</a>).</p>
<p>If youtube-dl is outputting an error message you may not see it,
the error output may be getting lost. For my external recorder I
use shell scripts for all of the commands. The error output is
redirected to a file.</p>
<p>I don't know if a redirect on the command line in the conf file
will work. You could try that:<br>
</p>
<p>command="/usr/bin/youtube-dl --hls-use-mpegts
--external-downloader-args \"-hide_banner -nostats -loglevel panic
-re\" -o - \"%URL%\" 2>>/tmp/youtube-dl.log"<br>
</p>
<p>Alternatively create a shell script that calls the command with
the redirect of stderr<br>
</p>
<p>Also in the shell script you may want to log the return code from
youtube-dl</p>
<p>Peter<br>
</p>
<p><br>
</p>
<p>e</p>
<p><span style="color: rgb(36, 41, 47); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
</span></p>
<p><br>
</p>
</body>
</html>