News:

Wondering if this will always be free?  See why free is better.

Main Menu

Simple Audio Video Embedder

Started by SMFHacks.com Team, August 09, 2010, 10:42:47 PM

Previous topic - Next topic

motechman

Quote from: vbgamer45 on October 20, 2014, 12:08:25 AM
Hmm that's whole player hoping to find one that is just O/S based or if not will have to find a good player to bundle with auto emed system.

What exactly do you mean "O/S based"?  This is a Windows OS, so yes media player is installed. Firefox and Chrome are not native browsers like IE is to Windows or Safari is to Mac. I thought a major advantage of mods like this are to provide browser support of media playback to eliminate the need for browser specific plugins or add ons as well as O/S specific apps like Windows Media Player.

Or am I missing something?

Arantor

You're missing something.

Whatever happens is still ultimately dependent on the browser doing its part to play content, by way of a plugin or *something* to play content. This is why WMV on iOS cannot be a thing because the browser doesn't support it, and won't support it.

(Oh and your native argument is wrong for all desktop cases. Chrome and Firefox are just as native on OS X as Safari is, and almost as native as IE is. The fact that, in Europe, Microsoft is *compelled* to offer new users a choice between browsers is kind of supporting this fact.)

motechman

Quote from: Arantor on October 20, 2014, 12:41:22 PM
You're missing something.

Whatever happens is still ultimately dependent on the browser doing its part to play content, by way of a plugin or *something* to play content. This is why WMV on iOS cannot be a thing because the browser doesn't support it, and won't support it.

(Oh and your native argument is wrong for all desktop cases. Chrome and Firefox are just as native on OS X as Safari is, and almost as native as IE is. The fact that, in Europe, Microsoft is *compelled* to offer new users a choice between browsers is kind of supporting this fact.)

You're right, I wasn't considering Europe and how M$ is compelled to market their OS there. What I meant by "native browser" is what is shipped with the OS. Safari is shipped with Mac, IE with Micro$oft.

As for an SMF mod, that is part of the SMF infrastructure, you can view it as a downloadable app. There's nothing prohibiting a new feature of that app (i.e. a mod) adding support to play any media type. It's just a matter of how much code it will take to implement the feature as mod code vs. OS code.  If the OS doesn't provide enough support for a feature it puts a greater burden on the mod code. At some point it just isn't practical to add that much mod code to implement the feature. I suspect that is the issue with WMV on iOS.

Playing WMV on Windows is another matter however. But I don't know what type of built in support is available across the target web browsers to play WMV. There are a number of toolkit solutions to that, such as flowplayer, so it is doable. For example, flowplayer can be installed with the mod code to play WMV files on all browsers flowplayer supports. iOS and android hosted browsers my not be included. 

Anyway, that's why I asked for the clarification of what "OS based" meant. It sounded like it had something to do with the native Media Player app. Obviously WMV is supported by the Windows OS.

Thanks for your reply




Arantor

QuoteWhat I meant by "native browser" is what is shipped with the OS. Safari is shipped with Mac, IE with Micro$oft.

So, bundled then.

QuoteThere's nothing prohibiting a new feature of that app (i.e. a mod) adding support to play any media type.

Wrong.

QuoteIt's just a matter of how much code it will take to implement the feature as mod code vs. OS code.

Wrong.

QuoteIf the OS doesn't provide enough support for a feature it puts a greater burden on the mod code.

Wrong.

QuoteAt some point it just isn't practical to add that much mod code to implement the feature. I suspect that is the issue with WMV on iOS.

Wrong.

QuotePlaying WMV on Windows is another matter however. But I don't know what type of built in support is available across the target web browsers to play WMV.

Limited.

QuoteThere are a number of toolkit solutions to that, such as flowplayer, so it is doable. For example, flowplayer can be installed with the mod code to play WMV files on all browsers flowplayer supports.

Not entirely accurate. Most of the players add widgets via Flash and/or Silverlight to augment the browser functions. The OS has absolutely nothing to do with it.

QuoteiOS and android hosted browsers my not be included.

-sigh-

QuoteObviously WMV is supported by the Windows OS.

Only because there are codecs and player apps above the OS itself to provide support, e.g. Windows Media Player.

(Disclaimer: currently writing a gallery that actually has had to fight with these issues when providing playback for uploaded media. I am only too aware of the foibles here.)

青山 素子

As a summarization of Arantor's post: You can play back video in the browser using cool tools like FlowPlayer, VideoJS, etc. However, the browser playing the video or the components displaying the video must be able to decode the video. WMV is a Microsoft-specific format and while supported on Windows, has no native support anywhere else. This means you won't be able to play wmv on mobile devices, OS X, Linux, or anything that is not Windows by default.

For OS X, there is the commercial product Flip4Mac, but the person viewing the video must have purchased and installed this tool. If it's not installed, the video playback just won't work.

About the best you could do on the server end is to use a tool to transcode to a commonly supported format for uploaded videos.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Arantor

This is the nice version of what I was trying to say, thank you :)

motechman

Quote from: Arantor on October 20, 2014, 07:44:44 PM
This is the nice version of what I was trying to say, thank you :)

Indeed! I generally dismiss 1 word "arguments" such as these. Perhaps these work like magic spells do in your virtual gaming world but in TRW they're the same as saying f lu6 R$% OP(68 co78 97 5cOGYFTRU%T&^O*&TI^%RIU^T

So if you both are correct I can't use VLC to play WMV videos on my Linux box. I will verify that, as I've never tried it before (that I recall).

Unless M$ has locked down the WMV format and prohibits 3rd parties from using it or the required codecs without a license (which might be true, IDK) there's nothing WRONG about the CONCEPT I described. Hell you could include an entire OS in your mod if it weren't so impractical or violated some license.

As for whether flash, Silverlight or some other OS app, browser add on or plugin should be required to play WMV on a Windows 7 box in the browser, all I can say is I posted a link to a WMV that didn't require I add anything else (I always install flash if it doesn't come bundled with the browser) and it worked on all 3 browsers (IE 11, Chrome, and FF). Obviously the fewer prerequisite components required the better.

For the record my question asking for clarification of vbgamer45's statement was never answered. But thanks 青山 素子 for translating Arantor's rude post for me.

Arantor

QuoteSo if you both are correct I can't use VLC to play WMV videos on my Linux box. I will verify that, as I've never tried it before (that I recall).

Nope. VLC does the work because the OS doesn't.

QuoteHell you could include an entire OS in your mod if it weren't so impractical or violated some license.

Not really unless you were simply shoving it as a download because browsers don't run operating systems!

QuoteAs for whether flash, Silverlight or some other OS app, browser add on or plugin should be required to play WMV on a Windows 7 box in the browser,

From memory, IE9 will play it natively, while everything else needs a bridge to Windows Media Player's embeddable component to do it, usually the best way to do this is with Silverlight. But none of this is the OS doing it. NONE.

Quoteand it worked on all 3 browsers (IE 11, Chrome, and FF)

Only because you already have the necessary components installed and the browsers were doing the bridging for you via WMP.

QuoteFor the record my question asking for clarification of vbgamer45's statement was never answered

Actually, it was. Only you were using the wrong terminology as I tried to gently explain the first time and got rude the second time because I don't appreciate my time being wasted, having actually spent time working on this.

Simple fact of the matter is: yes it's possible for the mod to integrate some components to make WMV work *better* out of the box. But you will never get complete browser support because some browsers simply do not support the format and no mod can possibly change that. Simply not possible.

If you want rugged support, use h.264 based formats a la .m4v because that's much better supported either natively or via Flash (which is superior to Silverlight as a browser plugin) but at no point does it have anything to do with the operating system.


I'll even do both of you a favour and recommend http://mediaelementjs.com/ to you as an embeddable component that handles the very worst of the compatibility for you.

青山 素子

Quote from: motechman on October 20, 2014, 09:14:40 PM
So if you both are correct I can't use VLC to play WMV videos on my Linux box. I will verify that, as I've never tried it before (that I recall).

Depending on the system, you often need to add special binaries to support WMV. I think for Linux, it's still a 32-bit only package. All the WMV-specific codecs are closed source and require a shim to load the DLL.


Quote from: motechman on October 20, 2014, 09:14:40 PM
Unless M$ has locked down the WMV format and prohibits 3rd parties from using it or the required codecs without a license (which might be true, IDK) there's nothing WRONG about the CONCEPT I described. Hell you could include an entire OS in your mod if it weren't so impractical or violated some license.

Yes, they have. Although the ASF container format is open, it requires a license from Microsoft to implement. There are also patents related to the format. As for the codecs it uses, VC-1 is an open standard but has a patent pool for implementation. Older codecs are closed and only available in binary form for Windows.

Please also keep in mind that even trying to load an object or plugin will severely limit you in platforms. If you want to be compatible in the widest way, you'll need to have Windows, Linux (static compiled), and OS X versions of the plugin along with an installable player for mobile devices (as the main browsers don't support plugins).

Basically, it's a huge mess and you can't display formats like wmv without the user installing code on their device.


Quote from: motechman on October 20, 2014, 09:14:40 PM
As for whether flash, Silverlight or some other OS app, browser add on or plugin should be required to play WMV on a Windows 7 box in the browser, all I can say is I posted a link to a WMV that didn't require I add anything else (I always install flash if it doesn't come bundled with the browser) and it worked on all 3 browsers (IE 11, Chrome, and FF). Obviously the fewer prerequisite components required the better.

Flash won't work on iOS or Android. It's deprecated on Linux. Silverlight won't work on mobile either, nor will it do so on Linux. IE will of course play wmv files inline because it's an OS core format.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


luuuciano

So... he may want to use anything else than wmv? maybe ogg?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

青山 素子

Quote from: luuuciano on October 21, 2014, 12:07:46 AM
So... he may want to use anything else than wmv? maybe ogg?

Despite patent issues, h.264 is more widely supported. The second-most supported option is WebM (VP8 and Vorbis). Apple refuses to support WebM and Microsoft Windows requires DirectShow filters to be installed. Firefox only supports WebM, not H.264 (except in mobile versions where it uses the OS playback support). Older versions of Firefox only support OGV, but I personally don't consider support for those high priority. Current "best practice" when using the HTML5 video tag is to use h.264 and WebM and let the browser decide. Since IE only recently added support for the video tag, you'll have to provide a fallback, usually Flash.

Tools like VideoJS make it easy to provide all the needed fallbacks (See if the browser can play one of the formats you provide, if not, try to load h.264 video in Flash player), but you would need to provide all the needed formats or at least one that the legacy (Flash) component will play. WMV is not an option unless you only care about Windows desktop users and don't care about future compatibility. I remember when Indeo was big (or even Microsoft Video 1!), but good luck finding major support for either option now outside of ffmpeg/libav.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


petitchevalroux

Hello,

Just in case, i had some issue with regex breaking html code during remplacement.

The regex in AutoEmbedMediaPro2.php was too "greedy".

Here is the diff that fix this issue :

-               $message = preg_replace('#<a href="' . $mediaSite['regexmatch'] . '"(.*?)</a>#i', $mediaSite['embedcode'], $message);
+              $message = preg_replace('#<a href="' . $mediaSite['regexmatch'] . '"[^>]*>([^<]+)</a>#i', $mediaSite['embedcode'], $message);


And a sample html breaking the old version :

Donne moi les clés de ta bécanne... je gère (mais sans dec t&#039;as besoin d&#039;un truc ?)<br /><a href="http://www.dailymotion.com/video/x4zvub_burn-sur-jante-debile-profond_sport" class="bbc_link" target="_blank">http://www.dailymotion.com/video/x4zvub_burn-sur-jante-debile-profond_sport</a><br /><br />mais sans dec t&#039;as besoin d&#039;un truc ?<br /><br /><br /><div class="quoteheader"><div class="topslice_quote"><a href="http://www.local.streetriple.fr/index.php?topic=67380.msg2649695#msg2649695">Citation de: Boudy: Bambi Killer le <strong>Aujourd'hui</strong> à 10:27:00</a></div></div><blockquote class="bbc_standard_quote"> <img src="http://www.streetriple.fr/Smileys/default/shocked.gif" alt="&#58;o" title="Choqué" class="smiley" />&nbsp; <img src="http://www.streetriple.fr/Smileys/default/shocked.gif" alt="&#58;o" title="Choqué" class="smiley" /> <img src="http://www.streetriple.fr/Smileys/default/shocked.gif" alt="&#58;o" title="Choqué" class="smiley" /><br /><br />Le salopard. Il m&#039;a fait payer ses prestations au lit pas plus tard que samedi dernier&nbsp; <img src="http://www.streetriple.fr/Smileys/default/pascontent2.gif" alt="&#091;pascontent2]" title="pas content 2" class="smiley" />&nbsp; <img src="http://www.streetriple.fr/Smileys/default/grin.gif" alt=";D" title="Grimaçant" class="smiley" /><br /><br /></blockquote><div class="quotefooter"><div class="botslice_quote"></div></div>Pour moi c&#039;était gratuit&nbsp; <img src="http://www.streetriple.fr/Smileys/default/spamafote.gif" alt="&#40;spamafote&#41;" title="" class="smiley" /> <img src="http://www.streetriple.fr/Smileys/default/1037033944_gif.gif" alt="&#091;vtff]" title="" class="smiley" />

Steve

DO NOT pm me for support!

vbgamer45

petitchevalroux where you posting direct html or just a normal post?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

motechman

Quote from: Arantor on October 20, 2014, 09:34:18 PM
QuoteSo if you both are correct I can't use VLC to play WMV videos on my Linux box. I will verify that, as I've never tried it before (that I recall).

Nope. VLC does the work because the OS doesn't.

You just made my point. If VLC can do it without the OS support any media type can be played on most [unsupported] Op Sys. It just depends on how much code the app (or browser plugin or add on) must include to provide the infrastructure to get the job done.

An OS doesn't even need to provide audio or video support if the app can access the hardware; it could embed drivers & all in it's app code. Obviously that's not practical, that's the role of the OS, but it is possible.

I can play WMV files under Linux Mint 16 with VLC. I can boot 8 OS, several of which are linux. All partitions and drives are visible under the Mint linux so it was a simple mater to use VLC to open a WMV file on the Windows file system and it played without a hitch.

So although I respect that you have more experience coding multimedia software and probably know the internals better than I, I don't respect your rather arrogant attitude. I'm a seasoned programmer with decades of experience so what I wrote before isn't without a foundation.

Thank you 青山 素子 for your input on the discussion. Sounds like you have a good handle on what's involved. My apologies if I offended you, my ire was directed at Arantor's attitude.

Bottom line is I don't see vbgamer45 responding now so I suspect he's decided to resolve my problem will require code changes that will take some time to implement, if in fact he decides to address the issue.

No need to waste anymore of each others time.

Arantor

In this case though you don't get to use VLC to play the files. You need the *browser* to do it. And the browsers don't. Whether VLC can or not is suddenly irrelevant. Whether the OS can or not is suddenly irrelevant.

Your window to the website is the browser. It is solely down to the browser to provide those features or to be extended. That is the situation you are in.

I would have thought a programmer of apparently more years experience than I've been alive would understand this.

motechman

Quote from: Arantor on October 21, 2014, 12:31:01 PM
I would have thought a programmer of apparently more years experience than I've been alive would understand this.

Of course, that's also obvious. What you seemed to say without qualification is it CAN'T be done, and I was countering with yes it can, BUT it depends on how much code / effort it will take to do so. It often just isn't practical.

We have M$ to thank for not wanting to play well with others and use common standards. They want to dictate the standards to their advantage and don't put a priority on adding value for users.

Arantor

WMV was a thing in 2003, long before Chrome was even a thing, when Firefox was still just becoming a thing, and many years before <video> support in browsers was a thing at all, before browsers gained any support for video support themselves.

They chose not to implement it - it would have been possible for them to do so.

I'm saying without qualification that it cannot be done in the browser without significant help even in the cases where it *is* possible, and in almost every case it requires a browser extension. You will notice I even specifically advocated one solution that covers the worst cases for missing support for you, by way of Silverlight extensions (since the browser extension Flash can't play WMV either). They chose not to implement it for a reason. In the case of iOS, it is not possible in the standard browser PERIOD. iOS Safari does not provide a plugin architecture of any format, meaning that your users would have to find an alternative browser or you use an alternative format.

Don't bash Microsoft on this one, the others had the choice to implement it or not implement it. The fact that MP4/h.264 does a better job is of course no small part of this.

nax

Quote from: vbgamer45 on August 09, 2010, 10:56:40 PM
Plan to add more sites as time goes open to suggestions!

I would like to suggest imgur.com they use a gifv format for video e.g. http://i.imgur.com/Bq4cTgz.gifv  I am not sure if there are instruction of how to add sites yourself (but I'm no coder) if there are, a separate link might be good as this thread is 87 pages long (at 20 posts per page).

青山 素子

What Arantor said in the reply above. It's not possible to do without requiring the user to install software on their computer. For mobile users, it's not going to happen at all. If you even decide to forget about mobile browsers, you'll still have to maintain a plugin for the users. To cover major use cases, it'll need to have an Active-X version (for IE), an NPAPI version (for Firefox), and a PPAPI version (for Chrome, as it'll be dropping NPAPI support in the future). You'll have to do that for at least Windows and OS X (five versions, now), and maybe also Linux (7 versions). That just covers 32-bit versions, by the way, not even 64-bit ones. You'll also need to get licenses for the codecs that the plugin supports. Maybe you can leverage Silverlight for Windows and OS X (if Silverlight on OS X supports legacy WMV codecs), but that's another piece of software that'll need to be installed.

Now, all this is possible, but it's not practical. It's a lot of code to maintain just to play an outdated legacy format in the browser. If this was for a product that made lots of money to pay for the development effort, there is a chance of it being maybe considered. For a free modification to an open-source forum software? Not even a consideration.

The best option is to just allow the user to download the file and figure out how to play it directly on their local system. In that case, SMF's attachment system can more than handle that use case.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: