
Recherche avancée
Autres articles (29)
-
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (4603)
-
fmpeg piped output is always providing an empty frame
10 juin 2024, par sar5050I am trying to capture a webcam using the ffmpeg command in a Python script and process the frame for my work. For my work, I need to capture and forward through the pipe to my function, but I always get an empty frame. I tried many SO solutions, but they are not helping.


ffmpeg_command = 'ffmpeg -f v4l2 -framerate 25 -video_size 960x540
 -pix_fmt yuyv422 -i /dev/video0 \
 -f rawvideo \
 -pix_fmt yuyv422 \
 pipe:'

 pro = subprocess.Popen(ffmpeg_command.split(),stdout=subprocess.PIPE,shell=True)
 
 while True:
 raw_frame = pro.stdout.read(960*540*3) #i tried all possible values here
 frame = np.frombuffer(raw_frame,dtype=np.uint8)
 frame = frame.reshape((960,540, 3)) # getting error here as empty 



I am not sure what mistake I am making.


Any help is appreciated.


-
Error initializing ffmpeg complex filters. Invalid argument
17 mai 2020, par Hardik Gupta[AVFilterGraph @ 00000154daaed200] No such filter: '[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]'
Error initializing complex filters.
Invalid argument




Is the error while running the following lines :



def run_left_right(lr_vid, hr_vid, output_vid):

 command = "ffmpeg -y -i {0} -vf scale=480:852 output.mp4".format(lr_vid)
 subprocess.run(command, shell=True)

 command = "ffmpeg -y -i output.mp4 -i {1} -filter_complex '[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]' \
 -map [vid] -c:v libx264 -crf 23 -preset veryfast {2}".format(lr_vid, hr_vid, output_vid)




What can I do to debug this ?


-
ffmpeg errors in the daemon
3 octobre 2020, par smoto_sheiI created a shell script to compress a video using ffmpeg(4.3.1).


ffmpeg -y -i \
 '/var/www/System/Backend/Outputs/TempSaveMovie/200703_4_short_5fr_p2(100_20)_r(50_20).mp4' \
 -vcodec h264 -an \
 '/var/www/System/Backend/Outputs/MovieOutputs/200703_4_short_5fr_p2(100_20)_r(50_20).mp4'




If you run this code from the console, it will run without problems.
In fact, we're using the python
subscript.call()
to execute it. It works fine too.

cmd = 'sh /var/www/System/Backend/cv2toffmpeg.sh'
subprocess.call(cmd, shell=True)



Secondly, if I run it from a daemonized python program, I'll get an error. I get the following error.
You'll get an error like this


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Outputs/TempSaveMovie/200703_4_short_5fr_p2(100_20)_r(50_20).mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf58.35.100
 Duration: 00:00:06.15, start: 0.000000, bitrate: 10246 kb/s
 Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 10244 kb/s, 13 fps, 13 tbr, 13312 tbn, 13 tbc (default)
 Metadata:
 handler_name : VideoHandler
Stream mapping:
 Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[mpeg4 @ 0x55cec17c5480] header damaged
[mpeg4 @ 0x55cec17c6840] header damaged
[mpeg4 @ 0x55cec1855f80] header damaged
[mpeg4 @ 0x55cec1866e00] header damaged
Output #0, mp4, to './Outputs/MovieOutputs/200703_4_short_5fr_p2(100_20)_r(50_20).mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf58.45.100
 Stream #0:0(und): Video: h264 (h264_nvenc) (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 13 fps, 13312 tbn, 13 tbc (default)
 Metadata:
 handler_name : VideoHandler
 encoder : Lavc58.91.100 h264_nvenc
 Side data:
 cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A
Error while decoding stream #0:0: Invalid data found when processing input
[mpeg4 @ 0x55cec17c8780] header damaged
Error while decoding stream #0:0: Invalid data found when processing input
[mpeg4 @ 0x55cec17c5480] header damaged



I think the problem is when you run it from a daemonized process. There seems to be a similar problem in the past.
Ffmpeg does not properly convert videos when run as daemon
I would like to ask for your help to solve this problem. Thank you for your help from Japan.