[[PageOutline(2-5,Contents,pullout)]] = Embed movies into Trac tickets or wiki pages == Description This plugin allows you to embed online movies from [https://www.youtube.com/ YouTube], [http://www.metacafe.com/ MetaCafe] and [https://vimeo.com/ Vimeo] and local movies via [http://flowplayer.org/ FlowPlayer] into your Trac tickets and Trac wiki pages. If you want support for more online sites just [MovieMacro#BugsFeatureRequests create a ticket]. This plugin supports the preview rendering of movies in the browser and on attachment pages. === Embed Youtube video {{{#!sh [[Movie(http://www.youtube.com/watch?v=9dfWzp7rYR4&start=5&rel=0,style=width:320px; height:240px;)]] }}} The player's parameter can be passed as a query string. See also: https://developers.google.com/youtube/player_parameters === Embed Metacafe video {{{#!sh [[Movie(http://www.metacafe.com/watch/1768855/the_size_of_all_planets_are_relative/)]] }}} === Embed Vimeo video {{{#!sh [[Movie(http://vimeo.com/106808835)]] }}} For countries where bandwidth comes at a premium, it is recommended to download the flash-video file (.flv) and save it in your project's htdocs directory. For !YouTube movies, try [http://rg3.github.io/youtube-dl/ youtube-dl]. Then reference your file like so: {{{#!sh [[Movie(htdocs://site/filename.flv)]] }}} You can also attach the file to a ticket, wiki page or keep it in you SVN repository. Reference the file like so: * Simple form if an attachment is in the ticket/wiki: {{{#!sh [[Movie(sample.webm)]] }}} * Restricted ImageMacro format style: {{{#!sh [[Movie(ticket:123:sample.mp4)]] [[Movie(wiki:test/sub/sample.mp4)]] }}} * Fully qualified form: * from your project's htdocs: `htdocs://site/filename.flv` * from a plugin's htdocs: `htdocs://plugin/dir/filename.flv` * from an attachment on ticket `#123`: `ticket://123/filename.flv` * from an attachment on a wiki page: `wiki://WikiWord/filename.flv` * from your SVN repository revision `[1024]`, you can also use `HEAD` as your revision: `source://1024/trunk/docs/filename.flv` == Bugs/Feature Requests Existing bugs and feature requests for MovieMacro are [report:9?COMPONENT=MovieMacro here]. If you have any issues, create a [/newticket?component=MovieMacro new ticket]. [[TicketQuery(component=MovieMacro,group=type,format=progress)]] == Download Download the zipped source from [export:moviemacro here]. There is also a version on [pypi:TracMovieMacro PyPI]. == Source Check out MovieMacro using Subversion from [/svn/moviemacro here], or [source:moviemacro browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Configuration Default parameter can be set in your `trac.ini` file: {{{#!ini [moviemacro] width = 320px height = 180px splash = black.jpg ; should be put in /deployed/to/movie/htdocs/img/ }}} Also, for preview rendering to be available for all attachments, set the `max_preview_size` in the `[mimeviewer]` section of `trac.ini` to be greater than or equal to `max_size` in the `[attachment]` section: {{{#!ini [attachment] max_size = 262144 [mimeviewer] max_preview_size = 262144 }}} '''Note''': For attachments, [https://flowplayer.org/ Flowplayer] tries to resolve to an appropriate size, but ignoring width/height settings. This is because Flowplayer settings has `adaptiveRatio=true` by default in MovieMacro. It is preferred to adjust the player size automatically, rather than select a particular size in almost every case. If you don't want that behavior, pass `adaptiveRatio=false` as a query string and `style=width:320px; height:240px;` parameter. See also: https://docs.flowplayer.com/ == Recent Changes [[ChangeLog(moviemacro, 3)]] == Author/Contributors '''Author:''' [wiki:lcordier] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''