
Recherche avancée
Autres articles (45)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (6357)
-
ffmpeg itsoffset doesnt apply offset to mp4
26 juillet 2019, par bruxThe following command mixes an mp4 and an mp3 together, keeping the audio from the mp4.
ffmpeg -i video.mp4 -i audio.mp3 -map 0:v -c:v copy -filter_complex '[0:a][1:a]amix[aout]' -map '[aout]' -shortest out.mp4
The command works as expected.
Now I want to offset the mp4 file (both the audio and video stream of the mp4) so that there is a delay of 500ms at the start of the mp4, here is my command :
ffmpeg -itsoffset 00:00:00.500 -i video.mp4 -i audio.mp3 -map 0:v -c:v copy -filter_complex '[0:a][1:a]amix[aout]' -map '[aout]' -shortest out.mp4
This doesnt work as expected, the output doesnt have the expected delay of 500ms at the start of the mp4 streams. It appears the output is just the same as the first command I ran.
The version of ffmpeg I am using is :
ffmpeg version n4.0-39-gda39990
Here are the files I’m using :
video.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/video.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2019-07-26T03:28:49.000000Z
com.android.version: 8.0.0
Duration: 00:00:07.64, start: 0.000000, bitrate: 20534 kb/s
Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuvj420p(pc, smpte170m), 1920x1080, 20966 kb/s, SAR 1:1 DAR 16:9, 29.70 fps, 29.75 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 270
creation_time : 2019-07-26T03:28:49.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of 90.00 degrees
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 96 kb/s (default)
Metadata:
creation_time : 2019-07-26T03:28:49.000000Z
handler_name : SoundHandleaudio.mp3
Input #0, mp3, from '/storage/emulated/0/audio.mp3':
Metadata:
album : Sunflower (Spider-Man: Into the Spider-Verse) - Single
composer : Louis Bell, Carter Lang, Austin Richard Post, Billy Walsh & Khalif Malik Ibin Shaman Brown
genre : Hip-Hop/Rap
copyright : This Compilation ℗ 2018 Republic Records, a division of UMG Recordings, Inc.
title : Sunflower (Spider-Man: Into the Spider-Verse)
artist : Post Malone & Swae Lee
album_artist : Post Malone & Swae Lee
track : 01/01
TYER : 2018-10-18T07:00:00Z
Duration: 00:02:38.07, start: 0.000000, bitrate: 325 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1400x1400 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Cover (front) -
Segmenting a video and adding text that differs in each segment [FFMPEG]
31 octobre 2023, par Kal-TohI have a folder full of videos I want to segment, resize and add text to. So far I've managed to segment and resize them.


I'm trying to add text in a TikTok Style : [Kind of like][1] this but black text in a white background. (If that isn't possible, I'd be fine with just white text).


I already have the font file(.oft file type, is that ok or does it need to be .ttf ?)
The video is being converted to 720x1280 (9:16) and I'd like the text to display at the top centre of the video, taking up roughly the top 25%.


Further to this, and this is where I'm having trouble understanding the process :


I'd like text at the bottom of the video in the same style, that would change each segment.


For example :


I have a 10 minute long video. I want to split this video into 60 second segments. Each segment will have a title (the same across each segment) and a sub title at the bottom that would differ for each segment (for example 'Part 1/10', 'Part 2/10' etc)


I know I could run one command to segment each video, add the title and change the aspect ratio and a second command to add the bottom text, feeding in a variable based on the number of mp4 files in the folder, however that doesn't seem like the most efficient process. Is there a way to do this all in one command ?


This is the command I'm using so far :


ffmpeg_command = [
 'ffmpeg',
 '-i', os.path.join(input_folder, video_file),
 '-vf', f'scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2
 ,drawtext=text=\'{text}\':x=(w-tw)/2:y=(h/4)-th:fontsize=24:fontfile={font_path}:fontcolor=black:box=1:boxcolor=white',
 '-threads', '100',
 "-c:a", "copy",
 '-t', str(duration),
 '-segment_time', '160', # 3 minutes
 '-reset_timestamps', '1',
 '-f', 'segment',
 os.path.join(output_subfolder, f'{video_name}_%03d.mp4')
 ]



Although not styled the way I want it to be, it's a decent start and all else works fine.


It's just the bottom text I can't figure.
[1] : https://i.insider.com/61aa608a983f360019c854a5?width=1300&format=jpeg&auto=webp


-
Revision 30244 : On mets à jour le script d’encodage pour tester l’encodage multiple (plus ...
26 juillet 2009, par kent1@… — LogOn mets à jour le script d’encodage pour tester l’encodage multiple (plus uniquement en flv)