Page 1 of 1

html5 & video

Posted: 21 Jul 2020, 19:35
by otan
How to get gstreamer to play html5 video? Something to do with having to plug in codecs into gstreamer?

html5 & video

Posted: 21 Jul 2020, 23:47
by donald
Hi otan
--> html5 video <-- , what do you mean? - webm?

Code: Select all

gst-launch-1.0 playbin uri=file:///home/guest/Test/video.webm

html5 & video

Posted: 22 Jul 2020, 11:47
by otan
guest@porteus:~$ gst-launch-1.0 playbin uri=file:///home/guest/YouTube.webm
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: WebM demuxer
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/webm'.
Additional debug info:
gsturidecodebin.c(921): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gsturidecodebin.c(988): no_more_pads_full (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstdecodebin2.c(4679): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: WebM (video/webm)

ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

html5 & video

Posted: 22 Jul 2020, 12:20
by otan
Tried installing gst-plugins-good. Seems ok now.

html5 & video

Posted: 22 Jul 2020, 16:45
by donald
:good:

Yep, I have gst-plugins-base and gst-plugins-good

btw
There is also FFplay (part of FFmpeg)
I use it for almost all video file formats.
https://ffmpeg.org/ffplay.html

Example (xfce)
To use FFplay by clicking a video file
right-click video file > open with.. > custom command >
ffplay -autoexit -nostats
> use as default

Player control while playing:
https://ffmpeg.org/ffplay.html#While-playing

html5 & video

Posted: 23 Jul 2020, 13:26
by otan
Thamks. Now have also overkill with gst-plugins-libav and ffmpeg-4.3.1. However with youtube: Missing decoder: text/html (text/html)

Code: Select all

guest@porteus:~$ gst-launch-1.0 playbin uri=https://www.youtube.com/watch?v=0yFqvELH-Ww
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'source': gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
Missing element: text/html decoder
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'text/html'.
Additional debug info:
gsturidecodebin.c(921): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gsturidecodebin.c(988): no_more_pads_full (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstdecodebin2.c(4679): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: text/html (text/html)

ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

html5 & video

Posted: 23 Jul 2020, 22:11
by ncmprhnsbl
why not use mpv? simply drag the url (eg. https://www.youtube.com/watch?v=0yFqvELH-Ww) to the empty mpv window...
or

Code: Select all

mpv https://www.youtube.com/watch?v=0yFqvELH-Ww
and yes, i know mpv is just a front end for ffmpeg..

html5 & video

Posted: 24 Jul 2020, 02:28
by donald
@ otan
Missing element: text/html decoder
It means that the server responds with a web site instead of
multimedia content.
(Link to youtube video links to a web page,which contains a link to media.

I tried to get a working gstreamer pipeline but
missing this, missing that, errors..etc

So here is a solution which actually work:
First you need to get the correct link to the video,
youtube-dl will do that.
so a) install youtube-dl (placed into /usr/local/bin)
and now do

Code: Select all

ffplay -i "$(youtube-dl -f mp4 -g https://www.youtube.com/watch?v=0yFqvELH-Ww)"
youtube-dl decodes the "real" video URL and ffplay plays the video with audio.
(it is the video from your post)

Downside - youtube-dl need Python to work.
But everyone who downloads videos or music has already installed youtube-dl anyway - I think.