
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (26)
-
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
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) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (4231)
-
Single-threaded demuxer with FFmpeg API
7 décembre 2023, par yaskovdevI am trying to create a demuxer using FFmpeg API with the next interface :


interface IDemuxer
{
 void WriteMediaChunk(byte[] chunk);

 byte[] ReadAudioOrVideoFrame();
}



The plan is to use it in a single thread like this :


IDemuxer demuxer = new Demuxer();

while (true)
{
 byte[] chunk = ReceiveNextChunkFromInputStream();
 
 if (chunk.Length == 0) break; // Reached the end of the stream, exiting.
 
 demuxer.WriteMediaChunk(chunk);
 
 while (true)
 {
 var frame = demuxer.ReadAudioOrVideoFrame()

 if (frame.Length == 0) break; // Need more chunks to produce the frame. Let's add more chunks and try produce it again.

 WriteFrameToOutputStream(frame);
 }
}



I.e., I want the demuxer to be able to notify me (by returning an empty result) that it needs more input media chunks to produce the output frames.


It seems like FFmpeg can read the input chunks that I send to it using the read callback.


The problem with this approach is that I cannot handle a situation when more input chunks are required using only one thread. I can handle it in 3 different ways in the read callback :


- 

- Simply be honest that there is no data yet and return an empty buffer to FFmpeg. Then add more data using
WriteMediaChunk()
, and then retryReadAudioOrVideoFrame()
. - Return
AVERROR_EOF
to FFmpeg to indicate that there is no data yet. - Block the thread and do not return anything. Once the data arrives, unblock the thread and return the data.








But all these options are far from ideal :


The 1st one leads to FFmpeg calling the callback again and again in an infinite loop hoping to get more data, essentially blocking the main thread and not allowing me to send the data.


The 2nd leads to FFmpeg stopping the processing at all. Even if the data appears finally, I won't be able to receive more frames. The only option is to start demuxing over again.


The 3rd one kind of works, but then I need at least 2 threads : first is constantly putting new data to a queue, so that FFmpeg could then read it via the callback, and the second is reading the frames via
ReadAudioOrVideoFrame()
. The second thread may occasionally block if the first one is not fast enough and there is no data available yet. Having to deal with multiple threads makes implementation and testing more complex.

Is there a way to implement this using only one thread ? Is the read callback even the right direction ?


- Simply be honest that there is no data yet and return an empty buffer to FFmpeg. Then add more data using
-
FPV-Camera Input in Black and White / losses Color on conversion with FFMPEG [closed]
22 décembre 2023, par LyffLyffso we're working on our end-of-school project and it's an FPV-Drone with an Analogue Camera on it. Plan is to send the video feed to a Raspberry Pi running an RTMP-Server from where a Phone-Application can view the live Video of the camera.


To convert this analogue Data from the camera we use a USB2.0 Grabber (this one).


To create the RTMP Stream from the converted USB-Input we use FFMPEG with the following command :




fmpeg -f v4l2 -input_format yuyv422 -i /dev/video0 -c:v libx264 -crf 20 -preset ultrafast -b:v 2000k -fflags nobuffer -rtmp_live live -f flv rtmp ://192.168.8.107:554/live/stream




It works fine, but the main problems at the moment are :


- 

- the video is in Black and White
B&W Image Stream
- the stream has a delay of 10-20s depending on the network






When I'm using the official Software provided by the Reseller I had the same problem, but as soon as it set PAL/BDGHI in the Settings the colour was shown correctly :


Settings and Color Image in official software


the video is in Black and White


Does anyone know what settings there are to correctly decode the feed from the Camera and send the video with the colour over RTMP ? I don't know if this is the right place to ask this question, but I'm running out of ideas and every single decoder I have tried apart from the ones I'm currently using does not work.


Any help is greatly appreciated :)


-
Processing video frame by frame in AWS Lambda with Node.js and FFmpeg [closed]
29 décembre 2023, par AviatoI am working on a project where I need to process video frames one at a time in an AWS Lambda function using Node.js. My goal is to avoid storing all frames in memory or the filesystem due to resource constraints. I plan to use the fluent-ffmpeg library or ffmpeg from child processes for video processing.


In the past, I used OpenCV to process videos and frames without writing the frames on the disk or storing all the frames at once on the memory itself. But now as I am using node js, its a little hard to set up the code using ffmpeg, etc.


Here is a small snippet from what I did with opencv :-


import cv2

cap = cv2.VideoCapture(video_file)

out = cv2.VideoWriter('output.mp4', fourcc, fps, (width, height))

def generate_frame():
 while cap.isOpened():
 code, frame = cap.read()
 if code:
 yield frame
 else:
 print("completed")
 break

for i, frame in enumerate(generate_frame()):
 # Now we can process the video frames directly and write them on the output opencv
 out.write(editing_frames)



Additionally, I intend to leverage image processing libraries like Sharp and the Canvas API to edit individual frames before assembling the final video. I am looking for help in handling video frames efficiently within the constraints of AWS Lambda.


Any insights, code snippets, or recommendations would be greatly appreciated. Thank you !