[mythtv-users] V32 issued with mythexternrecorder and youtube-dl

Peter Bennett pb.mythtv at gmail.com
Mon Mar 28 12:45:30 UTC 2022


On 3/27/22 15:27, OpenMedia Support wrote:
>> On 3/27/22 02:37, OpenMedia Support wrote:
>>> 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
>>>
>>>    -https://github.com/steven-ellis/mypvr-nz-iptv
>>>
>>> I'm using
>>>    -
>>> 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-channels.conf
>>>
>>> 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 at mythtv:/tmp$ /usr/bin/youtube-dl -q -o - --hls-use-mpegts
>>> --external-downloader-args "-hide_banner -nostats -loglevel panic -re"
>>> "https://i.mjh.nz/nz/tv.9.m3u8"  | mpv - --vo=x11
>>> [file] Reading from stdin...
>>> WARNING: Could not send HEAD request to
>>> https://d2ce82tpc3p734.cloudfront.net/v1/master/b1f4432f8f95be9e629d97baabfed15b8cacd1f8/TVNZ_1/master.m3u8:
>>> 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
>>>
> .....
>>> Any tips on additional debugging steps.
>> I have scripts for an external recorder that are working fine.
>> (https://github.com/bennettpeter/MythTV-LeanCapture).
>>
>> 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.
>>
>> I don't know if a redirect on the command line in the conf file will
>> work. You could try that:
>>
>> command="/usr/bin/youtube-dl --hls-use-mpegts --external-downloader-args
>> \"-hide_banner -nostats -loglevel panic -re\" -o - \"%URL%\"
>> 2>>/tmp/youtube-dl.log"
>>
>> Alternatively create a shell script that calls the command with the
>> redirect of stderr
>>
>> Also in the shell script you may want to log the return code from
>> youtube-dl
>>
> Hi Peter
>
> Thanks for the tips. I was thinking along the same lines
>
> I created a wrapper to dump all the arguments out and then call the real
> command and I get the following
>
>
> RUNNING: /usr/bin/youtube-dl -q -o - --hls-use-mpegts
> --external-downloader-args "-hide_banner -nostats -loglevel panic -re"
> "https://i.mjh.nz/nz/tv.9.m3u8"
> ERROR: '"https://i.mjh.nz/nz/tv.9.m3u8"' is not a valid URL. Set
> --default-search "ytsearch" (or run  youtube-dl
> "ytsearch:"https://i.mjh.nz/nz/tv.9.m3u8"" ) to search YouTube
> /usr/bin/youtube-dl failed with 1
>
> Yet if I run the following on the command line it works without issue. Odd.
>
> /usr/bin/youtube-dl -q -o - --hls-use-mpegts --external-downloader-args
> "-hide_banner -nostats -loglevel panic -re"
> "https://i.mjh.nz/nz/tv.9.m3u8" | mpv - -vo=x11
>
> Odd

There us too much quoting going on It is taking 
"https://i.mjh.nz/nz/tv.9.m3u8" quotes and all as the URL and it does 
not like that. I don't know how you are escaping the quotes but you need 
to play with that.




More information about the mythtv-users mailing list