
Recherche avancée
Autres articles (22)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (6901)
-
moviepy write_videofile giving error on remote host
30 juillet 2021, par HadiH2oI'm trying to put a logo on a video using the moviepy module
This module works properly on my PC(windows) but gives an error when I run the following code on the remote host I bought(linux).


code :


import random
import moviepy.editor as mp
import requests


def video_watermark(url):
 corners = [("right", "top"), ("left", "top"), ("right", "bottom"), ("left", "bottom")]
 response = requests.get(url)
 with open("media/videos/raw_video.mp4", "wb") as file:
 file.write(response.content)

 video = mp.VideoFileClip("./media/videos/raw_video.mp4")

 logo = (mp.ImageClip("./media/bold_logo.png")
 .set_duration(video.duration)
 .resize(height=50) # if you need to resize...
 .margin(right=8, top=8, opacity=0) # (optional) logo-border padding
 .set_pos(random.choice(corners)))

 final = mp.CompositeVideoClip([video, logo])
 final.write_videofile("./media/videos/ready_video.mp4")

video_watermark("url")



error :


OSError: [Errno 32] Broken pipe
 
MoviePy error: FFMPEG encountered the following error while writing
file ./media/videos/ready_video.mp4:
 
b'Error initializing output stream 0:0 -- Error while opening encoder
for output stream #0:0 - maybe incorrect parameters such as bit_rate,
rate, width or height\n'



please help me to fix this problem


-
configure : arm : Don't add -march= to the compiler if no preference was passed
20 septembre 2021, par Martin Storsjöconfigure : arm : Don't add -march= to the compiler if no preference was passed
If no —cpu= option was passed to configure, we detect what the
compiler defaults to. This detected value was then fed back to the
rest of the configure logic, as if it was an explicit choice.This breaks on Ubuntu 21.10 with GCC 11.1.
Since GCC 8, it's possible to add configure extra features via the
march option, like e.g. -march=armv7-a+neon. If the -mfpu= option
is configured to default to 'auto', the fpu setting gets taken
from the -march option.GCC 11.1 in Ubuntu seems to be configured to use -mfpu=auto. This
has the effect of breaking any compilation command that specifiesmarch=armv7-a, because the driver implicitly also adds -mfloat-abi=hard,
and that combination results in this error :cc1 : error : ‘-mfloat-abi=hard’ : selected processor lacks an FPU
One can compile successfully by passing e.g. -march=armv7-a+fp.
Therefore, restructure configure. If no specific preference was set
(and the 'cpu' configure variable was set as the output of
probe_arm_arch), the value we tried to set via -march= was the same
value that we just tried to detect as the compiler default.So instead, just try to detect what the compiler defaults to, with
to allow setting other configure settings (such as 'fast_unaligned'),
but don't try to spell out the compiler's default via the -march flag.Signed-off-by : Martin Storsjö <martin@martin.st>
-
FFMpeg - Is it difficultt to use
13 juillet 2015, par user1861447I am trying to use ffmpeg, and have been doing a lot of experiment last 1 month.
I have not been able to get through. Is it really difficult to use FFmpeg ?My requirement is simple as below.
Can you please guide me if ffmpeg is suitable one or I have implement on my own (using codec libs available).- I have a webm file (having VP8 and OPUS frames)
- I will read the encoded data and send it to remote guy
- The remote guy will read the encoded data from socket
- The remote guy will write it to a file (can we avoid decoding).
- Then remote guy should be able to pay the file using ffplay or any player.
Now I will take a specific example.
-
Say I have a file small.webm, containing VP8 and OPUS frames.
-
I am reading only audio frames (OPUS) using av_read_frame api (Then checks stream index and filters audio frames only)
-
So now I have data buffer (encoded) as packet.data and encoded data buffer size as packet.size (Please correct me if wrong)
-
Here is my first doubt, everytime audio packet size is not same, why the difference. Sometimes packet size is as low as 54 bytes and sometimes it is 420 bytes. For OPUS will frame size vary from time to time ?
-
Next say somehow extract a single frame (really do not know how to extract a single frame) from packet and send it to remote guy.
-
Now remote guy need to write the buffer to a file. To write the file we can use av_interleaved_write_frame or av_write_frame api. Both of them takes AVPacket as argument. Now I can have a AVPacket, set its data and size member. Then I can call av_write_frame api. But that does not work. Reason may be one should set other members in packet like ts, dts, pts etc. But I do not have such informations to set.
Can somebody help me to learn if FFmpeg is the right choice, or should I write a custom logic like parse a opus file and get frame by frame.