
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (45)
-
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 -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (8159)
-
Issues when decoding video via ffmpeg with dxva2
5 janvier 2016, par CD83I have successfully implemented a video player using ffmpeg. I am now trying to use hardware decoding but I’m facing a couple issues.
I found a post that I followed as a starting point here : http://comments.gmane.org/gmane.comp.video.ffmpeg.libav.user/13523I have updated the code that setup the necessary stuff for the decoder. The updated code is available here : https://drive.google.com/file/d/0B5ufHdoDzA4ieVk5UVpxcDNzRHc/view?usp=sharing
And this is how I’m using it to initialize the decoder :
// Prepare the decoding context
AVCodec *codec = nullptr;
_codecContext = _avFormatContext->streams[_streamIndex]->codec;
if ((codec = avcodec_find_decoder(_codecContext->codec_id)) == 0)
{
std::cout << "Unsupported video codec!" << std::endl;
return false;
}
_codecContext->thread_count = 1; // Multithreading is apparently not compatible with hardware decoding
InputStream *ist = new InputStream();
ist->hwaccel_id = HWACCEL_AUTO;
ist->hwaccel_device = "dxva2";
ist->dec = codec;
ist->dec_ctx = _codecContext;
_codecContext->coded_width = _width;
_codecContext->coded_height = _height;
_codecContext->opaque = ist;
dxva2_init(_codecContext);
_codecContext->get_buffer2 = ist->hwaccel_get_buffer;
_codecContext->get_format = GetHwFormat;
_codecContext->thread_safe_callbacks = 1;
if (avcodec_open2(_codecContext, codec, nullptr) < 0)
{
std::cout << "Video codec open error" << std::endl;
return false;
}And here is the definition of GetHwFormat referenced above :
AVPixelFormat GetHwFormat(AVCodecContext *s, const AVPixelFormat *pix_fmts)
{
InputStream* ist = (InputStream*)s->opaque;
ist->active_hwaccel_id = HWACCEL_DXVA2;
ist->hwaccel_pix_fmt = AV_PIX_FMT_DXVA2_VLD;
return ist->hwaccel_pix_fmt;
}When I open an mp4 (encoded in h264) video that is HD resolution or less, everything seems to be working fine. However, as soon as I try higher resolution videos like 3840x2160, I get the following errors repeatedly :
Failed to execute: 0x80070057
Hardware accelerator failed to decode pictureI also start getting the following errors after a few seconds :
co located POCs unavailable
And the video is not displayed properly : I get a lot of artifacts all over the video and it is lagging. I checked the first error in the ffmpeg source code. It seems that IDirectXVideoDecoder_Execute fails because of an invalid parameter. Since this is happening withing ffmpeg, there must be something that I’m missing but I can’t figure out what. The only relevant post that I found with this error was because of multithreading but I set the thread_count to 1 before opening the codec.
This issue is happening on my main computer which has the following specs :
- i7-4790 CPU @ 3.6GHz
- RAM 16 GB
- Intel HD Graphics 4600
- Windows 8.1
The same issue is not happening on my second computer which has the following specs :
- i7 4510U @ 2GHz
- RAM 8 GB
- NVIDIA GeForce GTX 750Ti
- Windows 10
If I use DXVAChecker on my main computer, it says that my graphics card supports DXVA2 for H264_VLD_*, and I can see that the calls to the Microsoft API are being made (DXVA2_DecodeDeviceCreated, DXVA2_DecodeDeviceBeginFrame, DXVA2_DecodeDeviceGetBuffer, DXVA2_DecodeDeviceExecute, DXVA2_DecodeDeviceEndFrame) while my video is playing.
I also don’t see any increase of GPU usage (on either computer) between the version with hardware decoding and the version without ; however, I do see a decrease in CPU usage (not as much as I was expecting though). This is also very strange.
Note that I tried both the Windows release available on the FFmpeg website, and a version that I compiled with —enable-dxva2. I have searched a lot already but I was unable to find what I’m doing wrong.
Hopefully, someone can help me, or maybe point me to a better example ?
-
bigbluebutton ...
7 mars 2015, par signo
Hello i have a BigBlueButton (0.9.0-beta (622)) installation on Debian Wheezy (7.8) all is ok except archiving recordings...
in the log (/var/log/bigbluebutton/archive-488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.log) i have always same message :
I, [2015-03-06T11:48:19.320704 #4550] INFO -- : Archiving events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.851280 #4550] WARN -- : Failed to archive events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/events.xml (complete error below...)but all directory are writable by right user (tomcat7).
More Info :
bbb packages installed
ii bbb-apps 0.9.0-1ubuntu88 amd64 BigBlueButton applications for Red5
ii bbb-apps-deskshare 0.9.0-1ubuntu25 amd64 BigBlueButton deskshare module for Red5
ii bbb-apps-sip 0.9.0-1ubuntu19 amd64 BigBlueButton SIP module for Red5
ii bbb-apps-video 0.9.0-1ubuntu18 amd64 BigBlueButton video module for Red5
ii bbb-client 0.9.0-1ubuntu235 all BigBlueButton Flash client
ii bbb-config 0.9.0-1ubuntu42 all BigBlueButton configuration
rc bbb-demo 0.9.0-1ubuntu8 amd64 BigBlueButton API demos
ii bbb-freeswitch 0.9.0-1ubuntu38 amd64 BigBlueButton build of FreeSWITCH 1.5.x
ii bbb-mkclean 0.8.7-1 amd64 tool to clean and optimize Matroska and WebM files
ii bbb-office 0.9.0-1ubuntu6 amd64 BigBlueButton wrapper for LibreOffice
ii bbb-playback-presentation 0.9.0-1ubuntu11 amd64 BigBluebutton playback of presentation
ii bbb-record-core 0.9.0-1ubuntu37 amd64 BigBlueButton record and playback
ii bbb-red5 0.9.0-1ubuntu25 amd64 The Red5 server for bbb
ii bbb-swftools 0.9.2-1ubuntu14 amd64 The swftools files for bbb
ii bbb-web 0.9.0-1ubuntu54 all BigBlueButton API
ii bigbluebutton 0.9.0-1ubuntu2 amd64 Open source web conferencing platform (bbb)
bbb-conf —check
BigBlueButton Server 0.9.0-beta (622)
Kernel version: 3.16.0-4-amd64(64-bit)
Memory: 12044 MB
/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
Port test (tunnel): 2xx.xxx.xxx.xx
Red5: 2xx.xxx.xxx.xx
useWebrtcIfAvailable: true
/opt/freeswitch/conf/sip_profiles/external.xml (FreeSWITCH)
websocket port: 5066
WebRTC enabled: true
/etc/nginx/sites-available/bigbluebutton (nginx)
server name: 2xx.xxx.xxx.xx
port: 80
bbb-client dir: /var/www/bigbluebutton
/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties (bbb-web)
bbb-web host: 2xx.xxx.xxx.xx
/usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml (red5)
voice conference: FreeSWITCH
capture video: true
capture desktop: true
/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
playback host: 2xx.xxx.xxx.xx
* Potential problems described below **
# IP does not match:
# IP from ifconfig: 172.xx.xxx.xx
# /etc/nginx/sites-available/bigbluebutton: 2xx.xxx.xxx.xx
# Error: Unable to connect to port 1935 (RTMP) 2xx.xxx.xxx.xx
# Error: Unable to connect to port 9123 (desktop sharing) on 212.xxx.xxx.xx
ls -l /var/freeswitch/meetings/
-rw-r--r-- 1 freeswitch daemon 5139984 Mar 6 11:44 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675-81976383.wav
ls -l /usr/share/red5/webapps/video/streams/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/
-rw-rw-r-- 1 red5 red5 438342 Mar 6 11:44 320x240-cztd6nyzasaz_1-1425642114164.flv
ls -l /usr/share/red5/webapps/video/streams/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/
-rw-rw-r-- 1 red5 red5 438342 Mar 6 11:44 320x240-cztd6nyzasaz_1-1425642114164.flv
cat /usr/share/red5/webapps/video/WEB-INF/red5-web.xml
<bean class="org.bigbluebutton.app.video.VideoApplication">
<property value="true"></property>
<property ref="redisRecorder"></property>
</bean>
cat /usr/share/red5/webapps/deskshare/WEB-INF/red5-web.xml
<bean class="org.bigbluebutton.deskshare.server.stream.StreamManager">
</bean>
bbb-record —watch
Every 2.0s: bbb-record --list20 Fri Mar 6 11:53:58 2015
Internal MeetingID Time APVD APVDE RAS Slides Processed Published External MeetingID
------------------------------------------------------ ---------------------------- ---- ----- --- ------ -------------------- ------------------ -------------------
57d9849193299cebe9409d1c98d175958331d34a-1425642748807 Fri 6 Mar 11:52:28 GMT 2015 X 5
488052dc7c095c74bf8992ec51a66298db04b765-1425642166675 Fri 6 Mar 11:42:46 GMT 2015 XXX X 6
bbb-record —debug
E, [2015-03-06T11:48:20.335578 #4548] ERROR -- : Sanity check failed on 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675
cat /var/log/bigbluebutton/archive-488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.log
# Logfile created on 2015-03-06 11:48:19 +0000 by logger.rb/31641
I, [2015-03-06T11:48:19.320704 #4550] INFO -- : Archiving events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.851280 #4550] WARN -- : Failed to archive events for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/events.xml
I, [2015-03-06T11:48:19.851428 #4550] INFO -- : Fetching the recording marks for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
I, [2015-03-06T11:48:19.851501 #4550] INFO -- : Getting record status events
W, [2015-03-06T11:48:19.851585 #4550] WARN -- : Failed to fetch the recording marks for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/events.xml
I, [2015-03-06T11:48:19.851645 #4550] INFO -- : Archiving audio /var/freeswitch/meetings/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675*.wav.
W, [2015-03-06T11:48:19.851920 #4550] WARN -- : Failed to archive audio for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/audio
I, [2015-03-06T11:48:19.851981 #4550] INFO -- : Archiving presentation for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.852257 #4550] WARN -- : Failed to archive presentations for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/presentation
I, [2015-03-06T11:48:19.852322 #4550] INFO -- : Archiving deskshare for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.852561 #4550] WARN -- : Failed to archive deskshare for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/deskshare
I, [2015-03-06T11:48:19.852620 #4550] INFO -- : Archiving video for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675.
W, [2015-03-06T11:48:19.852834 #4550] WARN -- : Failed to archive video for 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675. Permission denied - /var/bigbluebutton/recording/raw/488052dc7c095c74bf8992ec51a66298db04b765-1425642166675/video
all folder under /var/bigbluebutton/ have same rights (drwxrwxrwx tomcat7 tomcat7)
ls -l /var/bigbluebutton/
total 40
drwxr-xr-x 3 tomcat7 tomcat7 4096 Mar 6 11:42 488052dc7c095c74bf8992ec51a66298db04b765-1425642166675
drwxr-xr-x 3 tomcat7 tomcat7 4096 Mar 6 11:52 57d9849193299cebe9409d1c98d175958331d34a-1425642748807
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:52 blank
drwxrwxrwx 2 tomcat7 tomcat7 4096 Feb 17 17:17 configs
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:57 deskshare
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:57 meetings
drwxrwxrwx 3 tomcat7 tomcat7 4096 Mar 3 15:52 playback
drwxrwxrwx 3 tomcat7 tomcat7 4096 Mar 3 15:57 published
drwxrwxrwx 6 tomcat7 tomcat7 4096 Mar 3 15:57 recording
drwxrwxrwx 2 tomcat7 tomcat7 4096 Mar 3 15:57 unpublished -
Render Multiple Gifs with ffplay/ffmpeg in Winform
17 juin 2019, par PurqsI’m trying to get x number of animated gifs to render on like a Panel or PictureBox and using transparency that is in each gif. I’ve tried a couple approaches but am not super famiular with ffmpeg and such. Below is some code that I use to get it to render inside a panel, but I can’t figure out how to get like 5 gifs to stack/layer on one another and still render as you would expect.
I need/want this to render in the form and not outputted. I am a little confused to why the ffplay.exe doesn’t use the -i command and that might be why i can’t get it to render. any ideas ?
Working example below.
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 System.Diagnostics;
using System.Threading;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Drawing.Text;
using System.Text.RegularExpressions;
using System.Configuration;
using Microsoft.Win32;
using System.Windows.Forms.VisualStyles;
//FOR THIS EXAMPLE CREATE FORM HAVE BUTTON ON IT AND PANEL.
//button: button's click is "button1_Click"
//panel: Needed to output the render on it.
//FILES:
//Test.Gif
//These ff files came from the ffmpeg offical site.
//ffplay.exe //currently using
//ffmpeg.exe //thinking i need to use to get it how I want.
//I most of the code below from https://stackoverflow.com/questions/31465630/ffplay-successfully-moved-inside-my-winform-how-to-set-it-borderless which was a good starting point.
namespace Test_Form
{
public partial class Form1 : Form
{
[DllImport("user32.dll", SetLastError = true)]
private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("user32.dll")]
private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
//Process ffplay = null;
public Form1()
{
InitializeComponent();
Application.EnableVisualStyles();
this.DoubleBuffered = true;
}
public Process ffplay = new Process();
private void FFplay()
{
ffplay.StartInfo.FileName = "ffplay.exe";
ffplay.StartInfo.Arguments = "-noborder Test.gif"; //THIS IS WHERE I INPUT THE GIF FILE
ffplay.StartInfo.CreateNoWindow = true;
ffplay.StartInfo.RedirectStandardOutput = true;
ffplay.StartInfo.UseShellExecute = false;
ffplay.EnableRaisingEvents = true;
ffplay.OutputDataReceived += (o, e) => Debug.WriteLine(e.Data ?? "NULL", "ffplay");
ffplay.ErrorDataReceived += (o, e) => Debug.WriteLine(e.Data ?? "NULL", "ffplay");
ffplay.Exited += (o, e) => Debug.WriteLine("Exited", "ffplay");
ffplay.Start();
Thread.Sleep(1000); // you need to wait/check the process started, then...
// child, new parent
// make 'this' the parent of ffmpeg (presuming you are in scope of a Form or Control)
SetParent(ffplay.MainWindowHandle, this.Handle);
// window, x, y, width, height, repaint
// move the ffplayer window to the top-left corner and set the size to 320x280
MoveWindow(ffplay.MainWindowHandle, 800, 600, 320, 280, true);
SetParent(ffplay.MainWindowHandle, this.panel1.Handle);
MoveWindow(ffplay.MainWindowHandle, -5, -30, 320, 280, true);
}
//runs the FFplay Command
private void button1_Click(object sender, EventArgs e)
{
FFplay();
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
try { ffplay.Kill(); }
catch { }
}
}I would like the button to allow me to add any number of gifs (like 5 or 10) all to the same area and have them being animated with their transparent showing what is under that gif.
So for example I could have a circle image, then a spinning/loading transparent gif on top, and then a gif that counts up/down on top of that one to give me the effect of a count-down.
Thanks for all the help !