
Recherche avancée
Autres articles (63)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (7745)
-
Embed graphics/information to a streaming
3 mars 2016, par Jorge AnzolaHow can I embed information or graphics to a stream.
Like the "marquee" (IDK what’s its name) in a football/soccer game or any other live event. (Score, time and logo)I’ve to add a watermark with FFMPEG’s filter like
ffmpeg -i sample.mp4 -i info.png -filter_complex overlay -c:v copy -c:a copy -f flv rtmp://wowzaServerAdress
And I was thinking to change info.png with updated info. I had no idea if that could work, it was just a test. Anyhow, it gave this error :
Streamcopy requested for output stream 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used together.
So, basically that error killed my only idea. Do you know how can achieve this with FFMPEG or similar ? I’d prefer not to use something like Xsplit.
-
Anomalie #3763 : Rendre cohérent et simplifier l’appel à sa propre page d’auteur
2 avril 2016, par Franck Dalotb b a écrit :
Si, il y a un peu doublon, mais comme le bug signalé avec concision ici est caché dans un texte "un peu" long, personne ne l’avait remarqué :p
Du coup, #3534 n’aborde que le point signalé ici, on fermera un des deux. Et si ton ticket signale plusieurs bugs, tu dois pouvoir y virer la mention du bug signalé ici. Tu me suis ? ^^
Non, je comprends pas du tout ce que tu veux dire b_b :-p
A la limite tu fermes le mien, et tu fais une liaison avec, pour pas que cela se perde :-)En faite, je me fiche complètement de la solution qui serait faite. C’est le fait d’avoir deux pages qui sont pratiquement identique que je trouve dommage.
Peut importe la page qui disparaitrait ! En faisant mon ticket j’avais dû être long pour faire comprendre le fait qu’il y avait aussi des différences au niveau des autorisations.Par contre je suis pas sûr que actuellement ce soit un bug, mais plutôt une évolution car cela touche l’ergonomie et serait sans doute mieux dans "Petites roadmap" avec les autres tickets qui concernerait l’espace privé avec comme cible spip 3.2 ou plus
-
How can i save the preview video in pictureBox1 to a avi/mp4 video file on hard disk using directshow ?
10 avril 2016, par benny dayagThe first problem maybe it’s not a problem but for some reason the video preview in the pictureBox1 is working but the frame rate seems not right. I can’t figure how to set/change it. The preview video seems a bit dart to the eyes not flickering but not moving smooth.
The main problem is how to save the preview in the pictureBox1 or directly the streaming to a video file ? The MediaSubtype i’m getting is h.264
The video is from the device legato game capture.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DirectShowLib;
using DirectShowLib.BDA;
using DirectShowLib.DES;
using DirectShowLib.DMO;
using DirectShowLib.Dvd;
using DirectShowLib.MultimediaStreaming;
using DirectShowLib.SBE;
using System.Runtime.InteropServices;
using System.Management;
using System.IO;
using System.Drawing.Imaging;
namespace Youtube_Manager
{
public partial class Elgato_Video_Capture : Form
{
IFileSinkFilter sink;
IFilterGraph2 graph;
ICaptureGraphBuilder2 captureGraph;
System.Drawing.Size videoSize;
string error = "";
List devices = new List();
IMediaControl mediaControl;
public Elgato_Video_Capture()
{
InitializeComponent();
if (comboBox1.Items.Count == 0)
{
for (int xx = 1; xx <= 8; xx++)
{
comboBox1.Items.Add(xx);
}
}
InitDevice();
timer1.Start();
}
IBaseFilter smartTeeFilter;
IPin outPin;
IPin inPin;
private void InitDevice()
{
try
{
//Set the video size to use for capture and recording
videoSize = new Size(827, 505);//1280, 720);
//Initialize filter graph and capture graph
graph = (IFilterGraph2)new FilterGraph();
captureGraph = (ICaptureGraphBuilder2)new CaptureGraphBuilder2();
captureGraph.SetFiltergraph(graph);
//Create filter for Elgato
Guid elgatoGuid = new Guid("39F50F4C-99E1-464A-B6F9-D605B4FB5918");
Type comType = Type.GetTypeFromCLSID(elgatoGuid);
IBaseFilter elgatoFilter = (IBaseFilter)Activator.CreateInstance(comType);
graph.AddFilter(elgatoFilter, "Elgato Video Capture Filter");
//Create smart tee filter, add to graph, connect Elgato's video out to smart tee in
smartTeeFilter = (IBaseFilter)new SmartTee();
graph.AddFilter(smartTeeFilter, "Smart Tee");
outPin = GetPin(elgatoFilter, "Video");
inPin = GetPin(smartTeeFilter, "Input");
SetAndGetAllAvailableResolution(outPin);
graph.Connect(outPin, inPin);
//Create video renderer filter, add it to graph, connect smartTee Preview pin to video renderer's input pin
IBaseFilter videoRendererFilter = (IBaseFilter)new VideoRenderer();
graph.AddFilter(videoRendererFilter, "Video Renderer");
outPin = GetPin(smartTeeFilter, "Preview");
inPin = GetPin(videoRendererFilter, "Input");
graph.Connect(outPin, inPin);
// int hr = graph.Connect(outPin, inPin); ;
// DsError.ThrowExceptionForHR(hr);
captureGraph.SetOutputFileName(MediaSubType.Avi, @"e:\screenshots\test1.mp4", out smartTeeFilter, out sink);
//Render stream from video renderer
captureGraph.RenderStream(PinCategory.VideoPort, MediaType.Video, videoRendererFilter, null, null);
//Set the video preview to be the videoFeed panel
IVideoWindow vw = (IVideoWindow)graph;
vw.put_Owner(pictureBox1.Handle);
vw.put_MessageDrain(this.Handle);
vw.put_WindowStyle(WindowStyle.Child | WindowStyle.ClipSiblings | WindowStyle.ClipChildren);
vw.SetWindowPosition(0, 0, 827, 505);
//Start the preview
mediaControl = graph as IMediaControl;
mediaControl.Run();
}
catch (Exception err)
{
error = err.ToString();
}
}
IPin GetPin(IBaseFilter filter, string pinname)
{
IEnumPins epins;
int hr = filter.EnumPins(out epins);
checkHR(hr, "Can't enumerate pins");
IntPtr fetched = Marshal.AllocCoTaskMem(4);
IPin[] pins = new IPin[1];
while (epins.Next(1, pins, fetched) == 0)
{
PinInfo pinfo;
pins[0].QueryPinInfo(out pinfo);
bool found = (pinfo.name == pinname);
DsUtils.FreePinInfo(pinfo);
if (found)
return pins[0];
}
checkHR(-1, "Pin not found");
return null;
}
public void checkHR(int hr, string msg)
{
if (hr < 0)
{
MessageBox.Show(msg);
DsError.ThrowExceptionForHR(hr);
}
}
public void SetAndGetAllAvailableResolution(IPin VideoOutPin)
{
int hr = 0;
IAMStreamConfig streamConfig = (IAMStreamConfig)VideoOutPin;
AMMediaType searchmedia;
AMMediaType CorectvidFormat = new AMMediaType();
IntPtr ptr;
int piCount, piSize;
hr = streamConfig.GetNumberOfCapabilities(out piCount, out piSize);
ptr = Marshal.AllocCoTaskMem(piSize);
for (int i = 0; i < piCount; i++)
{
hr = streamConfig.GetStreamCaps(i, out searchmedia, ptr);
VideoInfoHeader v = new VideoInfoHeader();
Marshal.PtrToStructure(searchmedia.formatPtr, v);
if (i == 2)// 4
{
CorectvidFormat = searchmedia;
}
}
hr = streamConfig.SetFormat(CorectvidFormat);
IntPtr pmt = IntPtr.Zero;
AMMediaType mediaType = new AMMediaType();
IAMStreamConfig streamConfig1 = (IAMStreamConfig)VideoOutPin;
hr = streamConfig1.GetFormat(out mediaType);
BitmapInfoHeader bmpih = new BitmapInfoHeader();
Marshal.PtrToStructure(mediaType.formatPtr, bmpih);
}
}
}I tried to use this line to save the video to a video file but the video file on hard disk is 0 KB so I guess it’s a wrong way to do it.
I also thought somehow to save each frame(bitmap image) from the pictureBox1 to the hard disk or maybe the memory and use ffmpeg to create/build a video file in real time from each saved frame but I can’t get/save the images(frames) from the pictureBox1 for some reason.I tried using DrawToBitmap but all the frames(bitmaps on hard disk saved) are empty size 2.24 KB
captureGraph.SetOutputFileName(MediaSubType.Avi, @"e:\screenshots\test1.mp4", out smartTeeFilter, out sink);
This is how I tried to get the frames from the pictureBox1
public static int counter = 0;
private void timer1_Tick(object sender, EventArgs e)
{
counter++;
Bitmap bmp = new Bitmap(pictureBox1.ClientSize.Width, pictureBox1.ClientSize.Height);
pictureBox1.DrawToBitmap(bmp, pictureBox1.ClientRectangle);
bmp.Save(@"e:\screenshots\" + "screenshot" + counter.ToString("D6") + ".bmp");
bmp.Dispose();
}