
Recherche avancée
Médias (17)
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (56)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...)
Sur d’autres sites (10555)
-
Ffmpeg ouputting empty file to s3 when editing a remote video clip on AWS Lambda function
8 août 2023, par enjoysturtlesI'm trying to take a clip from a remote url, use ffmpeg to edit it, and save the result to s3.


I have a layer installed with ffmpeg attached to a lambda function. The lambda function runs an ffmpeg script on it and uploads the result to S3, however, the file size is either much smaller than it should be, or 0 bytes.


Locally, the code works perfectly, and it's outputting 500kb files into lambda. I'm running python 3.9 locally as well as on the lambda.


I thought that the file was not downloading fully before ffmpeg begins processing, which would explain the much smaller output file sizes.


I tried downloading the remote file to the lambda's
/tmp
and using that as the input for ffmpeg, but I continued having the same issue with the empty file.

Here's all the code in my lambda function :


import json
import subprocess
import shlex
import boto3
from datetime import datetime

def lambda_handler(event, context):
 download_url = 'https://newslater-resources.s3.us-west-2.amazonaws.com/ca4a9d5b-691a-49cc-90aa-15636c222017.mov'

 s3 = boto3.client(
 's3',
 region_name="us-east-1",
 )

 key = '/edits/%s.mov' % int(datetime.utcnow().timestamp())

 command='''
 /opt/bin/ffmpeg -i %s \
 -vf "crop=w=in_h*9/16:h=in_h,scale=1080x1920" \
 -vcodec libx264 \
 -crf 23 \
 -preset veryfast \
 -c: a copy \
 -s 1080x1920 \
 - -y
 ''' % (download_url)

 split_command = shlex.split(command)

 p1 = subprocess.run(split_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

 response = s3.put_object(Body=p1.stdout, Bucket='edited-clips', Key=key)

 signed_url = s3.generate_presigned_url(
 ClientMethod='get_object',
 Params={
 'Bucket': 'edited-clips',
 'Key': key,
 } 
 )



Any help would be greatly appreciated. Thank you !


-
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 !


-
log file of ffmpeg's subprocess STDOUT always empty
20 juillet 2023, par Mohamed Darweshwhy is the log file always empty ?
I'm just trying to capture the "time=" from ffmpeg, but I need to make sure it captures the output first, which it doesn't.


import ffmpeg
import subprocess

input_video = ffmpeg.input("test.mp4") 
audio_stream = input_video.audio
video_stream = input_video.video

output_stream = ffmpeg.output(video_stream, audio_stream, 'test_COMPRESSED.mp4', crf=28, vcodec='libx264', vsync=2)

cmd = ' '.join(ffmpeg.compile(output_stream, overwrite_output=True))
process = subprocess.Popen(
 cmd,
 shell=True,
 stdin=subprocess.PIPE,
 stdout=subprocess.PIPE,
 text=True
)

while process.poll() is None:
 with open('log.txt', 'a') as log_file:
 for line in process.stdout:
 output_line = line.strip()
 log_file.write(output_line + '\n')