html5 & video

Post here if you are a new Porteus member and you're looking for some help.
otan
Black ninja
Black ninja
Posts: 36
Joined: 23 Jun 2020, 21:31
Distribution: mint

html5 & video

Post#1 by otan » 21 Jul 2020, 19:35

How to get gstreamer to play html5 video? Something to do with having to plug in codecs into gstreamer?

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

html5 & video

Post#2 by donald » 21 Jul 2020, 23:47

Hi otan
--> html5 video <-- , what do you mean? - webm?

Code: Select all

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

otan
Black ninja
Black ninja
Posts: 36
Joined: 23 Jun 2020, 21:31
Distribution: mint

html5 & video

Post#3 by otan » 22 Jul 2020, 11:47

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 ...

otan
Black ninja
Black ninja
Posts: 36
Joined: 23 Jun 2020, 21:31
Distribution: mint

html5 & video

Post#4 by otan » 22 Jul 2020, 12:20

Tried installing gst-plugins-good. Seems ok now.

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

html5 & video

Post#5 by donald » 22 Jul 2020, 16:45

: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

otan
Black ninja
Black ninja
Posts: 36
Joined: 23 Jun 2020, 21:31
Distribution: mint

html5 & video

Post#6 by otan » 23 Jul 2020, 13:26

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 ...

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

html5 & video

Post#7 by ncmprhnsbl » 23 Jul 2020, 22:11

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..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

html5 & video

Post#8 by donald » 24 Jul 2020, 02:28

@ 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.

Post Reply