
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (34)
-
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs. -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
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
Sur d’autres sites (4233)
-
Accord.Video.FFMPEG.VideoFileWriter writes different data from the input data
14 novembre 2017, par Rasool AhmedI’m working on project that encrypting video frames using RC4 algorithm and save these frames in playable video file.
I used a package named Accord.Video.FFMPEG. This package has a classes (VideoFileReader, & VideoFileWriter) that reads and writes video frames.
The first step is reads the video :
VideoHandler v = new VideoHandler();
OpenFileDialog newimag = new OpenFileDialog();
if (newimag.ShowDialog() == DialogResult.OK)
{
textfile = newimag.FileName;
picbox.ImageLocation = textfile;
status1.Text = "loaded";
//MessageBox.Show("your video file have been loaded seccufly"); // is an idea for viwing message
}
bytedata = v.ReadAllFrameBytes(textfile);The second step is encrypting the frames of video :
byte[] bn = new byte[bytedata.Length];// new array to hold the encryptred file
bn = Encrypt(bytedata, ba);The last step is saving the encrypted frames :
v.WriteFramesData(newfilepath, bn);
My encrypting algorithm is encrypting and decrypting the cipher with same algorithm and key.
These stpes works on Text, and Images files, but when I use it on video I can’t restore the encrypted video. After some testings, I found that VideoFileWriter dosn’t write the same input frames. Whyyyyyyy ?
Here is my VideoFileHandler I made it :
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Drawing.Imaging;
using System.IO;
using Accord.Video.FFMPEG;
namespace imgtobyt_1_in_c
{
class VideoHandler
{
public List data;
public byte[] imagedata;
public int Height, Width;
public byte[] ReadAllFrameBytes(string FileName)
{
// create instance of video reader
VideoFileReader reader = new VideoFileReader();
// open video file
reader.Open(FileName);
Height = reader.Height;
Width = reader.Width;
data = new List();
// read video frames
for (int i = 0; i < 100; i++) //change 100 to reader.FrameCount
{
Bitmap videoFrame = reader.ReadVideoFrame();
byte[] framebytes = GetBytesFromFrame(videoFrame);
data.Add(framebytes);
// dispose the frame when it is no longer required
videoFrame.Dispose();
}
reader.Close();
imagedata = new byte[data.Count * data[0].Length];
int c = 0;
for (int i = 0; i < data.Count; i++)
{
byte[] d = data[i];
for (int x = 0; x < d.Length; x++)
{
imagedata[c] = d[x];
c++;
}
}
return imagedata;
}
public byte[] GetBytesFromFrame(Bitmap Frame)
{
LockBitmap lockBitmap = new LockBitmap(Frame);
lockBitmap.LockBits();
byte[] framebytes = new byte[Frame.Width * Frame.Height * 3];
int z = 0;
for (int x = 0; x < lockBitmap.Height; x++)
for (int y = 0; y < lockBitmap.Width; y++)
{
Color Pixel = lockBitmap.GetPixel(y, x);
framebytes[z] = Pixel.R;
z++;
framebytes[z] = Pixel.G;
z++;
framebytes[z] = Pixel.B;
z++;
}
lockBitmap.UnlockBits();
return framebytes;
//using (var stream = new MemoryStream())
//{
// Frame.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
// return stream.ToArray();
//}
}
public Bitmap GetFrameFromBytes(byte[] Framebytes, ref int offset, int Width, int Height)
{
Bitmap Frame = new Bitmap(Width, Height, PixelFormat.Format24bppRgb);
LockBitmap lockBitmap = new LockBitmap(Frame);
lockBitmap.LockBits();
for (int x = 0; x < Height; x++)
for (int y = 0; y < Width; y++)
{
Color Pixel = Color.FromArgb(Framebytes[offset], Framebytes[offset + 1], Framebytes[offset + 2]); offset += 3;
lockBitmap.SetPixel(y, x, Pixel);
}
lockBitmap.UnlockBits();
return Frame;
//Bitmap bmp;
//using (var ms = new MemoryStream(Framebytes))
//{
// bmp = new Bitmap(ms);
//}
//return bmp;
}
public void WriteFramesData(string FileName, byte[] data)
{
// create instance of video writer
VideoFileWriter writer = new VideoFileWriter();
// create new video file
writer.Open(FileName, Width, Height);
int offset = 0;
// write video frames
for (int i = 0; i < 100; i++)
{
// create a bitmap to save into the video file
Bitmap Frame = GetFrameFromBytes(data, ref offset, Width, Height);
writer.WriteVideoFrame(Frame);
}
writer.Close();
}
}
}Please, I need to make this works.
-
Save video to disk from WebRTC MediaStream in Node
27 novembre 2020, par SAGBO AiméI'm building an app where the user can connect to the server through a WebRTC (I'm using simple-peer library both server-side and client-side to set the peer-to-peer connection).
Once the client and the server are connected, the client app stream the user camera and micro to the server.


Now, I want to save the streamed data to the filesystem server-side as an MP4 video file.


I hear about ffmpeg and fluent-ffmpeg to achieve this but i don't know how to use them.


- 

- Server side code to set up the peer connection




const Peer = require("simple-peer");
const wrtc = require("wrtc");

const peer = new Peer({ initiator: false, wrtc: wrtc, trickle: false });

peer.on("error", (err: any) => console.log("error", err));

 peer.on("signal", (data: any) => {
 if (data.type === "offer" || data.type === "answer")
 dispatchMessage(JSON.stringify(data));
 // if (data.renegotiate || data.transceiverRequest) return;
 });

 peer.on("connect", () => {
 console.log("CONNECTED");
 peer.send(JSON.stringify("HELLO DEER PEER FROM SERVER"));
 });

 peer.on("data", (data: any) => {
 console.log("data: ", data);
 });

 peer.on("stream", (stream: MediaStream) => {
 console.log("-------Stream received", stream);
 });

 peer.on("track", (track: MediaStreamTrack) => {
 console.log("-------trackEvent:", track);
 });



- 

- Client-side code




const stream = await window.navigator.mediaDevices.getUserMedia({
 video: { width: { ideal: 4096 }, height: { ideal: 2160 }},
 audio: true,
});

const p = new SimplePeer({
 initiator: isInitiator, 
 trickle: false 
});

stream.getTracks().forEach(track => p.addTrack(
 track, 
 stream 
));

// Here I set up the listeners for the peer connection



-
How to save the whole transportstream(meaning incl. PAT and PMT,etc.) using ffmpeg
15 mars 2018, par Harris TailorI have been searching the whole Internet for a long time and seems it can only save video/audio using ffmpeg,any help or advice will be appreciate !thanks !