#MPEG-4/H.264 embed: ec.html5.unsupportedlive Some Youtube live stream embeds not working in Anki

14 messages · Page 1 of 1 (latest)

open trellis
#

Test case: Put this html in a card, only the left of the two videos will load

<iframe src="https://www.youtube.com/embed/yzJUTLBnJJM" -wmode="transparent" -type="video/mp4" width="200px" height="200px" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen allowFullScreen -title="cat cafe" -style="position:absolute; top:0; left:0; width:100vw; height:100vh; z-index:-1000" id="backgroundlivestream"></iframe>
<iframe src="https://www.youtube.com/embed/QdEVb1rheRE" -wmode="transparent" -type="video/mp4" width="200px" height="200px" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen allowFullScreen -title="dog cafe" -style="position:absolute; top:0; left:0; width:100vw; height:100vh; z-index:-1000" id="backgroundlivestream"></iframe>

Maybe the problem is Anki not supporting that video's format? According to https://tekeye.uk/html/html5-video-test-page:
anki: ❌ mpeg ✅ webm ✅ ogg
chrome&edge: ✅ mpeg ✅ webm ⚠️ ogg (audio only)
firefox: ✅ mpeg ✅ webm ❌ ogg

#

I want to put some culture behind the flash card. If I use a static video, it'll restart from the beginning every card flip and that's annoying to listen to, so I want to use a news channel (that shows the local alphabet) or street view webcam with store signs. Most videos will embed in the web browser, but I have to individually check which ones fail to embed in Anki.
🐈 ✅ Cat Cafecat tv r.Video_unavailablesr.Playback_on_other_websites_has_been_disabled_by_the_video_owner
🐕 ❌ Dogs Nursery Cam Puppy Playroom
🇮🇳 ❌ TV9 ABN NTV V6
🇪🇹 ❌ EBC
🇹🇭 ❌ Hush Bar Crystal Bay

open trellis
open trellis
#

"debug_error": "{\"errorCode\":\"auth\",\"errorMessage\":\"An error occurred. Please try again later.\",\"dQ\":\"GENERIC_WITHOUT_LINK\",\"Eo\":\"\",\"TM\":\"ec.html5.unsupportedlive;ed.;es.;a6s.1\",\"JA\":2,\"cpn\":\"Bsh0i7vQsyAci6y-\"}",

#

cat stream plays, dog stream errors, copied waterfall mpeg video plays externally, embedded waterfall mpeg video doesn't load

open trellis
#

MPEG-4/H.264 embed: ec.html5.unsupportedlive Some Youtube live stream embeds not working in Anki

echo summit
#
$env:WEBENGINE_CONFIG="use_proprietary_codecs";./run.bat
open trellis
open trellis
#

Can I use something like open264.wasm?

open trellis
#

The original idea: https://www.reddit.com/r/Anki/comments/1g1yozk/my_adhd_zoomer_brain_cant_focus_on_anki_for_too/ This makes the anki window transparent (Anki Touch Float in opacity mode + F11 in ND Full Screen), with a stream below it. If I did it this way and wanted to change the stream based on the tag, I'd need my addon to send the url outside of anki, and maybe also copy the window dimensions and window stack layer, and clear the html background

Reddit

Explore this post and more from the Anki community

open trellis
open trellis
#

It could've been as simple as loading a live stream in the reviewer but no gotta run out of memory running (two while testing) extra web browsers to try to control the url It was trying to open multiple times through addon interaction

from .selenium import webdriver
ff = webdriver.Firefox()
ff.get(video)
thread 'main' has overflowed its stack
open trellis
#
from .selenium import webdriver
option = webdriver.firefox.options.Options()
option.add_argument("--autoplay-policy=no-user-gesture-required")
fp = webdriver.FirefoxProfile()
fp.set_preference("media.block-autoplay-until-in-foreground", False)
fp.set_preference("media.autoplay.default", 0) #[0:allow;1:blockAudible;2:Prompt;5:blockAll]
fp.set_preference("media.autoplay.enabled", 1)
fp.set_preference("media.autoplay.blocking_policy", 0)
fp.set_preference("media.autoplay.allow-extension-background-pages", True)
fp.set_preference("media.autoplay.block-event.enabled", False)
option.profile=fp
driver = webdriver.Firefox(options=option)
driver.get(video)
thread 'main' has overflowed its stack

now it autoplays the video and crashes anki...