
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (74)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (9056)
-
Issue with creating an empty video and adding images using FFmpeg in C#
14 juillet 2023, par hello worldI'm working on a C# project where I need to create an empty video file and then add images to it using FFmpeg. However, the code I have implemented doesn't seem to be working as expected.


Here's the code snippet I have :


using System;
using System.Diagnostics;
using System.Drawing;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace VideoProcessingApp
{
 public partial class MainForm : Form
 {
 private bool render = false;

 public MainForm()
 {
 InitializeComponent();
 }

 private async void button6_Click(object sender, EventArgs e)
 {
 ProcessStartInfo createVideoInfo = new ProcessStartInfo
 {
 FileName = "ffmpeg.exe",
 Arguments = $"-f lavfi -i nullsrc -t 10 -s {pictureBox2.Width}x{pictureBox2.Height} -r 30 -c:v libx264 output.mp4",
 UseShellExecute = false,
 RedirectStandardOutput = true,
 RedirectStandardError = true,
 CreateNoWindow = true
 };

 using (Process createVideoProcess = new Process())
 {
 createVideoProcess.StartInfo = createVideoInfo;
 createVideoProcess.Start();

 render = true;
 await Task.Run(() =>
 {
 for (int i = 0; i < 10; i++)
 {
 if (!render)
 break;

 Bitmap bmp = new Bitmap(1, 1);
 pictureBox1.Invoke((MethodInvoker)(() =>
 {
 bmp = (Bitmap)pictureBox1.Image.Clone();
 }));

 while (bmp == pictureBox1.Image)
 {
 Thread.Sleep(10);
 }

 bmp.Save("a.jpg");

 ProcessStartInfo addImageInfo = new ProcessStartInfo
 {
 FileName = "ffmpeg.exe",
 Arguments = $"-i output.mp4 -i a.jpg -filter_complex \"overlay=10:10\" -c:v libx264 -c:a copy -f mp4 -",
 UseShellExecute = false,
 RedirectStandardOutput = true,
 RedirectStandardError = true,
 RedirectStandardInput = true,
 CreateNoWindow = true
 };

 using (Process addImageProcess = new Process())
 {
 addImageProcess.StartInfo = addImageInfo;
 addImageProcess.Start();

 addImageProcess.WaitForExit();
 }
 }
 });
 }

 File.Delete("a.jpg");
 }
 }
}



In this code, I'm attempting to create an empty video by executing an FFmpeg command to generate a nullsrc video. Then, I'm using a loop to capture images from a PictureBox control and overlay them onto the video using FFmpeg.


The issue I'm facing is that the video is not being created at all. I have verified that FFmpeg is installed on my system and the paths to the FFmpeg executable are correct.


I would appreciate any insights or suggestions on what could be causing this issue and how to resolve it. Thank you !


-
ffmpeg trimming frame freeze issue
20 juin 2023, par RaymondI used these command to trim the video :


without re-encode


ffmpeg -i input.mp4 -to 00:06:49 -c copy out1.ts ffmpeg -ss 00:07:13 -i input.mp4 -c copy out2.ts ffmpeg -i 'concat:out1.ts|out2.ts' -c copy output3.mp4


with re-encode


ffmpeg -i output000.mp4 -to 00:06:47.430 -c:v libx264 -c:a aac -avoid_negative_ts 1 out1.mp4 ffmpeg -ss 00:07:13.399 -i output000.mp4 -c:v libx264 -c:a aac -avoid_negative_ts 1 out2.mp4 ffmpeg -i 'concat:out1.mp4|out2.mp4' -c copy output3.mp4



ffmpeg -i input.ts -to 00:06:49 -c:v libx264 -c:a aac -strict experimental out1.ts ffmpeg -ss 00:07:13 -i input.ts -c:v libx264 -c:a aac -strict experimental out2.ts ffmpeg -i "concat:out1.ts|out2.ts" -c:v copy -c:a copy output3.ts



ffmpeg -i input.mp4 -to 00:06:49 -c:v libx264 -c:a aac -avoid_negative_ts 1 out1.mp4 ffmpeg -ss 00:07:13 -i input.mp4 -c:v libx264 -c:a aac -avoid_negative_ts 1 out2.mp4 ffmpeg -i 'concat:out1.mp4|out2.mp4' -c copy output3.mp4



ffmpeg -i input.mp4 -to 00:06:49 -c:v libx264 -c:a aac -strict experimental out1.mp4 ffmpeg -ss 00:07:13 -i input.mp4 -c:v libx264 -c:a aac -strict experimental out2.mp4 ffmpeg -i 'concat:out1.mp4|out2.mp4' -c copy output3.mp4



ffmpeg -i input.ts -to 00:06:49 -c:v libx264 -c:a aac out1.ts ffmpeg -ss 00:07:13 -i input.ts -c:v libx264 -c:a aac out2.ts ffmpeg -i "concat:out1.ts|out2.ts" -c:v copy -c:a copy output3.ts


These command are works, but it causes the video to freeze for about 1 second wherever I trim it. I have attached a video below to provide an example of the freeze frame issue.


example : https://jumpshare.com/v/r510dpNflKUFJEFXQXlP


I tried to trim the video, and it was successfully trimmed. However, the issue of frame freezing still exists in the video


-
FFMPEG issue with concat video made from single image
12 mai 2023, par JacobI am pulling my hair out right now. I am developing a video editing program. When I export two videos, concat works great. However, when I create a video from a single image (title screen) and try to concat that video with a regular video, only the title screen is exported. And no errors.


Below is the code for creating the title screen :


parameters = "-loop 1 -i " + '"' + video.VideoThumbPath + '"' + " -c:v libx264 -t " + video.TitleDuration.ToString() + " -pix_fmt yuv420p " + vidPath + @"\v" + outputFile.ToString() + ".MP4";



Below is the code for exporting a regular non title screen video :


parameters = "-y -i " + '"' + frames[0].VideoPath + '"' + " -filter_complex " + '"' + @"[0:v]trim=" + frames[0].TimeCode.TotalSeconds + @":" + frames[1].TimeCode.TotalSeconds +
 @", setpts=PTS-STARTPTS[trimedv0];[trimedv0]yadif," + orientation + @"setsar=1/1, eq=contrast=1:brightness=" + video.Brightness + '"' + " -sn -an -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 " +
 @"-pix_fmt yuv420p -f mpegts " + vidPath + @"\v" + outputFile.ToString() + ".MP4";



Below is the code to concat both videos :


parameters = "-probesize 100M -analyzeduration 100M -i concat:" + '"' + concatString + '"' + @" -c:v copy " + '"' + ExportOptions.CompleteDestinationPath + '"';



Like I said, using this code for two MP4 video that were not made from a single image, it works great. If I create a MP4 from a single image with a duration of 5 seconds and concat it with a normal MP4, only the title screen is exported.


Below is the output from FFMPEG. It shows the concat string with 2 videos but only concats the first one.


09:59:32:366 ffmpeg version N-110043-gadb5f7b41f-20230318 Copyright (c) 2000-2023 the FFmpeg developers



09:59:32:366 built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
09:59:32:366 configuration : —prefix=/ffbuild/prefix —pkg-config-flags=—static —pkg-config=pkg-config —cross-prefix=x86_64-w64-mingw32- —arch=x86_64 —target-os=mingw32 —enable-gpl —enable-version3 —disable-debug —disable-w32threads —enable-pthreads —enable-iconv —enable-libxml2 —enable-zlib —enable-libfreetype —enable-libfribidi —enable-gmp —enable-lzma —enable-fontconfig —enable-libvorbis —enable-opencl —disable-libpulse —enable-libvmaf —disable-libxcb —disable-xlib —enable-amf —enable-libaom —enable-libaribb24 —enable-avisynth —enable-chromaprint —enable-libdav1d —enable-libdavs2 —disable-libfdk-aac —enable-ffnvcodec —enable-cuda-llvm —enable-frei0r —enable-libgme —enable-libkvazaar —enable-libass —enable-libbluray —enable-libjxl —enable-libmp3lame —enable-libopus —enable-librist —enable-libssh —enable-libtheora —enable-libvpx —enable-libwebp —enable-lv2 —disable-libmfx —enable-libvpl —enable-openal —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenh264 —enable-libopenjpeg —enable-libopenmpt —enable-librav1e —enable-librubberband —enable-schannel —enable-sdl2 —enable-libsoxr —enable-libsrt —enable-libsvtav1 —enable-libtwolame —enable-libuavs3d —disable-libdrm —disable-vaapi —enable-libvidstab —enable-vulkan —enable-libshaderc —enable-libplacebo —enable-libx264 —enable-libx265 —enable-libxavs2 —enable-libxvid —enable-libzimg —enable-libzvbi —extra-cflags=-DLIBTWOLAME_STATIC —extra-cxxflags= —extra-ldflags=-pthread —extra-ldexeflags= —extra-libs=-lgomp —extra-version=20230318
09:59:32:366 libavutil 58. 4.100 / 58. 4.100
09:59:32:366 libavcodec 60. 6.101 / 60. 6.101
09:59:32:366 libavformat 60. 4.100 / 60. 4.100
09:59:32:366 libavdevice 60. 2.100 / 60. 2.100
09:59:32:366 libavfilter 9. 4.100 / 9. 4.100
09:59:32:366 libswscale 7. 2.100 / 7. 2.100
09:59:32:366 libswresample 4. 11.100 / 4. 11.100
09:59:32:366 libpostproc 57. 2.100 / 57. 2.100
09:59:32:366 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C :\Users\JDINES\AppData\Roaming\FCS\VidBin\v1000.MP4|C :\Users\JDINES\AppData\Roaming\FCS\VidBin\v1001.MP4' :
09:59:32:366 Metadata :
09:59:32:366 major_brand : isom
09:59:32:366 minor_version : 512
09:59:32:366 compatible_brands : isomiso2avc1mp41
09:59:32:366 encoder : Lavf60.4.100
09:59:32:366 Duration : 00:00:05.00, start : 0.000000, bitrate : 64102 kb/s
09:59:32:366 Stream #0:00x1 : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 18 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
09:59:32:366 Metadata :
09:59:32:366 handler_name : VideoHandler
09:59:32:366 vendor_id : [0][0][0][0]
09:59:32:366 encoder : Lavc60.6.101 libx264
09:59:32:366 Output #0, mp4, to 'C :\Users\JDINES\Desktop\EXPORT TEST\qwe.MP4' :
09:59:32:366 Metadata :
09:59:32:366 major_brand : isom
09:59:32:366 minor_version : 512
09:59:32:366 compatible_brands : isomiso2avc1mp41
09:59:32:366 encoder : Lavf60.4.100
09:59:32:366 Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 18 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
09:59:32:366 Metadata :
09:59:32:366 handler_name : VideoHandler
09:59:32:366 vendor_id : [0][0][0][0]
09:59:32:366 encoder : Lavc60.6.101 libx264
09:59:32:366 Stream mapping :
09:59:32:366 Stream #0:0 -> #0:0 (copy)
09:59:32:366 Press [q] to stop, [?] for help
09:59:32:366 frame= 0 fps=0.0 q=-1.0 size= 0kB time=-00:00:00.06 bitrate= -0.0kbits/s speed=N/A

frame= 150 fps=0.0 q=-1.0 Lsize= 14kB time=00:00:04.90 bitrate= 23.4kbits/s speed=2e+03x

09:59:32:366 video:11kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 23.005581%

Any help would be much appreciated !


I figured this out finally !!!


The below code fixed it :


parameters = "-loop 1 -i " + '"' + video.VideoThumbPath + '"' + " -sn -an -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 " +
 @"-t 5 -pix_fmt yuv420p -f mpegts " + vidPath + @"\v" + outputFile.ToString() + ".MP4";