
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (88)
-
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 (12212)
-
Why is long video taking long time before VideoJS player gets metadata to start playing ?
7 mars 2015, par Tom JenkinsonDoes anyone know why it is taking so long before the
loadedmetadata
event is fired for longer videos ?Here is an example : https://www.la1tv.co.uk/player/124/260
I can see in developer tools that the file is still downloading when the event is fired, so it’s not like it’s having to download the whole file, it’s just having to get quite far though before the event is fired.
The ffmpeg command I am using to encode the video from java is :
RuntimeHelper.executeProgram(new String[] {config.getString("ffmpeg.location"), "-y", "-nostdin", "-timelimit", ""+config.getInt("ffmpeg.videoEncodeTimeLimit"), "-progress", ""+f.progressFile.getAbsolutePath(), "-i", source.getAbsolutePath(), "-vf", "scale=trunc(("+f.h+"*a)/2)*2:"+f.h, "-strict", "experimental", "-acodec", "aac", "-b:a", f.aBitrate+"k", "-ac", "2", "-ar", "48000", "-vcodec", "libx264", "-vprofile", "main", "-g", "48", "-b:v", f.vBitrate+"k", "-maxrate", f.vBitrate+"k", "-bufsize", f.vBitrate*2+"k", "-preset", "medium", "-crf", "16", "-vsync", "vfr", "-af", "aresample=async=1000", "-movflags", "+faststart", "-r", f.fr+"", "-f", "mp4", f.outputFile.getAbsolutePath()}, workingDir, null, null);
which can be found here.
It has the
faststart
flag set and I thought this meant the metadata would be inserted right at the beginning of the file ?Could it be an issue with the encode settings ?
Thanks !
-
Video created with ffmpeg won't play in video player
11 octobre 2014, par user3180253I’m using Python to create a video using ffmpeg. The following code is what I’m using...
import subprocess as sp
import Image
FFMPEG_BIN = "ffmpeg"
commandWriter = [ FFMPEG_BIN,
'-y',
'-f', 'image2pipe',
'-vcodec','mjpeg',
'-s', '480x360', # size of one frame
'-pix_fmt', 'rgb24',
'-r', '29', # frames per second
'-i', '-',
'-an', # Tells FFMPEG not to expect any audio
'-vcodec', 'mpeg4',
'-qscale', '5',
'-r', '29',
'-b', '250',
'./fire.mp4' ]
pipeWriter = sp.Popen(commandWriter, stdin=sp.PIPE)
fps, duration = 24, 10
for i in range(fps*duration):
im = Image.new("RGB",(480,360),(i%250,1,1))
im.save(pipeWriter.stdin, "JPEG")
pipeWriter.stdin.close()
pipeWriter.wait()
pipeWriter.terminate()After running the above code, I get an output video with a data rate of 214 kbps. This video won’t play in Windows Media Player. At first I was at a loss of how to get the video to play, so I compared it to another video that I downloaded. I noticed the only real difference was in the bit rates/data rates. I ran this command from the command line...
ffmpeg -i fire.mp4 -b:v 250k -bufsize 250k water.mp4
which as I understand it takes fire.mp4 and simply outputs a new video with a modified bit rate. This new output works when I open it in Windows Media Player.
The question I’m asking is how can I do this straight from Python ? I’ve tried adding a -b option to commandWriter (as shown) but this does not work. I’ve also added a bufsize = 10**8 in my pipeWriter but that does not work either.
Overall what I’m trying to accomplish is taking a video input.mp4, modifying each frame as I load it in memory, and then writing that frame to a new file output.mp4. So far ffmpeg is looking like the best tool ’cause I can’t get OpenCV to work at all.
So if anyone has a way to have a water.mp4 output file be able to run in Windows Media Player without needing to have that additional command line code run or a better way to complete my overall task, I would much appreciate that.
-
JavaFX media issue on Ubuntu : Could not create player
14 mai, par parsa2820I am trying to play mp3 file on JavaFX-11.0.2 on Ubuntu-20.04 using JDK-13.0.2 but I keep getting this same error every time. While I was searching for that I found that JavaFX uses older version of some libraries(See this issue on github). So I compiled and installed ffmpeg-3.1.11 from source. But the same exception is thrown. I put my code and error message bellow. I stuck on this for days so I really appreciate any help. Thanks.


note : This is not duplicate qeustion. All other questions regarding to this error happend on different versions and had different causes. I tried most of them but none of them works for me.


/usr/lib/jvm/jdk-13.0.2/bin/java --module-path /opt/javafx-sdk-11.0.2/lib --add-modules=javafx.controls,javafx.fxml,javafx.media -Djava.library.path=/opt/javafx-sdk-11.0.2/lib -javaagent:/opt/idea-IU-201.7846.76/lib/idea_rt.jar=46237:/opt/idea-IU-201.7846.76/bin -Dfile.encoding=UTF-8 -classpath /home/parsa/Documents/welanner/target/classes:/opt/javafx-sdk-11.0.2/lib/src.zip:/opt/javafx-sdk-11.0.2/lib/javafx-swt.jar:/opt/javafx-sdk-11.0.2/lib/javafx.web.jar:/opt/javafx-sdk-11.0.2/lib/javafx.base.jar:/opt/javafx-sdk-11.0.2/lib/javafx.fxml.jar:/opt/javafx-sdk-11.0.2/lib/javafx.media.jar:/opt/javafx-sdk-11.0.2/lib/javafx.swing.jar:/opt/javafx-sdk-11.0.2/lib/javafx.controls.jar:/opt/javafx-sdk-11.0.2/lib/javafx.graphics.jar:/home/parsa/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar view.GUI
Exception in Application start method
java.lang.reflect.InvocationTargetException
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:567)
 at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
 at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:567)
 at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
 at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
 at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
 at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!
 at javafx.media/javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146)
 at javafx.media/javafx.scene.media.MediaPlayer.init(MediaPlayer.java:518)
 at javafx.media/javafx.scene.media.MediaPlayer.<init>(MediaPlayer.java:421)
 at view.GUI.start(GUI.java:13)
 at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
 at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
 at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
 at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
 at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
 at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
 at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
 at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
 ... 1 more
Caused by: com.sun.media.jfxmedia.MediaException: Could not create player!
 at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaManager.getPlayer(NativeMediaManager.java:295)
 at javafx.media/com.sun.media.jfxmedia.MediaManager.getPlayer(MediaManager.java:118)
 at javafx.media/javafx.scene.media.MediaPlayer.init(MediaPlayer.java:474)
 ... 11 more
Exception running application view.GUI

Process finished with exit code 1
</init>


This is my code. I know path and other things are correct because I can run it on Windows properly.


package view;

import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.stage.Stage;

import java.io.File;

public class GUI extends javafx.application.Application{
 public void start(Stage stage) throws Exception {
 String path = "/home/parsa/Music/Ninoush.mp3";
 Media media = new Media(new File(path).toURI().toString());
 MediaPlayer mediaPlayer = new MediaPlayer(media);
 mediaPlayer.setAutoPlay(true);
 stage.setTitle("Playing audio");
 stage.show();
 }

 public static void main(String[] args) {
 launch(args);
 }
}



This is my ffmpeg and libraries versions :


ffmpeg version 3.1.11 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: 
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100



Edit 3 : I can play wav file this way but I can't play mp3.