
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (59)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (9016)
-
Using openCV library with Java works well on Linux but not on Windows
6 août 2016, par user3586330I have a method that takes screenshots on absolute intervals (25%, 50%, 75% and 100%) from a video-file and save each of them to a separate .png-file. I use openCV with the JavaCV-Wrapper library to do that. The class/method of interest is :
package de.stal.videoreporter;
import org.bytedeco.javacpp.opencv_core;
import static org.bytedeco.javacpp.opencv_imgcodecs.cvSaveImage;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.Frame;
import org.bytedeco.javacv.FrameGrabber;
import org.bytedeco.javacv.OpenCVFrameConverter;
class VideoThumbnailer {
public void createThumbnails(String videoname) throws FrameGrabber.Exception {
FFmpegFrameGrabber g = new FFmpegFrameGrabber("videos/" + videoname);
g.start();
OpenCVFrameConverter.ToIplImage converterToIplImage = new OpenCVFrameConverter.ToIplImage();
int length = g.getLengthInFrames();
int fifty = length / 2;
int twentyfive = fifty / 2;
int seventyfive = fifty + twentyfive;
int hundred = length - 1;
//each frame of video
for (int j = 0; j < length; j++) {
if (j == twentyfive || j == fifty || j == seventyfive || j == hundred) {
String ss = "";
if (j == twentyfive) {
ss = "25";
} else if (j == fifty) {
ss = "50";
} else if (j == seventyfive) {
ss = "75";
} else if (j == hundred) {
ss = "100";
}
g.setFrameNumber(j);
Frame f = g.grabImage();
opencv_core.IplImage image = converterToIplImage.convert(f);
String img_path = "thumbnails/" + videoname + "." + ss + ".png";
cvSaveImage(img_path, image);
}
}
g.stop();
}
}That works fine on environment : Ubuntu 15.10 x64, Java v.1.7.0_101 and Netbeans 8.0.2 with Maven. So I exported the project to a runnable jar-file(with all dependencies included) and tried to start it on Windows 10 x64 via :
java -jar VideoReporter-1.0-SNAPSHOT-jar-with-dependencies.jar
On Windows an exception will be thrown when executing the .jar-file :
Error putting member offsets for class org/bytedeco/javacpp/avutil$Pool_free_Pointer.
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bytedeco.javacpp.Loader.load(Loader.java:472)
at org.bytedeco.javacpp.Loader.load(Loader.java:417)
at org.bytedeco.javacpp.avformat$AVFormatContext.<clinit>(avformat.java:2719)
at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:391)
at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:385)
at de.stal.videoreporter.VideoThumbnailer.createThumbnails(VideoThumbnailer.java:15)
at de.stal.videoreporter.MetaReader.slurpMetadata(MetaReader.java:67)
at de.stal.videoreporter.VideoReporter.main(VideoReporter.java:19)
</clinit>My pom.xml is :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelversion>4.0.0</modelversion>
<groupid>de.stal</groupid>
<artifactid>VideoReporter</artifactid>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
UTF-8
1.7
1.7
</properties>
<build>
<plugins>
<plugin>
<artifactid>maven-assembly-plugin</artifactid>
<configuration>
<archive>
<manifest>
<mainclass>de.stal.videoreporter.VideoReporter</mainclass>
</manifest>
</archive>
<descriptorrefs>
<descriptorref>jar-with-dependencies</descriptorref>
</descriptorrefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupid>org.apache.commons</groupid>
<artifactid>commons-csv</artifactid>
<version>1.1</version>
</dependency>
<dependency>
<groupid>org.bytedeco</groupid>
<artifactid>javacpp</artifactid>
<version>1.2.1</version>
</dependency>
<dependency>
<groupid>org.bytedeco</groupid>
<artifactid>javacv</artifactid>
<version>1.2</version>
</dependency>
<dependency>
<groupid>com.fasterxml.jackson.dataformat</groupid>
<artifactid>jackson-dataformat-csv</artifactid>
<version>2.8.0.rc2</version>
</dependency>
<dependency>
<groupid>javassist</groupid>
<artifactid>javassist</artifactid>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupid>commons-collections</groupid>
<artifactid>commons-collections</artifactid>
<version>3.2.1</version>
</dependency>
<dependency>
<groupid>com.opencsv</groupid>
<artifactid>opencsv</artifactid>
<version>3.3</version>
</dependency>
</dependencies>
</project>What might be the problem on Windows ? In my opinion there shouldn’t be a problem with access to openCV/FFMPEG-classes because they all have been included the .jar-file ? Is this a problem with the classpath ?
Thanks, Peter
-
dash.js : four channels audio streaming
19 juillet 2016, par Carlos ChaconDoes dash.js supports 4 channels in the audio stream ?
I’m using mp4 container : video : h254 and audio : AAC.
For the case that the AAC audio stream is 2 channels it works fine, both video and audio play correctly. But 4 channels does NOT work.
I’m using FFMPEG to create the files and WOWZA to setup the DASH streaming.
For the case that the AAC audio stream is 4 channels I get the following error :
Video can't be played because the file is corrupt.
Command line to generate the 2-channels file :
ffmpeg -i video_in.mp4 -i audio_in_4ch.wav -c:v copy -c:a aac -ac 2 output_2channels.mp4
Command line to generate the 4-channels file :
ffmpeg -i video_in.mp4 -i audio_in_4ch.wav -c:v copy -c:a aac -ac 4 output_4channels.mp4
This is the fmmpeg -i information printed for each file :
2 Channels output file details :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output_2channels.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.37.101
Duration: 00:00:17.59, start: 0.000000, bitrate: 901 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1024x512 [SAR 1:1 DAR 2:1], 894 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default)
Metadata:
handler_name : SoundHandler4 Channels output file details :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output_4channels.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.37.101
Duration: 00:00:17.59, start: 0.000000, bitrate: 1038 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1024x512 [SAR 1:1 DAR 2:1], 894 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 4.0, fltp, 265 kb/s (default)
Metadata:
handler_name : SoundHandler4 Channels output file mdp file :
<?xml version="1.0" encoding="UTF-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" publishtime="2016-07-19T05:56:28Z" mediapresentationduration="PT17.585S" minbuffertime="PT1.5S">
<programinformation>
</programinformation>
<location>http://192.168.0.103:1935/vod/_definst_/mp4:output_4channels.mp4/manifest_w882219731.mpd</location>
<period start="PT0.0S">
<baseurl>http://192.168.0.103:1935/vod/_definst_/mp4:output_4channels.mp4/</baseurl>
<adaptationset mimetype="video/mp4" width="1024" height="512" par="1024:512" framerate="30000/1001" segmentalignment="true" startwithsap="1" subsegmentalignment="true" subsegmentstartswithsap="1">
<segmenttemplate presentationtimeoffset="0" timescale="90000" media="chunk_ctvideo_rid$RepresentationID$_cs$Time$_w882219731_mpd.m4s" initialization="chunk_ctvideo_rid$RepresentationID$_cinit_w882219731_mpd.m4s">
<segmenttimeline>
<s t="0" d="1582650"></s>
</segmenttimeline>
</segmenttemplate>
<representation codecs="avc1.42c01e" sar="1:1" bandwidth="894760"></representation>
</adaptationset>
<adaptationset mimetype="audio/mp4" lang="eng" segmentalignment="true" startwithsap="1" subsegmentalignment="true" subsegmentstartswithsap="1">
<audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
<segmenttemplate presentationtimeoffset="0" timescale="48000" media="chunk_ctaudio_rid$RepresentationID$_cs$Time$_w882219731_mpd.m4s" initialization="chunk_ctaudio_rid$RepresentationID$_cinit_w882219731_mpd.m4s">
<segmenttimeline>
<s t="0" d="844080"></s>
</segmenttimeline>
</segmenttemplate>
<representation codecs="mp4a.40.2" audiosamplingrate="48000" bandwidth="265851">
</representation>
</adaptationset>
</period>
</mpd>HTML Player Code :
<code class="echappe-js"><script src="http://cdn.dashjs.org/latest/dash.all.min.js"></script>
-
dashjs can't find initialization segment on manifest.mpd
30 avril 2016, par Abelardo MendozaI am following this tutorial to stream a WebM. I have no issues running the ffmpeg commands to generate the videos/audio/manifest files but when I try to run it locally, there’s no video or audio at all and dashjs floods the console with :
Searching for initialization.
Start searching for initialization.
Perform init search: http://localhost:8080/video_1280x720_500k.webm
Perform SIDX load: http://localhost:8080/video_640x360_750k.webm
Perform SIDX load: http://localhost:8080/video_1280x720_500k.webmWriting that to console until I stop the server. I have tried using other mpd files such as this, which is used on the dashjs quickstart and it plays the video without any problems.
I used this guide to install the latest version of ffmpeg on Ubuntu 14.04 LTS :
ffmpeg version N-79688-g3cb3ddd Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (Ubuntu 5.3.0-3ubuntu1~14.04) 20151204
configuration: --prefix=/home/ab/cpp/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ab/cpp/ffmpeg_build/include --extra-ldflags=-L/home/ab/cpp/ffmpeg/lib --bindir=/home/ab/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 23.100 / 55. 23.100
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 34.103 / 57. 34.103
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100When running on ffmpeg :
ffmpeg \
-f webm_dash_manifest -i video_160x90_250k.webm \
-f webm_dash_manifest -i video_320x180_500k.webm \
-f webm_dash_manifest -i video_640x360_750k.webm \
-f webm_dash_manifest -i video_640x360_1000k.webm \
-f webm_dash_manifest -i video_1280x720_500k.webm \
-f webm_dash_manifest -i audio_128k.webm \
-c copy -map 0 -map 1 -map 2 -map 3 -map 4 -map 5 \
-f webm_dash_manifest \
-adaptation_sets "id=0,streams=0,1,2,3,4 id=1,streams=5" \
manifest.mpdIt generates the following manifest.mpd :
<?xml version="1.0" encoding="UTF-8"?>
<mpd xmlns="urn:mpeg:DASH:schema:MPD:2011" type="static" mediapresentationduration="PT117.726S" minbuffertime="PT1S" profiles="urn:webm:dash:profile:webm-on-demand:2012">
<period start="PT0S" duration="PT117.726S">
<adaptationset mimetype="video/webm" codecs="vp9" lang="eng" bitstreamswitching="true" subsegmentalignment="true" subsegmentstartswithsap="1">
<representation bandwidth="198155" width="160" height="90">
<baseurl>video_160x90_250k.webm</baseurl>
<segmentbase indexrange="2007834-2008211">
<initialization range="0-437"></initialization>
</segmentbase>
</representation>
<representation bandwidth="459264" width="320" height="180">
<baseurl>video_320x180_500k.webm</baseurl>
<segmentbase indexrange="4459996-4460374">
<initialization range="0-439"></initialization>
</segmentbase>
</representation>
<representation bandwidth="718495" width="640" height="360">
<baseurl>video_640x360_750k.webm</baseurl>
<segmentbase indexrange="6614036-6614414">
<initialization range="0-441"></initialization>
</segmentbase>
</representation>
<representation bandwidth="931445" width="640" height="360">
<baseurl>video_640x360_1000k.webm</baseurl>
<segmentbase indexrange="8309082-8309460">
<initialization range="0-441"></initialization>
</segmentbase>
</representation>
<representation bandwidth="821274" width="1280" height="720">
<baseurl>video_1280x720_500k.webm</baseurl>
<segmentbase indexrange="8728812-8729190">
<initialization range="0-441"></initialization>
</segmentbase>
</representation>
</adaptationset>
<adaptationset mimetype="audio/webm" codecs="vorbis" lang="eng" audiosamplingrate="44100" bitstreamswitching="true" subsegmentalignment="true" subsegmentstartswithsap="1">
<representation bandwidth="107104">
<baseurl>audio_128k.webm</baseurl>
<segmentbase indexrange="1538710-1539184">
<initialization range="0-4112"></initialization>
</segmentbase>
</representation>
</adaptationset>
</period>
</mpd>The index.html has a few changes because dash.js changed the way the player gets initialized.
<code class="echappe-js"><script src="http://cdn.dashjs.org/latest/dash.all.debug.js"></script>And here is Chromium’s log file. I’m converting this webm from this site.
If I missed out any other relevant information or if anyone can guide me into the right direction, please let me know.
Edit :
Like Will Law mentioned, using the Shaka Player worked without any issues with my current manifest. Hope this helps anyone else.