
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (40)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (7748)
-
5 Key Benefits of Using a Tag Manager
12 décembre 2021, par erin — Analytics Tips, Marketing -
Laravel FFMpeg encoding failed [on hold]
18 février 2019, par Diego FernándezI’m using Laravel FFMpeg to encode videos and create thumbnails, but none of them are working. Whenever I try to create a thumbnail or encode a video I get following error :
ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/diego/dynamic4/bg/storage/app/public/activity/4942/cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes5c6378517cace4u1cg/pass-5c6378517cb33' '/home/diego/dynamic4/bg/storage/app/public/1234.mp4'
If I check that error on console I get this :
ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/diego/dynamic4/bg/storage/app/public/activity/4942/cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes5c6377a214b41rk6ao/pass-5c6377a214b7b' '/tmp/laravel-ffmpegObuaI1.mp4'
ffmpeg version 4.1-1~18.04.york1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration: --prefix=/usr --extra-version='1~18.04.york1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/diego/dynamic4/bg/storage/app/public/activity/4942/cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
creation_time : 2018-10-22T15:38:46.000000Z
Duration: 00:00:58.36, start: 0.000000, bitrate: 1400 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 848x480, 1334 kb/s, 30.01 fps, 30 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2018-10-22T15:38:46.000000Z
handler_name : Core Media Video
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 62 kb/s (default)
Metadata:
creation_time : 2018-10-22T15:38:46.000000Z
handler_name : Core Media Audio
[NULL @ 0x55fecc7a0280] Unable to find a suitable output format for 'failed'
failed: Invalid argumentI have checked permissions and everything looks ok. I have also checked the video I’m trying to encode exists. It does, and apparently it get properly loaded. It seems to fail when trying to save encoded file.
I spent one day doing research, I tried with different audio & video encoding, different routes and filesystems, but I couldn’t make it work.
I have also tried to check that passlogfile (/tmp/ffmpeg-passes5c6377a214b41rk6ao/pass-5c6377a214b7b
) but as it gets stored under/tmp
I can’t gain access to it.This is the code I’m using to encode videos in my controller :
$folder = 'activity/4942';
$filename = 'cLCbKyLiGqbOb0M5JDtvNXUdzSxFGj9ts6sDZb4D.mp4';
$new_filename = 'storage/activity/4942/1234.mp4';
$format = new FFMpeg\Format\Video\X264();
$video = FFMpeg::fromDisk('public')->open($folder . '/' . $filename);
$video->export()->toDisk('public')->inFormat($format)->save($new_filename);I have debugged that piece of code and video seems to get loaded properly. It crashes when tries to save the final video, in last lane of code.
This is the configuration in filesystems.php :
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'visibility' => 'public',
],
],Any help much appreciated, thanks !
-
How to write UI tests for your plugin – Introducing the Piwik Platform
18 février 2015, par Thomas Steur — DevelopmentThis is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to write unit tests for your plugin). This time you’ll learn how to write UI tests in Piwik. For this tutorial you will need to have basic knowledge of JavaScript and the Piwik platform.
What is a UI test ?
Some might know a UI test under the term ‘CSS test’ or ‘screenshot test’. When we speak of UI tests we mean automated tests that capture a screenshot of a URL and then compare the result with an expected image. If the images are not exactly the same the test will fail. For more information read our blog post about UI Testing.
What is a UI test good for ?
We use them to test our PHP Controllers, Twig templates, CSS, and indirectly test our JavaScript. We do usually not write Unit or Integration tests for our controllers. For example we use UI tests to ensure that the installation, the login and the update process works as expected. We also have tests for most pages, reports, settings, etc. This increases the quality of our product and saves us a lot of time as it is easy to write and maintain such tests. All UI tests are executed on Travis after each commit and compared with our expected screenshots.
Getting started
In this post, we assume that you have already installed Piwik 2.11.0 or later via git, set up your development environment and created a plugin. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik and other Guides that help you to develop a plugin.
Next you need to install the needed packages to execute UI tests.
Let’s create a UI test
We start by using the Piwik Console to create a new UI test :
./console generate:test --testtype ui
The command will ask you to enter the name of the plugin the created test should belong to. I will use the plugin name “Widgetize”. Next it will ask you for the name of the test. Here you usually enter the name of the page or report you want to test. I will use the name “WidgetizePage” in this example. There should now be a file
plugins/Widgetize/tests/UI/WidgetizePage_spec.js
which contains already an example to get you started easily :describe("WidgetizePage", function () {
var generalParams = 'idSite=1&period=day&date=2010-01-03';
it('should load a simple page by its module and action', function (done) {
var screenshotName = 'simplePage';
// will save image in "processed-ui-screenshots/WidgetizePageTest_simplePage.png"
expect.screenshot(screenshotName).to.be.capture(function (page) {
var urlToTest = "?" + generalParams + "&module=Widgetize&action=index";
page.load(urlToTest);
}, done);
});
});What is happening here ?
This example declares a new set of specs by calling the method
describe(name, callback)
and within that a new spec by calling the methodit(description, func)
. Within the spec we load a URL and once loaded capture a screenshot of the whole page. The captured screenshot will be saved under the definedscreenshotName
. You might have noticed we write our UI tests in BDD style.Capturing only a part of the page
It is good practice to not always capture the full page. For example many pages contain a menu and if you change that menu, all your screenshot tests would fail. To avoid this you would instead have a separate test for your menu. To capture only a part of the page simply specify a jQuery selector and call the method
captureSelector
instead ofcapture
:var contentSelector = '#selector1, .selector2 .selector3';
// Only the content of both selectors will be in visible in the captured screenshot
expect.screenshot('page_partial').to.be.captureSelector(contentSelector, function (page) {
page.load(urlToTest);
}, done);Hiding content
There is a known issue with sparklines that can fail tests randomly. Also version numbers or a date that changes from time to time can fail tests without actually having an error. To avoid this you can prevent elements from being visible in the captured screenshot via CSS as we add a CSS class called
uiTest
to theHTML
element while tests are running..uiTest .version { visibility:hidden }
Running a test
To run the previously generated tests we will use the command
tests:run-ui
:./console tests:run-ui WidgetizePage
After running the tests for the first time you will notice a new folder
plugins/PLUGINNAME/tests/UI/processed-ui-screenshots
in your plugin. If everything worked, there will be an image for every captured screenshot. If you’re happy with the result it is time to copy the file over to theexpected-ui-screenshots
folder, otherwise you have to adjust your test until you get the result you want. From now on, the newly captured screenshots will be compared with the expected images whenever you execute the tests.Fixing a test
At some point your UI test will fail, for example due to expected CSS changes. To fix a test all you have to do is to copy the captured screenshot from the folder
processed-ui-screenshots
to the folderexpected-ui-screenshots
.Executing the UI tests on Travis
In case you have not generated a
.travis.yml
file for your plugin yet you can do this by executing the following command :./console generate:travis-yml --plugin PLUGINNAME
Next you have to activate Travis for your repository.
Advanced features
Isn’t it easy to create a UI test ? We never even created a file ! Of course you can accomplish even more if you want. For example you can specify a fixture to be inserted before running the tests which is useful when your plugin requires custom data. You can also control the browser as it was a human by clicking, moving the mouse, typing text, etc. If you want to discover more features have a look at our existing test cases.
If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.