
Recherche avancée
Autres articles (31)
-
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone. -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (5700)
-
Ffmpeg performance issue when transcoding to webm
9 juin 2017, par AlgoldI have recently updated ffmpeg from version 2.0.2 to the most recent release 2.7. I installed it using the same building configuration as the old version and the same codecs version (libvpx and h264). When I tried to transcode an mp4 video to webm, I found out that the speed of the new version is significantly lower (3 times) than the old one. I run this on two identical 8 core machines (Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz) - OS : Ubuntu 14.04. Below is the command I run :
/usr/local/bin/ffmpeg -i in.mp4 -f webm -vcodec libvpx -b:v 1000K out.webm
These are the outputs for the two versions :
v 2.0.2
ffmpeg version 2.0.2 Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 7 2015 13:51:25 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --disable-ffplay --disable-ffserver --enable-libxvid --enable-gpl --enable-nonfree --enable-pthreads --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-zlib --enable-avfilter --enable-libfreetype --enable-libfdk_aac --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-shared
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.12.100
Duration: 00:00:10.19, start: 0.000000, bitrate: 1724 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1480 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 253 kb/s
Metadata:
handler_name : SoundHandler
[libvpx @ 0x22f3760] v1.3.0
Output #0, webm, to 'out.webm':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.12.100
Stream #0:0(und): Video: vp8 (libvpx), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 1k tbn, 29.97 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libvpx)
Stream #0:1 -> #0:1 (aac -> libvorbis)
Press [q] to stop, [?] for help
frame= 302 fps= 23 q=0.0 Lsize= 1445kB time=00:00:10.18 bitrate=1161.9kbits/s
video:1304kB audio:128kB subtitle:0 global headers:4kB muxing overhead 0.644833%v 2.7
ffmpeg version 2.7 Copyright (c) 2000-2015 the FFmpeg developer built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --disable-ffplay --disable-ffserver --enable-libxvid --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-zlib --enable-libass --enable-pthreads --enable-avfilter --enable-libfreetype --enable-libfdk_aac --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-shared --enable-openssl
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.36.100
Duration: 00:00:10.19, start: 0.000000, bitrate: 1596 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1480 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
[libvpx @ 0xfe4640] v1.3.0
Output #0, webm, to 'out.webm':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.36.100
Stream #0:0(und): Video: vp8 (libvpx), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 29.97 fps, 1k tbn, 29.97 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc56.41.100 libvpx
Stream #0:1(und): Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc56.41.100 libvorbis
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> vp8 (libvpx))
Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
frame= 302 fps=8.3 q=0.0 Lsize= 1410kB time=00:00:10.18 bitrate=1133.4kbits/s
video:1274kB audio:123kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.909304%I tried ffmpeg 2.6.3 and the performance the same as for 2.7. Also it looks like when I transcode webm to mp4 2.7 is 30% faster than webm.
I tried to look if there are building configuration options for the new version but couldn’t find anything.
Can anyone suggest a possible reason for the worse speed performance of the new version when transcoding to webm ?
-
Does H.264 encoding profile affect encoding performance ?
3 novembre 2017, par user8154565I want to encode in real-time using as little CPU and memory\disk I\O as possible, keeping a low CRF (currently 14). Will changing the encoding profile from Baseline to something else affect encoding CPU usage ?
My current settings are :
Profile\Level : Baseline@L5.2
Resolution and frame rate : 1920x1080 @ 144.001 FPS (variable frame rate mode)
Average overall data rate : 174 mbit\s (audio is 320kbit\s VBR AAC)
x264 settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=14.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
-
Improve performance of FFMPEG with Java [on hold]
20 janvier 2018, par Nitishkumar SinghThis question is actually for improving performance of an Java application. In this java application, I am trying to convert an video into small clips.
Here is the implementation class for the same
package ffmpeg.clip.process;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import ffmpeg.clip.utils.VideoConstant;
import ffmpeg.clip.utils.VideoUtils;
/*
* @author Nitishkumar Singh
* @Description: class will use ffmpeg to break an source video into clips
*/
public class VideoToClip {
/*
* Prevent from creating instance
*/
private VideoToClip() {
}
/**
* Get Video Duration is milliseconds
*
* @Exception IOException - File does not exist VideoException- Video File have data issues
*/
static LocalTime getDuration(String sourceVideoFile) throws Exception {
if (!Paths.get(sourceVideoFile).toFile().exists())
throw new Exception("File does not exist!!");
Process proc = new ProcessBuilder(VideoConstant.SHELL, VideoConstant.SHELL_COMMAND_STRING_ARGUMENT,
String.format(VideoConstant.DURATION_COMMAND, sourceVideoFile)).start();
boolean errorOccured = (new BufferedReader(new InputStreamReader(proc.getErrorStream())).lines()
.count() > VideoConstant.ZERO);
String durationInSeconds = new BufferedReader(new InputStreamReader(proc.getInputStream())).lines()
.collect(Collectors.joining(System.lineSeparator()));
proc.destroy();
if (errorOccured || (durationInSeconds.length() == VideoConstant.ZERO))
throw new Exception("Video File have some issues!");
else
return VideoUtils.parseHourMinuteSecondMillisecondFormat(durationInSeconds);
}
/**
* Create Clips for Video Using Start and End Second
*
* @Exception IOException - Clip Creation Process Failed InterruptedException - Clip Creation task get's failed
*/
static String toClipProcess(String sourceVideo, String outputDirectory, LocalTime start, LocalTime end,
String fileExtension) throws IOException, InterruptedException, ExecutionException {
String clipName = String.format(VideoConstant.CLIP_FILE_NAME,
VideoUtils.getHourMinuteSecondMillisecondFormat(start),
VideoUtils.getHourMinuteSecondMillisecondFormat(end), fileExtension);
String command = String.format(VideoConstant.FFMPEG_OUTPUT_COMMAND, sourceVideo,
VideoUtils.getHourMinuteSecondMillisecondFormat(start),
VideoUtils.getHourMinuteSecondMillisecondFormat(end.minus(start.toNanoOfDay(), ChronoUnit.NANOS)),
outputDirectory, clipName);
LocalTime startTime = LocalTime.now();
System.out.println("Clip Name: " + clipName);
System.out.println("FFMPEG Process Execution Started");
CompletableFuture<process> completableFuture = CompletableFuture.supplyAsync(() -> {
try {
return executeProcess(command);
} catch (InterruptedException | IOException ex) {
throw new RuntimeException(ex);
}
});
completableFuture.get();
// remove
LocalTime endTime = LocalTime.now();
System.out.println("Clip Name: " + clipName);
System.out.println("FFMPEG Process Execution Finished");
System.out.println("Duration: " + Duration.between(startTime, endTime).toMillis() / 1000);
return clipName;
}
/**
* Create and Execute Process for each command
*/
static Process executeProcess(String command) throws InterruptedException, IOException {
Process clipProcess = Runtime.getRuntime().exec(command);
clipProcess.waitFor();
return clipProcess;
}
}
</process>The Entire Solution is availble at Github. So I am actually using CompletableFuture and running FFMPEG command by creating Java Process. The time it takes is too much. For 40 minutes video, it takes more than 49 minutes, that too on a 64 cpu machine. I am trying to reduce the core size to 8 or something, as well improve it’s performance. Any Help would be really great.