
Recherche avancée
Autres articles (13)
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (1334)
-
How to get estimate time in FFmpeg using php ?
4 février 2019, par Pooja JadavI’m using FFmpeg for in my project to overlay a video using php.
I have been included a queue for command execute. So, sometimes many requests in queue, and take a long time to execute.
That’s why, I have to show the progress bar for user identifies, how many time will take for creates it video. For this scenario, I have to take estimate time.
Maybe it’s possible to calculate it by other params that are shown in the output such as fps, bitrate or speed.
Any ideas ?
//DownloadJob.php;
public function __construct($video,$transparent_img,$output_file)
{
$this->video=$video;
$this->transparent_img = $transparent_img;
$this->output_file = $output_file;
$create_at = date('Y-m-d H:i:s');
$this->status =0;
$this->download_id = base64_encode($video);
DB::beginTransaction();
DB::insert('INSERT INTO jobs_download(download_id,image,video,status,output_video,create_time)
VALUES(?,?,?,?,?,?)',[$this->download_id,$this->video,$this->transparent_img,$this->status,$this->output_file,$create_at]);
DB::commit();
}
public function handle()
{
$video=$this->video;
$transparent_img=$this->transparent_img;
$output_file=$this->output_file;
$ready=1;
$failed=2;
$input_video = $video;
$transparent_img = $transparent_img;
try{
$ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
$cmd = $ffmpeg . " -i " . $input_video . " -i " . $transparent_img . " -filter_complex 'overlay' " . $output_file;
//Log::info($cmd);
exec($cmd, $output);
if(file_exists($output_file)){
DB::beginTransaction();
DB::update('UPDATE jobs_download SET status=? WHERE download_id =?',[$ready,$this->download_id]);
$this->status = 1;
DB::commit();
if(file_exists($input_video)){
unlink($input_video);
}
if(file_exists($transparent_img)){
unlink($transparent_img);
}
}else{
Log::error('DownloadJob.php failed()',['download_id'=>$this->download_id]);
DB::beginTransaction();
DB::update('UPDATE jobs_download SET status=? WHERE download_id =? ',[$failed,$this->download_id]);
$this->status = 3;
DB::commit();
}
}catch (\Exception $e){
Log::error('DownloadJob.php failed()',['download_id'=>$this->download_id]);
DB::beginTransaction();
DB::update('UPDATE jobs_download SET status=? WHERE download_id =? ',[$failed,$this->download_id]);
$this->status = 3;
DB::commit();
}
}
public function failed()
{
$failed = 2;
Log::error('DownloadJob.php failed()',['download_id'=>$this->download_id]);
DB::beginTransaction();
DB::update('UPDATE jobs_download SET status=? WHERE download_id =? ',[$failed,$this->download_id]);
$this->status = 3;
DB::commit();
}
public function getResponse()
{
return ['download_id' => $this->download_id,'eta_time_sec' => $eta_time_sec];
}//FFmpegController.php
public function generateVideo(Request $request_body)
{
//Overlay file
$transparent_img=Input::file('transparent_img');
//Main file
$video=Input::file('video');
$output_file = $video_name;
//Send in queue for ffmpeg overlay
$job = new DownloadJob($video_name,$image,$output_file);
$data = $this->dispatch($job);
$dl_url = $job->getResponse();//Get response download_id and estimate time in second
print_r($dl_url);}
Output
I want to this answer in my output result.
[
'download_id':'NWM1ODAwNDU3NzkxOV92aWRlb19maWxlXzE1NDkyNzExMDkubXA0',
'eta_time_sec':5
]How can I get estimation time in seconds from fps, bitrate or speed but I have no clue..
-
Bootstrapping an AI UGC system — video generation is expensive, APIs are limiting, and I need help navigating it all [closed]
24 juin, par Barack _ OumaI’m building a solo AI-powered UGC (User-Generated Content) platform — something that automates the creation of short-form content using AI avatars, voices, visuals, and scripts. But I’ve hit a wall with video generation and API limitations.


So far, I’ve integrated TTS and voice cloning (using ElevenLabs), and I’ve gotten image generation working. But video generation (especially talking avatars) has been a nightmare — both financially and technically.


🛠️ Features I’m trying to build :


AI avatars (face + lip-syncing)
Script generation (LLM-driven)
Image generation
Video composition


I’m trying to build an AI faceless content creation automtion platform alternative to Makeugc.com or Reelfarm.org or postbridge.com — just trying to create a working pipeline for automated content.


❌ Challenges so far :


Services like D-ID, Synthesia, Magic Hour, and Luma are either paywalled, have no trials, or are very expensive.


D-ID does support avatar creation, but you need to pay upfront to even access those features. There's no easy/free entry point.


Tools like Google Veo 3 are powerful but clearly not accessible for indie builders.
I’ve looked into open-source models like WAN 2.1, CogVideo, etc., but I have no clue how to run them or what infra is needed.


Now I’m torn between buying my own GPU or renting compute power to self-host these models.


💸 Cost is a huge blocker


I’ve been looking through Replicate’s pricing, and while some models (especially image gen) are manageable, video models get expensive fast. Even GPU rental rates stack up quickly, especially if you’re testing often or experimenting with pipelines. Plus, idle time billing doesn’t help.


💭 What I could really use help with :


Has anyone successfully stitched together APIs (voice, avatar, video) into a working UGC pipeline ?


Should I use separate services (e.g. ElevenLabs + Synthesia + WAN) or try to host my own end-to-end system ?


Is it cheaper (long term) to buy a used GPU like a 4090 and run things locally ? Or better to rent compute short-term ?


Any open-source solutions that are beginner-friendly or have minimal setup ?
Any existing frameworks or wrappers for UGC media pipelines that make all this easier ?


I’ve spent weeks researching, testing APIs, and hitting walls — and while I’ve learned a lot, I’d really appreciate any guidance from folks who’ve been here before.
Thanks in advance 🙏


And good luck to everyone else trying to build with AI on a budget — this stuff isn’t as plug-and-play as it looks on launch videos 💀


-
How to insert frames to compensate for frames lost during capture
5 novembre 2015, par JMorMy original clip was 22:47 long. I captured the video in avi with Ut Video Lossless Codec at 29.97 fps, with pcm 16 bit unsigned audio.
I am using Virtualdub with VHScrCap driver for capture.
Virtualdub and mpc and potplayer play the captured file apparently too fast, but with the right audio pitch in the first 3-4 min, but high pitch in the rest of the video. The duration is 19:06, shorter than the original 22:47 (confirmed by mediainfo)
The cause of the problem seems to be that I am losing more frames when capturing large HD frames.Regular encoding
Encoding captured clip to mp4 :
ffmpeg -ss 3.25 -i input.avi -map 0:0 -map 0:1 -threads 0 -c:v libx264 -profile:v main \
-preset:v medium -level 3.1 -x264opts crf=26.0 -aspect 16:9 -t 1112.69 \
-y -f mp4 -vf "crop=1432:808:4:46, hqdn3d=1.5:1.5:6:6, \
scale=1216:684, pad=1280:720:32:18" -c:a ac3 -ac 2 -ar 48000 -b:a 160k \
output.mp4The output is 18:32 long, framerate is still 29:97. The audio pitch is OK in the first 2 minutes, and way too high in the rest of the video.
Trying to correct
I try to correct it in three steps by (1) encoding a video stream that is slowed down to 23.976 fps and extracting a wav audio stream, (2) slowing speed and pitch of audio and (3) remuxing video and audio :
(1)ffmpeg -ss 3.25 -i input.avi -threads 0 \
-c:v libx264 -profile:v main -preset:v medium -level 3.1 -x264opts crf=26.0 \
-aspect 16:9 -t 1390.862 -an -y -f mp4 -r 24000/1001 \
-vf "crop=1432:808:4:46, hqdn3d=1.5:1.5:6:6, scale=1216:684, pad=1280:720:32:18, \
setpts=1.25*PTS" video_out.mp4 \
-t 1112.69 -y -vn -f wav audio_out.wav(2) The wav audio stream is then slowed down with lower pitch with sox :
sox --norm audio_out.mp4.wav audio_out-24.wav speed 0.8
(3) The two streams are then remuxed with :
ffmpeg -i video_out.mp4 -i audio_out-24.wav -map 0:0 -map 1:0 -c:v copy \
-c:a ac3 -ac 2 -af aresample=resampler=soxr -ar 48000 -b:a 160k \
final_output.mp4This time, the video duration (23:10) is closer to the original, the pitch is OK for the whole video except for the first 2-3 minutes, where it is (predictably) too low.
I have a sense that (1) the capture log, and ffprobe give the frame by frame information that show what is the ’instantaneous’ real frame rate, and (2) that information is not used by ffmpeg encoding, but presumably could be used to correct the frame rate by inserting duplicate or interpolated frames to restitute the correct frame rate. I suspect I could get the information from (1), but have no clue how to do (2).
If someone familiar with this type of issue could give me some advice, and point me in the right direction, I would really appreciate.