
Recherche avancée
Autres articles (95)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (10204)
-
Is there a document or page describing the output of ffprobe -show_frames ?
4 novembre 2017, par yangI am trying to use scene detection filter and extract key frames.
ffprobe -v quiet -show_frames -of compact=p=0 -f lavfi "movie=sample.mp4,select='gt(scene,.5)'"
However, the output is really hard to read for me.
media_type=video|stream_index=0|key_frame=1|pkt_pts=4879872|pkt_pts_time=317.700000|pkt_dts=4879872|pkt_dts_time=317.700000|best_effort_timestamp=4879872|best_effort_timestamp_time=317.700000|pkt_duration=N/A|pkt_duration_time=N/A|pkt_pos=16582154|pkt_size=691200|width=640|height=360|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|tag:lavfi.scene_score=0.548330
I searched google and here, couldn’t find a document that explain each result. Like what is pkt_pts ? what does best_effort_timestamp mean ? Is there a place to learn all these outputs ?
-
JavaFX MediaPlayer unable to play local m3u8 file
3 mai 2017, par LennartI want to show a live stream of a web cam in my JavaFX application using the MediaPlayer/MediaView. My attempt was to use ffmpeg to record a HLS and to play the resulting m3u8 file, but that throws the following exception (VLC plays the video without problems) :
MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!
at javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146)
at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:511)
at javafx.scene.media.MediaPlayer.<init>(MediaPlayer.java:414)
at de.fraunhofer.iosb.ias.flow.assessment.management.monitor.MonitorViewController.testStream(MonitorViewController.java:203)
... 58 more
Caused by: com.sun.media.jfxmedia.MediaException: Could not create player!
at com.sun.media.jfxmediaimpl.NativeMediaManager.getPlayer(NativeMediaManager.java:274)
at com.sun.media.jfxmedia.MediaManager.getPlayer(MediaManager.java:118)
at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:467)
... 60 more
</init>I debugged the player creation and the error occurs inside the constructor of GSTMediaPlayer when
GSTMediaPlayer.gstInitPlayer()
is called. This native method returns the error code257
, which javafx maps toMediaError.ERROR_MEDIA_NULL
.I used the following ffmpeg command to record the video :
ffmpeg -hide_banner -y -rtbufsize 250MB -f dshow -pixel_format yuv420p -video_size 960x720 -i video="Logitech HD Pro Webcam C920" -c:v libx264 -crf 20 -pix_fmt yuv420p out.m3u8
I’m pretty sure that the encoding matches the requirements of javafx, because if I change the output container from m3u8 to mp4, the video is played without problems using the exact same ffmpeg command.
This is the output of ffprobe for the m3u8 file :
Input #0, hls,applehttp, from 'out.m3u8':
Duration: 00:00:24.23, start: 1.466667, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x720, 30 fps, 30 tbr, 90k tbn, 60 tbcAnd for the mp4 file :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.41.100
Duration: 00:01:04.93, start: 0.000000, bitrate: 1676 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x720, 1673 kb/s, 30 fps, 30 tbr, 10000k tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandlerThe resulting m3u8 file looks like this :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:9
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:8.333322,
out0.ts
#EXTINF:8.333333,
out1.ts
#EXTINF:7.133322,
out2.ts
#EXTINF:0.433333,
out3.ts
#EXT-X-ENDLISTUpdate : After I found this reference m3u file, I think that the problem is that the file is stored locally and isn’t delivered via HTTP. The video plays fine with this :
Media media = new Media("http://download.oracle.com/otndocs/products/javafx/JavaRap/prog_index.m3u8");
MediaPlayer player = new MediaPlayer(media);
player.setAutoPlay(true);
mediaView.setMediaPlayer(player);But after I downloaded the reference m3u and all of its segments and tried to open the local file like this, the error occurred again :
File video = new File("H://Projects//Tools//ref//prog_index.m3u8");
Media media = new Media(video.toURI().toString());
MediaPlayer player = new MediaPlayer(media);
player.setAutoPlay(true);
mediaView.setMediaPlayer(player);I tried to change my m3u file so that the segements are referenced with absolute paths. I tried different notations (
H:\f\out0.ts
,H:/f/out0.ts
,H://f//out0.ts
,file:/H:/f/out0.ts
,file:///H:/f/out0.ts
), but I couldn’t get it to work. -
c# Process Arguments and Missing Output
8 décembre 2017, par TawmI’m using an
FFMPEG Process
to gather some information on a file :private void GatherFrames()
{
Process process = new Process();
process.StartInfo.FileName = "ffmpeg";
process.StartInfo.Arguments = "-i \"" + filePath + "\"";
process.StartInfo.RedirectStandardError = true;
process.StartInfo.UseShellExecute = false;
if (!process.Start())
{
Console.WriteLine("Error starting");
return;
}
StreamReader reader = process.StandardError;
string line;
while ((line = reader.ReadLine()) != null)
{
outputRichTextBox.AppendText(line + "\n");
}
process.Close();
}This seems to works fine. Now I want to get just the
FrameRate
, and thanks to other posts, I’ve found thatffprobe
can be used to do just that :public void GetFrameRate()
{
Process process = new Process();
process.StartInfo.FileName = "ffprobe";
process.StartInfo.Arguments = "-v 0 -of compact=p=0 -select_streams 0 -show_entries stream = r_frame_rate \"" + filePath + "\"";
Console.WriteLine(process.StartInfo.Arguments);
process.StartInfo.RedirectStandardError = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = false;
Console.WriteLine(process.StartInfo);
if (!process.Start())
{
Console.WriteLine("Error starting");
return;
}
StreamReader reader = process.StandardError;
string line;
while ((line = reader.ReadLine()) != null)
{
Console.WriteLine(line);
}
process.Close();
}This does not seem to work at all. The process starts, but does not return what I expect to be returned.
If I run the command manually, I do the following in
cmd.exe
:> e:
> cd "FILE_PATH"
> ffprobe -v 0 -of compact=p=0 -select_streams 0 -show_entries stream=r_frame_rate "FILE_NAME.mp4"
r_frame_rate=60/1Note :
-show_entries stream = r_frame_rate
does not work, only-show_entries stream=r_frame_rate
without the spaces.
I’m not sure how to properly go about doing this with a
Process
.