
Recherche avancée
Autres articles (73)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (10914)
-
How to determine the proper HTML5 video codec attribute for an AV1 file based on the FFMpeg encoding command or output ?
20 décembre 2020, par SlboxWe have some files encoded in AV1, but we recently noticed that Chrome mobile fails to play the files - but it doesn't fall back to an encoding it can use - it just puts the unplayable AV1 file in there. I'm hoping that if we add a codec attribute we can remedy this - but I'm not sure how to determine the codec for these AV1 files.


I've come across this documentation on MDN, but I'm not sure how I would determine the proper codec from that. It starts off simple enough, but some of the values further down, I have no idea what the right value would be.


Opening the file in VLC player only shows this very limited information about the codec :




The output of MediaInfo is :


General
Complete name : demo-av1.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/mp41)
File size : 291 KiB
Duration : 1 min 40 s
Overall bit rate : 23.7 kb/s
Writing application : Lavf58.43.100

Video
ID : 1
Format : AV1
Format/Info : AOMedia Video 1
Format profile : High@L3.0
Codec ID : av01
Duration : 1 min 40 s
Bit rate : 22.9 kb/s
Width : 984 pixels
Height : 670 pixels
Display aspect ratio : 3:2
Frame rate mode : Constant / Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:4:4
Bit depth : 8 bits
Scan type : Progressive / Progressive
Bits/(Pixel*Frame) : 0.001
Stream size : 281 KiB (96%)
Color range : Limited
Codec configuration box : av1C / av1C



The command to create the files and the output of FFMpeg is like so :



ffmpeg -y -i "D:\RAW VIDEO\Demos\demo.avi" -ss 00:00:00 -c:v libaom-av1 -pix_fmt yuv444p -minrate 500 -b:v 48k -maxrate 1000k -strict experimental -movflags +faststart -f mp4 NUL && ffmpeg -y -i "D:\RAW VIDEO\Demos\demo.avi" -ss 00:00:00 -c:v libaom-av1 -pix_fmt yuv444p -minrate 500 -b:v 48k -maxrate 1000k -strict experimental -movflags +faststart -pass 2 "D:\RAW VIDEO\Demos\converted\demo-av1.mp4"
ffmpeg version git-2020-05-22-38490cb Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200513

 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 46.100 / 56. 46.100
 libavcodec 58. 86.101 / 58. 86.101
 libavformat 58. 43.100 / 58. 43.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 82.100 / 7. 82.100
 libswscale 5. 6.101 / 5. 6.101
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100

Input #0, avi, from 'D:\RAW VIDEO\Demos\demo.avi':
 Metadata:
 encoder : Lavf58.29.100
 Duration:
00:00:23.43, start: 0.000000, bitrate: 19719 kb/s
 Stream #0:0: Video: huffyuv (HFYU / 0x55594648), bgr0, 420x240, 19739 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc

Stream mapping:
 Stream #0:0 -> #0:0 (huffyuv (native) -> av1 (libaom-av1))

Press [q] to stop, [?] for help

[libaom-av1 @ 00000000003fb3c0] v1.0.0

Output #0, mp4, to 'NUL':
 Metadata:
 encoder : Lavf58.43.100

 Stream #0:0: Video: av1 (libaom-av1) (av01 / 0x31307661), yuv444p, 420x240, q=-1--1, 48 kb/s, 30 fps, 15360 tbn, 30 tbc
 Metadata:
 encoder : Lavc58.86.101 libaom-av1
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A





-
AttributeError : 'FFmpegPCMAudio' object has no attribute '_process'
16 septembre 2021, par Sujal MotagiI'm trying to make a discord music bot and this is my play function :


async def play(self, ctx, url):
 ctx.voice_client.stop()
 FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'option': '-vn'}
 YDL_OPTIONS = {'format': 'bestaudio'}

 voice = ctx.voice_client
 with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
 info = ydl.extract_info(url, download=False)
 url2 = info['formats'][0]['url']

 voice.play(discord.FFmpegPCMAudio(url2, **FFMPEG_OPTIONS))



But when I run the code I get the following error :


[youtube] MbhXIddT2YY: Downloading webpage
Exception ignored in: <function at="at" 0x7f1fca7373a0="0x7f1fca7373a0">
Traceback (most recent call last):
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/player.py", line 103, in __del__
 self.cleanup()
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/player.py", line 154, in cleanup
 proc = self._process
AttributeError: 'FFmpegPCMAudio' object has no attribute '_process'
Ignoring exception in command play:
Traceback (most recent call last):
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
 ret = await coro(*args, **kwargs)
 File "/home/runner/Myoojic-Baat/music.py", line 42, in play
 voice.play(discord.FFmpegPCMAudio(url2, **FFMPEG_OPTIONS))
TypeError: __init__() got an unexpected keyword argument 'option'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
 await ctx.command.invoke(ctx)
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
 await injected(*ctx.args, **ctx.kwargs)
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
 raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: __init__() got an unexpected keyword argument 'option'
</function>


I found a related post with a similar error : AttributeError : ’FFmpegPCMAudio’ object has no attribute ’start’
But the solution there did not fix my problem.


-
MoviePy and FFMPEG "No attribute" errors
22 mars 2023, par CypherTretiiI am trying to create a python script that will produce the type of cartoon TikToks with the satisfying video on the bottom part. I am still getting a bunch of errors like "ffmpeg has no attribute "metadata", or some other atribute that is missing"


import os
import random
import hashlib
from moviepy.editor import *

# Function to get MD5 hash of a file
def get_md5_hash(file_path):
 with open(file_path, "rb") as f:
 bytes = f.read()
 hash = hashlib.md5(bytes)
 return hash.hexdigest()

# Input video file path
input_file_path = "C:/Users/Kris/output_movies/Bojack.Horseman.S01E01.720p.WEBRip.x264-W4F_1.mp4"

# Re-render the video
video = VideoFileClip(input_file_path)
video.write_videofile("re_rendered_video.mp4", codec='libx264')

# Change MD5 hash
new_md5_hash = get_md5_hash("re_rendered_video.mp4")
os.rename("re_rendered_video.mp4", f"{new_md5_hash}.mp4")

# Clear ID3 tag metadata
video = VideoFileClip(f"{new_md5_hash}.mp4")
video.reader.metadata.clear()
video.reader.close()

# Choose random video from folder and combine with input video
random_video_path = random.choice(os.listdir("C:/Users/Kris/satisfying_vids"))
random_video = VideoFileClip(f"C:/Users/Kris/satisfying_vids/{random_video_path}")

# Ensure the bottom video is at least as long as the input video
while random_video.duration < video.duration:
 if random_video.duration * 2 <= video.duration:
 random_video = concatenate_videoclips([random_video, random_video])
 else:
 duration_diff = video.duration - random_video.duration
 looped_video = random_video.subclip(0, duration_diff)
 random_video = concatenate_videoclips([random_video, looped_video])

# If the concatenated video exceeds the length of the input video, trim it
if random_video.duration > video.duration:
 random_video = random_video.subclip(0, video.duration)

# Resize the bottom video to match the input video resolution
random_video_resized = random_video.resize((960, 540))

# Combine the videos in 1:1 aspect ratio with the bottom video at the bottom of the screen
final_video = clips_array([[video], [random_video_resized]])

# Save the final video with .mp4 format
final_video.write_videofile(f"{new_md5_hash}_combined.mp4", codec='libx264')


# Increase brightness and contrast
final_video = VideoFileClip(f"{new_md5_hash}_combined.mp4")
final_video = final_video.fx(vfx.colorx, 0, [random.uniform(-0.2, 0.2), random.uniform(-1, 1)])
final_video.write_videofile(f"{new_md5_hash}_processed.mp4", codec='libx264')

# Color one pixel black and crop one pixel from bottom right corner
final_video = VideoFileClip(f"{new_md5_hash}_processed.mp4")
final_video = final_video.fx(vfx.painting, paint_color=[0,0,0], width=1, height=1, x=0, y=0)
final_video = final_video.crop(x1=0, y1=0, x2=final_video.w-1, y2=final_video.h-1)
final_video.write_videofile(f"{new_md5_hash}_final.mp4", codec='libx264')




the goal for the code is :


Takes an .mp4 file as input (the file is 1920 x 1080 in terms of resolution)


Re-renders the video


Changes the MD5 Hash


Clears ID3 Tag Metadata


Choses another random video from a folder, that is 1920 x 1080 pixels in terms of resolution - combine the chosen video with the input video in 1:1 aspect ratio. Put the video that is randomly chosen from the folder on bottom side of the screen.


Increase the video’s brightness by random number ranging from -0.2 to 0.2


Increase contrast by random number ranging from -1 to 1


Color one pixel black


Crop 1 pixel from the down right angle


Save the final video with .mp4 format


This is the error I am getting when running my code :
AttributeError : 'FFMPEG_VideoReader' object has no attribute 'metadata'


Along with various missing attributes.