
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (103)
-
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (8341)
-
Loseless FFMPEG compression that supports windows media player
12 juin 2018, par nmrI am trying to create a movie file (avi, mp4, etc as long as it support windows media player) from a sequence of png files using ffmpeg.I am using C++ "System("ffmpeg command")" to create the movie files once I create the png files (this shouldn’t effect movie creation). I was able to create a .avi file using the following command,
ffmpeg.exe -r 30 -i frame_%7d.png test1.avi
Once you create the file it runs in windows media player but does not run in VLC. I have realized, it does lossy compression and the movie is not that high quality (quality decreases with frame rate). I want to have lossless compression (or no compression at all) but needs to be able to play in windows media player. So I tried the following commands,
ffmpeg.exe -framerate 30 -i frame_%7d.png -codec copy test2.avi
This file ran in VLC but didn’t run in windows media player. Then I tried put in "-pix_fmt yuv420p" but still couldn’t get it to run in windows media player.
ffmpeg.exe -framerate 30 -pix_fmt yuv420p -i frame_%7d.png -codec copy test2.avi
I have also tried using "ffv1" codec and it ran in VLC but not in windows media player
ffmpeg.exe -i frame_%7d.png -c:v ffv1 -qscale:v 0 test4.avi
So, how do I create a lossless movie file from a sequence of png files using ffmpeg that will run in windows media player ?
-
ffmpeg reverse video resolution after compression
30 août 2018, par MehranI’m trying to compress a video to
mp4
format withffmpeg
.With scale filter :
cmd = "-i, "+in+" -vf scale=480:-2,setsar=1:1, "+out;
Or as simple as this :
cmd = "-i, "+in+" "+out;
If I try this command, the outPut will be fine in many players like potPlayer(win) or mxPlayer(android), But in some players like kmPlayer.v3(win) it’s stretched. with or without scale filter.
I tried the same video compression with
Handbrake
so I find out there is nothing wrong with my player.The result is the same with all videos that I compressed with ffmpeg library
And there is another problem which is more annoying, the outPut video resolution gets reversed. for Example :
Input : w1280 h720
Output : w720 h1280
I googled a lot but I found nothing.
-
Fails to crop video with ratio height = width using FFMpeg on Android 7
18 avril 2018, par BabsI am using FFMpeg Android this link in our Android app
crop the video to 1:1 ratio i.e height = width
The below command works great on Android devices with Api < 24 but Fails on Api 24. I have also pasted my log analysis below, appreciate if anyone can help me fixing this issue.
public static String cropVideo(final Context context, final File file, final BaseCaptureInterface mBaseCaptureListener) {
String croppedUrl = "";
FFmpeg ffmpeg = FFmpeg.getInstance(context.getApplicationContext());
try {
croppedUrl = file.getParent() + "/Cropped_" + file.getName();
String[] cmds = {"-i", file.getAbsolutePath(), "-vf", "crop=out_h=in_w", "-threads", "5", "-preset" ,"ultrafast","-strict","-2",croppedUrl};
ffmpeg.execute(cmds, new ExecuteBinaryResponseHandler() {
@Override
public void onStart() {
Log.d(TAG, "cropVideo:onStart()");
}
@Override
public void onProgress(String message) {
Log.d(TAG, "cropVideo:onProgress(): " + message);
}
@Override
public void onFailure(String message) {
Log.d(TAG, "cropVideo:onFailure(): " + message);
Toast.makeText(context, "Failed to Crop the video", Toast.LENGTH_SHORT).show();
}
@Override
public void onSuccess(String message) {
file.delete();
mBaseCaptureListener.videoCropStatus(true);
Log.d(TAG, "cropVideo:onSuccess(): " + message);
}
@Override
public void onFinish() {
Log.d(TAG, "cropVideo:onFinish()");
}
});
} catch (FFmpegCommandAlreadyRunningException e) {
Log.d(TAG, "cropVideo:error: " + e);
}
return croppedUrl;
}Observation : Below is the comparison of Pass and Fail logs during onProgress() of cropping. in Fail Logs, the frame initial is 0 and then abruptly jumps to 2392 also the size increases proportionately. Whereas in the Pass logs, the increase in frame and size is quite smooth.
I am wondering if my command string[] needs some changes. Please, let me know if you have any suggestions.Pass Logs :
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:01.00 bitrate= 0.4kbits/s speed=1.97x
frame= 18 fps= 18 q=0.0 size= 0kB time=00:00:01.34 bitrate= 0.3kbits/s dup=9 drop=0 speed=1.33x
frame= 26 fps= 17 q=0.0 size= 0kB time=00:00:02.00 bitrate= 0.2kbits/s dup=13 drop=0 speed=1.33x
frame= 48 fps= 18 q=0.0 size= 0kB time=00:00:02.00 bitrate= 0.2kbits/s dup=24 drop=0 speed=0.744x
frame= 48 fps= 15 q=0.0 size= 0kB time=00:00:02.60 bitrate= 0.1kbits/s dup=24 drop=0 speed=0.814x
frame= 58 fps= 15 q=29.0 size= 25kB time=00:00:03.00 bitrate= 68.1kbits/s dup=29 drop=0 speed=0.802x
frame= 62 fps= 14 q=29.0 size= 45kB time=00:00:03.00 bitrate= 122.6kbits/s dup=31 drop=0 speed=0.679x
frame= 68 fps= 14 q=29.0 size= 68kB time=00:00:03.00 bitrate= 184.3kbits/s dup=34 drop=0 speed=0.608x
frame= 74 fps= 13 q=29.0 size= 96kB time=00:00:03.00 bitrate= 262.1kbits/s dup=37 drop=0 speed=0.534x
frame= 79 fps= 13 q=29.0 size= 119kB time=00:00:03.00 bitrate= 324.3kbits/s dup=39 drop=0 speed=0.482x
frame= 81 fps= 12 q=29.0 size= 131kB time=00:00:03.20 bitrate= 335.2kbits/s dup=40 drop=0 speed=0.475x
frame= 81 fps= 11 q=29.0 size= 131kB time=00:00:03.98 bitrate= 268.9kbits/s dup=40 drop=0 speed=0.551x
frame= 92 fps= 12 q=29.0 size= 197kB time=00:00:04.01 bitrate= 402.0kbits/s dup=45 drop=0 speed=0.516x
frame= 96 fps= 11 q=29.0 size= 222kB time=00:00:04.01 bitrate= 452.9kbits/s dup=47 drop=0 speed=0.479x
frame= 101 fps= 11 q=29.0 size= 245kB time=00:00:04.01 bitrate= 499.8kbits/s dup=49 drop=0 speed=0.44x
frame= 105 fps= 11 q=29.0 size= 268kB time=00:00:04.01 bitrate= 546.6kbits/s dup=51 drop=0 speed=0.414x
frame= 112 fps= 11 q=29.0 size= 310kB time=00:00:04.09 bitrate= 620.0kbits/s dup=54 drop=0 speed= 0.4x
frame= 115 fps= 10 q=29.0 size= 326kB time=00:00:04.09 bitrate= 652.1kbits/s dup=55 drop=0 speed=0.374x
frame= 119 fps= 10 q=29.0 size= 355kB time=00:00:04.09 bitrate= 710.8kbits/s dup=57 drop=0 speed=0.355x
frame= 119 fps=7.1 q=-1.0 Lsize= 671kB time=00:00:04.13 bitrate=1327.9kbits/s dup=57 drop=0 speed=0.245x
video:604kB audio:62kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.717086%
[libx264 @ 0xb5b08800] frame I:1 Avg QP:23.35 size: 24768
Fail Logs:
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.81 bitrate= 0.5kbits/s speed=1.61x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:01.57 bitrate= 0.2kbits/s speed=1.56x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:02.30 bitrate= 0.2kbits/s speed=1.51x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:03.22 bitrate= 0.1kbits/s speed=1.58x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:04.13 bitrate= 0.1kbits/s speed=1.63x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:04.90 bitrate= 0.1kbits/s speed=1.61x
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:05.82 bitrate= 0.1kbits/s speed=1.64x
frame= 2392 fps=111 q=22.0 size= 1059kB time=00:01:19.61 bitrate= 109.0kbits/s dup=2389 drop=0 speed=3.68x
frame= 2416 fps=109 q=27.0 size= 1059kB time=00:01:20.41 bitrate= 107.9kbits/s dup=2390 drop=0 speed=3.63x
frame= 2438 fps=108 q=27.0 size= 1059kB time=00:01:21.14 bitrate= 106.9kbits/s dup=2390 drop=0 speed=3.58x
frame= 2462 fps=106 q=26.0 size= 1060kB time=00:01:21.94 bitrate= 105.9kbits/s dup=2393 drop=0 speed=3.54x
frame= 2484 fps=105 q=25.0 size= 1060kB time=00:01:22.68 bitrate= 105.0kbits/s dup=2395 drop=0 speed= 3.5x
frame= 2506 fps=104 q=24.0 size= 1060kB time=00:01:23.41 bitrate= 104.1kbits/s dup=2397 drop=0 speed=3.45x
frame= 2530 fps=103 q=26.0 size= 1060kB time=00:01:24.21 bitrate= 103.1kbits/s dup=2397 drop=0 speed=3.41x
frame= 2554 fps=101 q=25.0 size= 1061kB time=00:01:25.01 bitrate= 102.2kbits/s dup=2399 drop=0 speed=3.38x
frame= 2577 fps=100 q=26.0 size= 1167kB time=00:01:25.78 bitrate= 111.4kbits/s dup=2399 drop=0 speed=3.34x
frame= 2588 fps= 99 q=-1.0 Lsize= 4707kB time=00:01:26.35 bitrate= 446.6kbits/s dup=2399 drop=0 speed=3.32x
video:4590kB audio:101kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.346620%