
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (102)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
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 (12815)
-
Unable to find a suitable output format for 'is' is : Invalid argument in fmmpeg
26 janvier 2023, par Test000I want to make a python script to make a video in FFmpeg. I try a lot of solutions for example but I do not know Why I do not have permission to write. I have not any idea because ffmpeg errors are a little bit tricky


my code :


import os
import cv2

def calculate_quote_position(quote, max_length, video_width, video_height):
 if len(quote) > max_length:
 print("Quote is too long for the video.")
 return
 
 # Determine font size and alignment
 font = cv2.FONT_HERSHEY_SIMPLEX
 font_scale = 1.0
 thickness = 2
 (text_width, text_height), _ = cv2.getTextSize(quote, font, font_scale, thickness)
 
 # Calculate position for the quote
 x = int((video_width - text_width) / 2)
 y = int((video_height + text_height) / 2)
 
 return (x, y, text_width, text_height)

def create_video_from_audio_quote_picture(music_file, quote, font, font_size, font_color, background_picture, output_file, video_duration, video_width, video_height, max_length):
 quote_position = calculate_quote_position(quote, max_length, video_width, video_height)
 if not quote_position:
 print("The quote is too long for the video.")
 return
 # Create the FFmpeg command
 command = f"ffmpeg -loop 1 -t {video_duration} -i {background_picture} -i {music_file} -vf drawtext='fontfile={font}':text={quote}:fontcolor={font_color}:fontsize={font_size}:x={quote_position[0]}:y={quote_position[1]}' -shortest -c:v libx264 -c:a aac {output_file}"

 # Execute the command
 os.system(command)

music_file = "music.mp3"
quote = "This is a quote"
font = "Raleway-Bold.ttf"
font_size = 20
font_color = "white"
background_picture = "nature.png"
output_file = r"C:\Users\Lukas\Dokumenty\python_scripts\Billionare livestyle\output.mp4"
video_duration = 30
video_width = 1920
video_height = 1080
max_length = 30

create_video_from_audio_quote_picture(music_file, quote, font, font_size, font_color, background_picture, output_file, video_duration, video_width, video_height, max_length)



my error :


Input #0, image2, from 'nature.png':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 569438 kb/s
 Stream #0:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, mp3, from 'music.mp3':
 Metadata:
 date : 2020:12:15 01:00:00
 title : Otnicka - Peaky Blinder (lyrics) | i am not outsider i'm a peaky blinder
 artist : Jigzaw
 encoder : Lavf58.29.100
 Duration: 00:02:31.78, start: 0.023021, bitrate: 128 kb/s
 Stream #1:0: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavf
 Stream #1:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 320x240 [SAR 1:1 DAR 4:3], 90k tbr, 90k tbn, 90k tbc (attached pic)
 Metadata:
 comment : Other
[NULL @ 000001575c0b0100] Unable to find a suitable output format for 'is'
is: Invalid argument



-
drawbox around text with dynamic height in ffmpeg
9 mars 2018, par Anuj TBEI’m working on a ffmpeg script to draw text over image/video.
The text will be wrapped inside a box with full width and dynamic height.
I have tried two approach to achieve this.
1. using
drawbox
ffmpeg \
-loop 1 -i /path_to_file/file.jpg \
-t 5 -vf
"scale=320:320,\
drawbox=y=0\
:color=#00FF29\
:width=iw\
:height=72\
:t=max,\
drawtext=text=TBE\
:fontcolor=#F71DFF\
:fontsize=82:x=(w-text_w)/2\
:y=text_h/2"
/path_to_file/new_file.mp4 -yWhich renders following three examples with different value of
fontsize
2. using
box
ofdrawtext
ffmpeg -i in3.png -t 5 -vf drawtext=" \
text='Stack Overflow': fontcolor=white: fontsize=54: box=1: boxcolor=black@0.5: \
boxborderw=10: x=(w-text_w)/2: y=(h-text_h)/2" -codec:a copy output_new.mp4Half of the requirement is being fullfiled by drawbox (full width box) and half using drawtext box (box height according to text).
How can I achieve both (full box width with dynamic height according to height of text) in ffmpeg ?
-
Merge commit ’a6653787a4b1e89170ff7962312dd110769c83a3’
3 février 2015, par Michael NiedermayerMerge commit ’a6653787a4b1e89170ff7962312dd110769c83a3’
* commit ’a6653787a4b1e89170ff7962312dd110769c83a3’ :
libopencv : Check kernel_str life cycleConflicts :
libavfilter/vf_libopencv.cSee : f16a6f667c993a158643b52815ec42961508b0a9
Merged-by : Michael Niedermayer <michaelni@gmx.at>