
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (104)
-
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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (4715)
-
Muxer does not support non seekable output. Could not write header for output file #0
1er janvier 2023, par artenson.art98I'm using ffmpeg in an Android application, and for some files I get this error :




muxer does not support non seekable output
Could not write header for output file #0 (incorrect codec parameters ?) : Invalid argumentError initializing output stream 0:0 — [AVIOContext @ 0xb4000071b42cd7c0] Statistics : 0 bytes written, 0 seeks, 0 writeouts[aac @ 0xb4000070f28d7400] Qavg : 65536.000[aac @ 0xb4000070f28d7400] 2 frames left in the queue on closing[AVIOContext @ 0xb400007126c5e4c0] Statistics : 403202761 bytes read, 1 seeks
Conversion failed !




The information for the input file as fetched from FFprobe is attached below along with the output logs & command. Please help me with this issue. I'm unable to try anything since I'm not sure about the cause of the issue.
Thanks in advance.


Command


-y -i input.mp4 -vcodec libx264 -crf 27 -filter:v scale=640:-2 -preset veryfast -c:a aac output.mp4


Input file info :


{
 "streams":[
 {
 "index":0,
 "codec_name":"h264",
 "codec_long_name":"unknown",
 "profile":"100",
 "codec_type":"video",
 "codec_tag_string":"avc1",
 "codec_tag":"0x31637661",
 "width":640,
 "height":360,
 "coded_width":640,
 "coded_height":360,
 "closed_captions":0,
 "film_grain":0,
 "has_b_frames":2,
 "sample_aspect_ratio":"1:1",
 "display_aspect_ratio":"16:9",
 "pix_fmt":"yuv420p",
 "level":31,
 "chroma_location":"left",
 "field_order":"progressive",
 "refs":1,
 "is_avc":"true",
 "nal_length_size":"4",
 "id":"0x1",
 "r_frame_rate":"30000\/1001",
 "avg_frame_rate":"276451589\/9224496",
 "time_base":"1\/90000",
 "start_pts":0,
 "start_time":"0.000000",
 "duration_ts":607533927,
 "duration":"6750.376967",
 "bit_rate":"372641",
 "bits_per_raw_sample":"8",
 "nb_frames":"202304",
 "extradata_size":47,
 "disposition":{
 "default":1,
 "dub":0,
 "original":0,
 "comment":0,
 "lyrics":0,
 "karaoke":0,
 "forced":0,
 "hearing_impaired":0,
 "visual_impaired":0,
 "clean_effects":0,
 "attached_pic":0,
 "timed_thumbnails":0,
 "captions":0,
 "descriptions":0,
 "metadata":0,
 "dependent":0,
 "still_image":0
 },
 "tags":{
 "language":"und",
 "handler_name":"VideoHandler",
 "vendor_id":"[0][0][0][0]"
 }
 },
 {
 "index":1,
 "codec_name":"aac",
 "codec_long_name":"unknown",
 "profile":"1",
 "codec_type":"audio",
 "codec_tag_string":"mp4a",
 "codec_tag":"0x6134706d",
 "sample_fmt":"fltp",
 "sample_rate":"48000",
 "channels":2,
 "channel_layout":"stereo",
 "bits_per_sample":0,
 "id":"0x2",
 "r_frame_rate":"0\/0",
 "avg_frame_rate":"0\/0",
 "time_base":"1\/48000",
 "start_pts":0,
 "start_time":"0.000000",
 "duration_ts":324014080,
 "duration":"6750.293333",
 "bit_rate":"96352",
 "nb_frames":"316420",
 "extradata_size":2,
 "disposition":{
 "default":1,
 "dub":0,
 "original":0,
 "comment":0,
 "lyrics":0,
 "karaoke":0,
 "forced":0,
 "hearing_impaired":0,
 "visual_impaired":0,
 "clean_effects":0,
 "attached_pic":0,
 "timed_thumbnails":0,
 "captions":0,
 "descriptions":0,
 "metadata":0,
 "dependent":0,
 "still_image":0
 },
 "tags":{
 "language":"und",
 "handler_name":"SoundHandler",
 "vendor_id":"[0][0][0][0]"
 }
 }
 ],
 "chapters":[
 
 ],
 "format":{
 "filename":"input.mp4",
 "nb_streams":2,
 "nb_programs":0,
 "format_name":"mov,mp4,m4a,3gp,3g2,mj2",
 "start_time":"0.000000",
 "duration":"6750.377000",
 "size":"403137225",
 "bit_rate":"477765",
 "probe_score":100,
 "tags":{
 "major_brand":"isom",
 "minor_version":"512",
 "compatible_brands":"isomiso2avc1mp41",
 "encoder":"Lavf59.30.101"
 }
 }
}





-
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



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