
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (97)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)
Sur d’autres sites (7756)
-
Revision 33563 : spanish language file. May be we should use Salvatore, right ?
7 décembre 2009, par gaitan@… — Logspanish language file. May be we should use Salvatore, right ?
-
Can't import to Unity video clip rendered using FFmpeg for Unity
29 juin 2023, par Maximiliano BezmalinovicI am using FFmpeg to render a video in Unity. For the FFmpegCaptureCommand.OutputOptions I'm using this command :


-g 24 -c:v h264 -preset medium -crf 32 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range pc -f mov -movflags frag_keyframe+empty_moov -vf setpts=2*PTS



The video output plays fine on windows media player or VLC but when I try to import the clip into Unity I get the following error :


WindowsVideoMedia error 0xc00d36e6 while reading C:/.../d.mov

Context: Getting duration.
Error details: The requested attribute was not found.
Track types:
 Video Track [1024 x 1024], type: H264



I can create a working copy of the video with this command :


ffmpeg -i input.mov output.mov



I assume ffmpeg creates a new container for the video when it copies it but I can't figure out why is not doing it in the first place.


Using ffprobe


ffprobe -show_streams -select_streams v C:\...\d.mov 



I get this info on the original video :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\...\d.mov':
 Metadata:
 major_brand : qt
 minor_version : 512
 compatible_brands: qt
 encoder : Lavf59.4.101
 Duration: 00:00:02.97, start: 0.066667, bitrate: 2471 kb/s
 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1024x1024, 2465 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : FFMP
 encoder : Lavc59.4.100 libx264
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_tag_string=avc1
codec_tag=0x31637661
width=1024
height=1024
coded_width=1024
coded_height=1024
closed_captions=0
has_b_frames=2
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj420p
level=32
color_range=pc
color_space=bt709
color_transfer=bt709
color_primaries=bt709
chroma_location=left
field_order=unknown
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30/1
avg_frame_rate=30/1
time_base=1/15360
start_pts=1024
start_time=0.066667
duration_ts=45568
duration=2.966667
bit_rate=2465649
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:handler_name=VideoHandler
TAG:vendor_id=FFMP
TAG:encoder=Lavc59.4.100 libx264
[/STREAM]



and this on the copied video :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\...\d1.mov':
 Metadata:
 major_brand : qt
 minor_version : 512
 compatible_brands: qt
 encoder : Lavf59.4.101
 Duration: 00:00:02.97, start: 0.000000, bitrate: 2869 kb/s
 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1024x1024, 2865 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : FFMP
 encoder : Lavc59.4.100 libx264
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_tag_string=avc1
codec_tag=0x31637661
width=1024
height=1024
coded_width=1024
coded_height=1024
closed_captions=0
has_b_frames=2
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj420p
level=32
color_range=pc
color_space=bt709
color_transfer=bt709
color_primaries=bt709
chroma_location=left
field_order=unknown
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30/1
avg_frame_rate=30/1
time_base=1/15360
start_pts=0
start_time=0.000000
duration_ts=45568
duration=2.966667
bit_rate=2865152
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=89
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:handler_name=VideoHandler
TAG:vendor_id=FFMP
TAG:encoder=Lavc59.4.100 libx264
[/STREAM]



I noticed the
start_time
is 0.000000 on the copied video but the original is 0.066667, I wonder if that has anything to do with it.

If I look at the video properties/details the "Length" attribute is missing on the original video but exists in the copy. Does Unity need that info maybe ?


What am I missing here ? How could I make my original command output a video with the proper data that Unity needs for importing it ?.


Thanks in advance.


-
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