
Recherche avancée
Autres articles (57)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Soumettre bugs et patchs
10 avril 2011Un logiciel n’est malheureusement jamais parfait...
Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
Si vous pensez avoir résolu vous même le bug (...)
Sur d’autres sites (9946)
-
ffmpeg output + issues
3 octobre 2014, par FordI am trying to get ffmpeg to work using PHP, in its most basic format, just as a test before i develop my code further.
However i can not get it to work and get no error messages or indications to what is wrong :-(
i am trying :
echo exec("/usr/bin/ffmpeg -y -i /home/xxxxxx/public_html/videos/1746/0765916.avi /home/xxxxxx/public_html/videos/1746/test.mp4");
this is creating a 0kb file, but nothing else :-(
i get no error message (or anything else !)(i have error_reporting turned ON and nothing is displayed in browser or server logs)
if i add the below to get the codecs available :
echo exec("ffmpeg -formats");
this just outputs "worse."
I do not have access to command line, as i am using a shared hosting server.
I have had the host run the above from command line, and they say it says "codec not found" or words to the effect.
is there any way i can get any error output into my php file so i can see what is happening.
Also how do i go about installing codecs, if this is the problem (the host will install them, but have mentioned they have never installed a codec on a Linux box, so would be grateful if i could point them to any install info too)
Thanks in advance !
EDIT :
after adding in the code that @stewe suggests, this is the output when trying to convert to mp4
(i can convert to to other formats fine )
FFmpeg version SVN-r0.5.10-4:0.5.10-1, Copyright (c) 2000-2009 Fabrice
Bellard, et al. configuration: --extra-version=4:0.5.10-1
--prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 /
52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on
Feb 16 2013 10:07:01, gcc: 4.4.5 Input #0, avi, from
'/home/xxxxx/public_html/videos/1746/0765916.avi':
Duration: 00:01:37.56, start: 0.000000, bitrate: 868 kb/s Stream #0.0:
Video: mpeg4, yuv420p, 480x272 [PAR 1:1 DAR 30:17], 25 tbr, 25 tbn, 25
tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s Output
#0, mp4, to '/home/xxxxx/public_html/videos/1746/test.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 480x272 [PAR 1:1 DAR 30:17],
q=2-31, 200 kb/s, 90k tbn, 25 tbc Stream #0.1: Audio: 0x0000, 48000
Hz, stereo, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream
#0.1 -> #0.1 [mpeg4 @ 0x9fb7880]removing common factors from framerate Unsupported codec for output stream #0.1If anyone can help as to how to fix this issue, as i would ideally like to convert to mp4
-
Emscripten and Web Audio API
29 avril 2015, par Multimedia Mike — HTML5Ha ! They said it couldn’t be done ! Well, to be fair, I said it couldn’t be done. Or maybe that I just didn’t have any plans to do it. But I did it– I used Emscripten to cross-compile a CPU-intensive C/C++ codebase (Game Music Emu) to JavaScript. Then I leveraged the Web Audio API to output audio and visualize the audio using an HTML5 canvas.
Want to see it in action ? Here’s a demonstration. Perhaps I will be able to expand the reach of my Game Music site when I can drop the odd Native Client plugin. This JS-based player works great on Chrome, Firefox, and Safari across desktop operating systems.
But this endeavor was not without its challenges.
Programmatically Generating Audio
First, I needed to figure out the proper method for procedurally generating audio and making it available to output. Generally, there are 2 approaches for audio output :- Sit in a loop and generate audio, writing it out via a blocking audio call
- Implement a callback that the audio system can invoke in order to generate more audio when needed
Option #1 is not a good idea for an event-driven language like JavaScript. So I hunted through the rather flexible Web Audio API for a method that allowed something like approach #2. Callbacks are everywhere, after all.
I eventually found what I was looking for with the ScriptProcessorNode. It seems to be intended to apply post-processing effects to audio streams. A program registers a callback which is passed configurable chunks of audio for processing. I subverted this by simply overwriting the input buffers with the audio generated by the Emscripten-compiled library.
The ScriptProcessorNode interface is fairly well documented and works across multiple browsers. However, it is already marked as deprecated :
Note : As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by Audio Workers.
Despite being marked as deprecated for 8 months as of this writing, there exists no appreciable amount of documentation for the successor API, these so-called Audio Workers.
Vive la web standards !
Visualize This
The next problem was visualization. The Web Audio API provides the AnalyzerNode API for accessing both time and frequency domain data from a running audio stream (and fetching the data as both unsigned bytes or floating-point numbers, depending on what the application needs). This is a pretty neat idea. I just wish I could make the API work. The simple demos I could find worked well enough. But when I wired up a prototype to fetch and visualize the time-domain wave, all I got were center-point samples (an array of values that were all 128).Even if the API did work, I’m not sure if it would have been that useful. Per my reading of the AnalyserNode API, it only returns data as a single channel. Why would I want that ? My application supports audio with 2 channels. I want 2 channels of data for visualization.
How To Synchronize
So I rolled my own visualization solution by maintaining a circular buffer of audio when samples were being generated. Then, requestAnimationFrame() provided the rendering callbacks. The next problem was audio-visual sync. But that certainly is not unique to this situation– maintaining proper A/V sync is a perennial puzzle in real-time multimedia programming. I was able to glean enough timing information from the environment to achieve reasonable A/V sync (verify for yourself).Pause/Resume
The next problem I encountered with the Web Audio API was pause/resume facilities, or the lack thereof. For all its bells and whistles, the API’s omission of such facilities seems most unusual, as if the design philosophy was, “Once the user starts playing audio, they will never, ever have cause to pause the audio.”Then again, I must understand that mine is not a use case that the design committee considered and I’m subverting the API in ways the designers didn’t intend. Typical use cases for this API seem to include such workloads as :
- Downloading, decoding, and playing back a compressed audio stream via the network, applying effects, and visualizing the result
- Accessing microphone input, applying effects, visualizing, encoding and sending the data across the network
- Firing sound effects in a gaming application
- MIDI playback via JavaScript (this honestly amazes me)
What they did not seem to have in mind was what I am trying to do– synthesize audio in real time.
I implemented pause/resume in a sub-par manner : pausing has the effect of generating 0 values when the ScriptProcessorNode callback is invoked, while also canceling any animation callbacks. Thus, audio output is technically still occurring, it’s just that the audio is pure silence. It’s not a great solution because CPU is still being used.
Future Work
I have a lot more player libraries to port to this new system. But I think I have a good framework set up. -
Emscripten and Web Audio API
29 avril 2015, par Multimedia Mike — HTML5Ha ! They said it couldn’t be done ! Well, to be fair, I said it couldn’t be done. Or maybe that I just didn’t have any plans to do it. But I did it– I used Emscripten to cross-compile a CPU-intensive C/C++ codebase (Game Music Emu) to JavaScript. Then I leveraged the Web Audio API to output audio and visualize the audio using an HTML5 canvas.
Want to see it in action ? Here’s a demonstration. Perhaps I will be able to expand the reach of my Game Music site when I can drop the odd Native Client plugin. This JS-based player works great on Chrome, Firefox, and Safari across desktop operating systems.
But this endeavor was not without its challenges.
Programmatically Generating Audio
First, I needed to figure out the proper method for procedurally generating audio and making it available to output. Generally, there are 2 approaches for audio output :- Sit in a loop and generate audio, writing it out via a blocking audio call
- Implement a callback that the audio system can invoke in order to generate more audio when needed
Option #1 is not a good idea for an event-driven language like JavaScript. So I hunted through the rather flexible Web Audio API for a method that allowed something like approach #2. Callbacks are everywhere, after all.
I eventually found what I was looking for with the ScriptProcessorNode. It seems to be intended to apply post-processing effects to audio streams. A program registers a callback which is passed configurable chunks of audio for processing. I subverted this by simply overwriting the input buffers with the audio generated by the Emscripten-compiled library.
The ScriptProcessorNode interface is fairly well documented and works across multiple browsers. However, it is already marked as deprecated :
Note : As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by Audio Workers.
Despite being marked as deprecated for 8 months as of this writing, there exists no appreciable amount of documentation for the successor API, these so-called Audio Workers.
Vive la web standards !
Visualize This
The next problem was visualization. The Web Audio API provides the AnalyzerNode API for accessing both time and frequency domain data from a running audio stream (and fetching the data as both unsigned bytes or floating-point numbers, depending on what the application needs). This is a pretty neat idea. I just wish I could make the API work. The simple demos I could find worked well enough. But when I wired up a prototype to fetch and visualize the time-domain wave, all I got were center-point samples (an array of values that were all 128).Even if the API did work, I’m not sure if it would have been that useful. Per my reading of the AnalyserNode API, it only returns data as a single channel. Why would I want that ? My application supports audio with 2 channels. I want 2 channels of data for visualization.
How To Synchronize
So I rolled my own visualization solution by maintaining a circular buffer of audio when samples were being generated. Then, requestAnimationFrame() provided the rendering callbacks. The next problem was audio-visual sync. But that certainly is not unique to this situation– maintaining proper A/V sync is a perennial puzzle in real-time multimedia programming. I was able to glean enough timing information from the environment to achieve reasonable A/V sync (verify for yourself).Pause/Resume
The next problem I encountered with the Web Audio API was pause/resume facilities, or the lack thereof. For all its bells and whistles, the API’s omission of such facilities seems most unusual, as if the design philosophy was, “Once the user starts playing audio, they will never, ever have cause to pause the audio.”Then again, I must understand that mine is not a use case that the design committee considered and I’m subverting the API in ways the designers didn’t intend. Typical use cases for this API seem to include such workloads as :
- Downloading, decoding, and playing back a compressed audio stream via the network, applying effects, and visualizing the result
- Accessing microphone input, applying effects, visualizing, encoding and sending the data across the network
- Firing sound effects in a gaming application
- MIDI playback via JavaScript (this honestly amazes me)
What they did not seem to have in mind was what I am trying to do– synthesize audio in real time.
I implemented pause/resume in a sub-par manner : pausing has the effect of generating 0 values when the ScriptProcessorNode callback is invoked, while also canceling any animation callbacks. Thus, audio output is technically still occurring, it’s just that the audio is pure silence. It’s not a great solution because CPU is still being used.
Future Work
I have a lot more player libraries to port to this new system. But I think I have a good framework set up.