
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (102)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 -
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 (...)
Sur d’autres sites (13357)
-
Reading video frame by frame using php, ffmpeg and proc_open
29 avril 2020, par TomI want to use proc_open to read every frame from a video using ffmpeg and then use PHP to do something with the frames.
Here's the example that does the opposite- it sends frame by frame from PHP to ffmpeg :



$descriptors = array(
 0 => array("pipe", "r"),

 1 => array("pipe", "w"), 
 2 => array("file", "C:/error-output.txt", "a") 
);

$frames = glob('Q:/images/*.jpg');


$command = "ffmpeg -f image2pipe -pix_fmt rgb24 -framerate 10 -c:v mjpeg -i - ".
 "-r 10 -vcodec libx264 -pix_fmt yuv420p -preset faster -crf 17 ".
 "-y test.mp4";

$ffmpeg = proc_open($command, $descriptors, $pipes);

if (!is_resource($ffmpeg))
{
 die('Could not run ffmpeg');

}

foreach ($frames AS $frame)
{

 fwrite($pipes[0], file_get_contents($frame) );
}

fclose($pipes[0]);




And here's how I am trying but can't get it right :



$descriptors = array(
 0 => array("pipe", "r"),

 1 => array("pipe", "w"), write to
 2 => array("file", "C:/error-output.txt", "a") 
);


$command = "ffmpeg -i 1.gif -ss 00:00:3 -s 650x390 -vframes 100 -c:v png -f image2pipe -";

$ffmpeg = proc_open($command, $descriptors, $pipes);

if (!is_resource($ffmpeg))
{
 die('Could not run ffmpeg');

}

while (!feof($pipes[1]))
{
 $frame = fread($pipes[1], 5000);
}

fclose($pipes[1]);




The biggest issue is I don't know how much data to read from ffmpeg to get a whole frame.


-
FFmpeg Muxing binary data with video into MPEG-TS stream
22 avril 2020, par diogoaosI'm trying to create a MPEG-TS stream with FFmpeg. I feed FFmpeg video form a file and binary data from a UDP stream.



ffmpeg -re -i video.mp4 \
 -f data -i udp://localhost:5000 \
 -map 0:0 -map 0:1 -map 1:0 -codec copy \
 -f mpegts test.ts




I use socat to connect to FFmpeg and type random data :



socat udp:localhost:5000 -




When I try to demux the data channel (channel 2 is for data), it's empty :



ffmpeg -i test.ts -map 0:2 -c:d copy -f data -




I've also tried doing this feeding directly text files and that works fine (I can demux the data stream from the resulting .ts file and it's equal). I've also tried using named pipes connected to a Python script, but that didn't work well (FFmpeg seems to wait for an EOF and than does not keep reading the named pipe).



How do I mux video and binary data from different sources into a single MPEG Transport Stream ?


-
FFMPEG - local video to UDP streaming to OpenCV - video quality degraded
6 juin 2021, par user3925023my goal is to re-stream local video content / desktop screencasting, to an UDP flow that I need to process on a Python script.



Here is the FFMPEG script that I'm using :



ffmpeg -re -i C:\Users\test\Downloads\out.ts -strict -2 -c:v copy -an -preset slower -tune stillimage -b 11200k -f rawvideo udp://127.0.0.1:5000




And here is the simple Python script supposed to read the stream flow :



import cv2

cap = cv2.VideoCapture('udp://127.0.0.1:5000',cv2.CAP_FFMPEG)
if not cap.isOpened():
 print('VideoCapture not opened')
 exit(-1)
width = cap.get(cv2.CAP_PROP_FRAME_WIDTH) # float
height = cap.get(cv2.CAP_PROP_FRAME_HEIGHT) # float
print(str(width))
print(str(height))
while True:
 ret, frame = cap.read()
 imgray = frame[int(round((height/100)*70,0)):int(round((width/100)*42,0)), int(round((height/100)*74,0)):int(round((width/100)*54,0))]
 if not ret:
 print('frame empty')
 break
 cv2.imshow('image', imgray)
 if cv2.waitKey(1)&0XFF == ord('q'):
 break
cap.release()




I'm able to visualize portion of the stream video as expect, but I'm facing lot of issue in video quality degradation, specially video artifact probably due missing packet processing :






Also these are error log I'm geting from script :



[h264 @ 0000026eb272f280] error while decoding MB 105 66, bytestream -21
[h264 @ 0000026eb2fcb740] error while decoding MB 100 53, bytestream -11
[h264 @ 0000026eb272f280] error while decoding MB 32 22, bytestream -11
[h264 @ 0000026ead9ee300] error while decoding MB 60 20, bytestream -25
[h264 @ 0000026eb27f00c0] error while decoding MB 9 62, bytestream -5
[h264 @ 0000026ead9ee780] error while decoding MB 85 44, bytestream -5
[h264 @ 0000026eb27f0800] error while decoding MB 64 25, bytestream -15
[h264 @ 0000026eb272f280] error while decoding MB 112 23, bytestream -17
[h264 @ 0000026eb2735200] error while decoding MB 30 21, bytestream -7




Actually I don't care about video fluidity,I can also reduce the FPS, important thing is the video quality. Not sure if I'm doing wrong on the scripting python part or if I'm using wrong FFMPEG command.



Many Thanks