pegasus-frontend icon indicating copy to clipboard operation
pegasus-frontend copied to clipboard

Load videos from url

Open IDmedia opened this issue 1 year ago • 7 comments

I'm loading all my images (assets.logo, assets.box_front) from URL and it seems to work great. The only thing I can't get working are videos. Would it be possible doing the same for video? That way all assets could be pulled from a webservice.

IDmedia avatar Apr 25 '24 19:04 IDmedia

Hm videos too should support remote URLs, that's what Steam games use, for example. Are you using the default theme? Do you have an example config?

mmatyas avatar Apr 25 '24 19:04 mmatyas

Here is my metadata:

collection: PlayStation
extension: iso
files:
  specialgame1.bin
  specialgame2.ext
ignore-file: buggygame.iso
launch: myemulator "{file.path}"


game: Final Fantasy VII
sort_title: Final Fantasy 7
files:
  ffvii_disc1.iso
  ffvii_disc2.iso
developer: Square
genre: Role-playing
players: 1
description: Final Fantasy VII is a 1997 role-playing video game developed by
  Square for the PlayStation console. It is the seventh main installment in the
  Final Fantasy series.
  .
  The games story follows Cloud Strife, a mercenary who joins an eco-terrorist
  organization to stop a world-controlling megacorporation from using the planets
  life essence as an energy source.
rating: 92%
x-scrape-source: SomeScraper
assets.logo: https://retrobox.no/assets/logo.png
assets.box_front: https://retrobox.no/assets/box_front.jpg
assets.video: https://retrobox.no/assets/video.mp4

Pegasus displays the logo, box_art, but when it tries to view the video it crashes:

2024-04-25T22:04:44 [i] Game list post-processing took 0ms
2024-04-25T22:04:44 [i] 1 games found
2024-04-25T22:04:45 [w] qrc:/themes/pegasus-theme-grid/layer_platform/PlatformCard.qml:71:5: QML Image: Cannot open: qrc:/themes/pegasus-theme-grid/assets/logos/playstation.svg
2024-04-25T22:04:45 [w] DirectShowPlayerService::doRender: Unresolved error code 0x80040218 ()
  • Windows 11 with all updates installed
  • K-Lite Codec Pack 18.3.0 Standard (all default values)

The video plays fine if I replace the url with just "video.mp4"

IDmedia avatar Apr 25 '24 20:04 IDmedia

Well, when I try to open the video in browser, it asks me if I'm human, so I suppose this might be a server issue., If it sends a HTML page to Pegasus, that would also explain why DirectShow crashes when tries to play the received data.

mmatyas avatar Apr 25 '24 20:04 mmatyas

I noticed that cloudflare proxy was turned on for that URL, but I don't get the challenge myself. I disabled the proxy, but it may take a while for it to take effect, so I can't confirm if that was the reason or not...

Does this URL work better for you? That doesn't work either and shouldn't use cloudflare at all: https://home.uia.no/benjamfk/video.mp4

IDmedia avatar Apr 25 '24 20:04 IDmedia

Ok, I have confirmed both the new and the previous video link work me on Linux. In that case we're left with the DirectShowPlayerService::doRender which is a missing codec error. The file itself uses AVC1 + AAC LC (mp4a-40-2), so make sure you have codecs for that installed. It's interesting K-Lite doesn't include that by default though, maybe something went wrong there?

mmatyas avatar Apr 25 '24 21:04 mmatyas

Given I can play the video locally and it plays in Pegasus when using a local path... Doesn't that rule out a codec issue?

IDmedia avatar Apr 25 '24 21:04 IDmedia

Ah, so it only crashes when it's remote, I see now. Which only makes it even more interesting; as far as I know it shouldn't need any other network-specific components to play. The 0x80040218 error code means none of the installed DirectShow filters can handle the stream – that's what Microsoft says, at least, so I can only suggest taking another look on the K-Lite side.

mmatyas avatar Apr 25 '24 21:04 mmatyas