Media-Talk
Summary: Talk page for improving Media
[Closed] BUG -- Poster Not Showing when using Hash Fragment t=STARTTIME
The poster blinks on the screen and then the video displays over the top of the poster.
If I went to the trouble to make a poster I think I want it to display and prefer
the poster has priority over a "start video here" timestamp.
This shows matching poster:
Attach:[=Fastball - The Way 2=].mp4#x320;class=videoframegraysilver
Poster blinks and they video covers poster :(
Attach:[=Fastball - The Way 2=].mp4#t=2;x320;class=videoframegraysilver
I want my video to start at the start time specified, but I want to see my poster.
on top to start, with no autoplay.
--gnuzoo
Oh, this is a browser feature, not a bug, and out of the scope of PmMedia - doc updated. OTOH it is trivial to slice your video with ffmpeg. --Petko
<angry>IMHO this is a BUG and not a feature. Thanks to the jackasses at firefox (and some other browsers that really suck) we are of full of these types of "features"<\angry> --gnuzoo
Browsers intentionally provide only the standardized basic media-player functionality. If you don't want to use ffmpeg, and you consider there is a bug in Firefox, Chrome, Safari, or another browser, please report it to the respective browser project. I cannot change the behavior of those browsers.
Let's also keep this page focused on improving the Media page. Bug reports, feature requests, and other demands and complaints concerning PmMedia should be submitted through PITS, where they can be properly tracked and addressed. --Petko
[Closed] "Media" versus "PmMedia"
The page name is "Media". The variables use "PmMedia". The terms are interspersed on
the PmWiki website.
Using "PmMedia" sounds like its a recipe. IMHO Using "Media" makes it sound more like a
generic built in feature. My preference would be to always use "Media" or "media".
I think it is better to use consistent terms when referring to multimedia assets and
usages and page names.
Imagine this might start a trend and have to rename things like page directives.
"(:title pagename:)"would have to become"(:Pmtitle pagename:)"
I prefer not to prefix names all over the place with "Pm".
--gnuzoo
Since you prefer this, for your personal peace of mind, please add to config.php the following. --Petko
$Media = &$PmMedia; # use $Media instead of $PmMedia $Media['EnableEmbed'] = 1;
I was not clear enough. I am not referring to the variables.
I am referring to labelling "media" as "PmMedia". There is no "PmMedia".
The page is named "Media", not "PmMedia". This is not a recipe.
This is "PmWiki media" that is built in. It uses variables that are named
"$PmMedia". Variables add uniqueness and are usually mnemonic but do not necessarily label things.
In the section "Differences with Cookbook:Ape" there are 6 references to "PmMedia" (not the variables)
that I think should be changed to just "media" or "PmWiki media" or "PmWiki Media"
--gnuzoo
Petko, you did not respond to this last clarification, and you just added using the label "PmMedia" above again.
I still think should be changed to just "media". Why mis name it like that?
--gnuzoo
Documentation updated. --Petko
Video Tip
Having a border around a video is visually helpful when the
video background color is the same as the PmWiki page color.
This can be done inserting 2 lines in your pub/css/local.css
file or your pub/css/farm.css file. Note that a border is not
necessary when the video is fullscreen.
PmWiki page markup:
http://localhost/z/uploads/Slaughterbots.mp4#x320;class=videoframegraysilver
CSS:
video.videoframegraysilver { border: 1px solid #CCCCCC; }
video.videoframegraysilver:fullscreen { border: none; }
--gnuzoo
To style all videos, no need for a custom classname, try just this, in CSS:
video { border: 1px solid #CCCCCC; }
video:fullscreen { border: none; }
In a wiki page:
Attach:video.mp4#x320
BTW the default classname is pmmedia if you don't define a class= in the hash fragment. So for PmMedia videos, you may want to add CSS for video.pmmedia --Petko
> Why not style all videos, no need for a custom classname
Because not all videos want the same color, thickness, and a million other CSS properties.
A custom classname can be mnemonic which is an efficient way of pseudo-self documenting,
like using strong mnemonics in variable names.
--gnuzoo
This is reasonable, I amended my tip. --Petko
[Closed] Poster only work with "Attach:"
Documentation updated, new feature discussion moved to PITS:01569.
You can now use a poster with a bare video URL - See soluton at bottom of PITS:01569
[Closed] Links
Authors can add an image to a link. Can you make it so authors can add a video to a link.
[[HomePage|Attach:logo.mp4#60x60;controls=0;loop;autoplay;mute]]
--gnuzoo
Such a feature may be better left to be implemented by a recipe, this way we could see how popular it is before increasing the complexity of the core and taking from my limited spare time. --Petko
[Closed] Class
You can have multiple classnames - see bottom of this section.
Playing video with the built in media player is GREAT,
way way way better than I ever expected.
> class=vertical - Add a CSS class name (a single one).
Why only 1 class? Can you please allow the user add more than one class?
HTML allows that. Cannot be too difficult to parse.
Example:
class="classname1 classname2 classsname3"
---gnuzoo
No plans to support this. You can add as many styles as you want to your classnames in your CSS files, do you need assistance with this? Another way is to wrap the video in a wikistyle like %classname1 classname2 classsname3% Attach:video.mp4 %%
and in the css define .classname2 video {...} instead of video.classname2 {...} -- your creative options are without limits. --Petko
I find this does not work.
%classname1 classname2 classsname3% Attach:video.mp4 %% |
It puts the class on the span element before the video,
not on the actual video element in the HTML.
--gnuzoo
It should work exactly like that, a <span> element wrapping the <video> element. Then to style the video, you define the styles in .classname2 video {...}. --Petko
But adding the class="classname" to the mp4# parameter adds the classname to the video element.
Makes my CSS is simpler because all I have to do is reference the classname in the CSS.
.videoframegraysilver { border: 1px solid #CCCCCC; }
I dont want to do anything to the span, I dont care about it, I only care
about the media. I dont even know why the span is there, I did not tell it to
put a span there. Its simpler. Why limit it to one class?
Spread your wings and fly.
--gnuzoo
The span is there to allow you to define multiple classes to style video tags. I already explained how to style a video inside a span with a classname. If you want to give a classname to the video tag, write your combined styles in the CSS classname. The functionality you need already exists. Please take the win and let's leave it at that. --Petko
I found that you can apply mutliple classes to in the hash fragment by putting "[= ... =]" around the classnames
v:[=Alice Cooper - Eighteen=].mp4#x320;class=[=videoframegraysilver noprint=]
It works! Here is part of the HTML output:
<video controls class="videoframegraysilver noprint" height="320">
--gnuzoo
Even better - dont need to use percent styles like "%pmwikistyles% ... %%"
v:[=Alice Cooper - Eighteen=].mp4#x320;class=[=videoframegraysilver noprint rfloat=]
--gnuzoo
I know, I funded the development and wrote PmMedia. I am not sure if the escaped class names will be preserved in the future, please use a single class name as I have documented. Please don't document bugs or features unless you are willing to fund their maintenance infinitely. --Petko
Is it a bug? Is it a feature? Which one? It cannot be both.
Something good happens and you are saying "do not use it because I say so"?
There is nothing wrong with using multiple classnames. AFAIK, every HTML element
can have multiple classnames. AFAIK, other PmWiki elements can have multiple
classnames. Why put limits on this?
Funded the development for GNU GPL software? Did you hire someone?
From PmWiki/WayOfLife
> From an user point of view, PmWiki.org is incredibly free. Not only the product itself is GPL (probably the most free licence), but the writing on the online wiki is nearly completely free.
--gnuzoo
I've spent 11+ years prototyping, enhancing, documenting and supporting Cookbook:Ape and its child PmMedia, and this is just one of a hundred recipes I currently maintain, some since 2006, not including the PmWiki core, documentation, mailing lists, and website. Your comments about whether I hired someone and your quotation about how free PmWiki.org is dismiss the substantial amount of unpaid work I have contributed to PmWiki and its recipes. That is disrespectful.
Re: multiple escaped class names, I implemented this capability intentionally, but I document only the subset I am prepared to support as a compatibility guarantee. Everyone is obviously free to exploit undocumented features after I advise multiple times against it, and if in the future they change they will be again free to keep an older PmWiki version or patch the new one themselves. --Petko
[Closed] Silence
Option 'mute' allows a user to unmute while media is playing.
Can you add an option to have no audio at all and not allow someone to unmute it?
I have a short video with very annoying sounds and no one would want to hear it.
I want to play the video, but not allow any audio with it.
Option 'audio' plays only the audio portion of a video file.
How about an option to play only video with no audio?
"videoonly" "noaudio" ??
--gnuzoo
You can remove the audio track before uploading, try ffmpeg -i input.mp4 -c copy -an output.mp4 --Petko
Are you saying adding "noaudio" option is impossible?
--gnuzoo
There is no such option, attribute, or argument, in the HTML5 standard for video tags, or in current browser implementations of it. Adding an option "noaudio" will not achieve what you describe. --Petko
π¦ΈββοΈ Super Petko to the rescue again!
I tried an online free tool to do this, the video file returned was over 5 times larger.
They also put their "watermark" in the lower right corner of the video. Intolerable.
I did get ffmpeg to remove the audio from the mp4 file. It sure puts a lot of
text output junk on the screen, view that here: ffmpeg output
Is all that text an error message? It is overwhelming.
--gnuzoo
No. --Petko
[Closed] YouTube
> The plan is for PmMedia to some day embed videos from YouTube and Vimeo, like Ape, but with better GDPR compliance.
I think this is a good idea. Playing a youtube video in pmwiki would be simple as pasting a URL https://www.youtube.com/watch?v=te1fHMaw4UY . How about enabling this and make the GDPR better later?
Also, $PmMedia['EnableEmbed'] = 1; should be a default setting. If someone hates video, make them
go to the config file and turn it off. Most would prefer video automatically enabled.
--gnuzoo
For wikis without media links this would be reasonable but for wikis that currently have links like Attach:video.mp4 or Attach:song.mp3, upgrading with the default changed would modify their existing pages. I prefer not to do this and let them opt in if they want. --Petko
Can you please provide an ETA when this plan/feature will be available?
--gnuzoo
No ETA. I develop and maintain this project in my spare time, and I don't commit to timelines for volunteer work. --Petko
[Closed] Positioning & Dimensions
Are the dimensions including the controls, or are they just the video
part of the media? Does it add height to the video area when controls
are visible?
Margin on top the video is huge. It appears to wrap the entire video in
an HTML P element, the blank top margin of the video appears to be as high
as the controls at the bottom.
How can we adjust (CSS π) this so the top left corner is the top left of the video?
(:comment 4 second video:)
> uploads/2_Rockets_Landing.mp4#640x480
When the specified dimensions are "#640x480" I thought it would keep everything in a
box that size and not have a huge margin at the top.
Could you allow testing this in the GNUZoo group with a short video?
--gnuzoo
Media enabled in your group. Look at the HTML source of the page to see what happens. Type the dimensions that you want to appear in the width and height attributes of the video tag. Define just one of the dimensions and the browser should calculate the other proportionally. If the box proportion WxH is not the same as the video WxH, the video frame will be scaled and centered within a box with the dimensions you defined. The controls are overlayed at the bottom of your box -- yes, the dimensions include the controls but these are overlayed -- move the mouse out of the video and the controls will disappear after a few seconds. Browsers define the video element and controls differently, feel free to investigate whether CSS can be applied for your needs. --Petko
WOW! I goofed. I did not know the original resolution of the video.
There is no extra space at the top. It just works!
π¦ΈββοΈ Super Petko to the rescue again!
--gnuzoo
I've added styles for responsive videos, so that if the video is larger than the available width, it is scaled down keeping the aspect ratio. Incidentally, this causes a defined wrong height to be ignored and to not have margins as described. Simultaneous termination of two independent avian organisms through the application of a single kinetic mineral projectile. --Petko
Let me translate that last sentence from unnecessarily clinical forensic sounding language: Two birds with one stone.
Never seen you crack a joke before! π
--gnuzoo
[Closed] Wording
Double negative was fixed, suggested by Simon.
This is a talk page for improving PmWiki.Media.