
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (97)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (8526)
-
html5 video wont play ANY mp4 encodes on ipad
12 mars 2019, par nickgIm trying to embed a mp4 on a page with the HTML5 video tag. Everything works fine on Desktop but nothing will work on an iPad Version 9.3.4.
I have the mime types in an .htaccess file. I’ve tried various encodes with handbrake, Miro and FFmpeg conversions.Even sample videos like at w3schools and videojs don’t play.
The video will play if i actually sync it to the iPad, but nothing works over the web. An older iPad actually plays mp4s through the HTML5 video player.
I’m ready to throw this POS iPad through a window.<video autoplay="false" width="320" height="240" controls="true">
<source src="http://webnamehere.com/video/bunny.mp4" type="video/mp4; codecs="avc1.42E01E, mp4a.40.2"">
Your browser does not support the video tag.
</source></video>Has anyone found a way to fix this ? Is there ANY encoding that this thing will actually play ? Thank you in advance for any help.
-
Rendering YUV420P ffmpeg decoded images on QT with OpenGL, only see black screen
17 février 2019, par Lucas ZanellaI’ve found this QT OpenGL Widget which should render a 420PYUV image on screen. I’m feeding a ffmpeg decoded buffer into its
paintGL()
function but I see nothing. Neither noises or correct images, only a black screen. I’m trying to understand why.I want to exclude the possibilities of other things being wrong, but I need to be sure first that my code will produce anything. I
std::cout
ed some bytes from the ffmpeg just to see if they were arriving and they were. So I should see at least some noise.Can you see anything wrong with my code that wouldn’t make it able to render images on screen ?
This is the widget that should output the image :
#include "XVideoWidget.h"
#include <qdebug>
#include <qtimer>
#include <iostream>
//自动加双引号
#define GET_STR(x) #x
#define A_VER 3
#define T_VER 4
//顶点shader
const char *vString = GET_STR(
attribute vec4 vertexIn;
attribute vec2 textureIn;
varying vec2 textureOut;
void main(void)
{
gl_Position = vertexIn;
textureOut = textureIn;
}
);
//片元shader
const char *tString = GET_STR(
varying vec2 textureOut;
uniform sampler2D tex_y;
uniform sampler2D tex_u;
uniform sampler2D tex_v;
void main(void)
{
vec3 yuv;
vec3 rgb;
yuv.x = texture2D(tex_y, textureOut).r;
yuv.y = texture2D(tex_u, textureOut).r - 0.5;
yuv.z = texture2D(tex_v, textureOut).r - 0.5;
rgb = mat3(1.0, 1.0, 1.0,
0.0, -0.39465, 2.03211,
1.13983, -0.58060, 0.0) * yuv;
gl_FragColor = vec4(rgb, 1.0);
}
);
//准备yuv数据
// ffmpeg -i v1080.mp4 -t 10 -s 240x128 -pix_fmt yuv420p out240x128.yuv
XVideoWidget::XVideoWidget(QWidget * parent)
{
// setWindowFlags (Qt::WindowFullscreenButtonHint);
// showFullScreen();
}
XVideoWidget::~XVideoWidget()
{
}
//初始化opengl
void XVideoWidget::initializeGL()
{
//qDebug() << "initializeGL";
std::cout << "initializing gl" << std::endl;
//初始化opengl (QOpenGLFunctions继承)函数
initializeOpenGLFunctions();
this->m_F = QOpenGLContext::currentContext()->functions();
//program加载shader(顶点和片元)脚本
//片元(像素)
std::cout << program.addShaderFromSourceCode(QOpenGLShader::Fragment, tString) << std::endl;
//顶点shader
std::cout << program.addShaderFromSourceCode(QOpenGLShader::Vertex, vString) << std::endl;
//设置顶点坐标的变量
program.bindAttributeLocation("vertexIn",A_VER);
//设置材质坐标
program.bindAttributeLocation("textureIn",T_VER);
//编译shader
std::cout << "program.link() = " << program.link() << std::endl;
std::cout << "program.bind() = " << program.bind() << std::endl;
//传递顶点和材质坐标
//顶点
static const GLfloat ver[] = {
-1.0f,-1.0f,
1.0f,-1.0f,
-1.0f, 1.0f,
1.0f,1.0f
};
//材质
static const GLfloat tex[] = {
0.0f, 1.0f,
1.0f, 1.0f,
0.0f, 0.0f,
1.0f, 0.0f
};
//顶点
glVertexAttribPointer(A_VER, 2, GL_FLOAT, 0, 0, ver);
glEnableVertexAttribArray(A_VER);
//材质
glVertexAttribPointer(T_VER, 2, GL_FLOAT, 0, 0, tex);
glEnableVertexAttribArray(T_VER);
//glUseProgram(&program);
//从shader获取材质
unis[0] = program.uniformLocation("tex_y");
unis[1] = program.uniformLocation("tex_u");
unis[2] = program.uniformLocation("tex_v");
//创建材质
glGenTextures(3, texs);
//Y
glBindTexture(GL_TEXTURE_2D, texs[0]);
//放大过滤,线性插值 GL_NEAREST(效率高,但马赛克严重)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//创建材质显卡空间
glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, width, height, 0, GL_RED, GL_UNSIGNED_BYTE, 0);
//U
glBindTexture(GL_TEXTURE_2D, texs[1]);
//放大过滤,线性插值
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//创建材质显卡空间
glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, width/2, height / 2, 0, GL_RED, GL_UNSIGNED_BYTE, 0);
//V
glBindTexture(GL_TEXTURE_2D, texs[2]);
//放大过滤,线性插值
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//创建材质显卡空间
glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, width / 2, height / 2, 0, GL_RED, GL_UNSIGNED_BYTE, 0);
///分配材质内存空间
datas[0] = new unsigned char[width*height]; //Y
datas[1] = new unsigned char[width*height/4]; //U
datas[2] = new unsigned char[width*height/4]; //V
}
//刷新显示
void XVideoWidget::paintGL(unsigned char**data)
//void QFFmpegGLWidget::updateData(unsigned char**data)
{
std::cout << "painting!" << std::endl;
memcpy(datas[0], data[0], width*height);
memcpy(datas[1], data[1], width*height/4);
memcpy(datas[2], data[2], width*height/4);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, texs[0]); //0层绑定到Y材质
//修改材质内容(复制内存内容)
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RED, GL_UNSIGNED_BYTE, datas[0]);
//与shader uni遍历关联
glUniform1i(unis[0], 0);
glActiveTexture(GL_TEXTURE0+1);
glBindTexture(GL_TEXTURE_2D, texs[1]); //1层绑定到U材质
//修改材质内容(复制内存内容)
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width/2, height / 2, GL_RED, GL_UNSIGNED_BYTE, datas[1]);
//与shader uni遍历关联
glUniform1i(unis[1],1);
glActiveTexture(GL_TEXTURE0+2);
glBindTexture(GL_TEXTURE_2D, texs[2]); //2层绑定到V材质
//修改材质内容(复制内存内容)
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width / 2, height / 2, GL_RED, GL_UNSIGNED_BYTE, datas[2]);
//与shader uni遍历关联
glUniform1i(unis[2], 2);
glDrawArrays(GL_TRIANGLE_STRIP,0,4);
qDebug() << "paintGL";
}
// 窗口尺寸变化
void XVideoWidget::resizeGL(int width, int height)
{
m_F->glViewport(0, 0, width, height);
qDebug() << "resizeGL "<code></iostream></qtimer></qdebug>Here’s a bit of code from my MainWindow :
MainWindow::MainWindow(QWidget *parent):
QMainWindow(parent)
{
FfmpegDecoder* ffmpegDecoder = new FfmpegDecoder();
if(!ffmpegDecoder->Init()) {
std::cout << "problem with ffmpeg decoder init" << std::endl;
} else {
std::cout << "fmmpeg decoder initiated" << std::endl;
}
XVideoWidget * xVideoWidget = new XVideoWidget(parent);
ffmpegDecoder->setOpenGLWidget(xVideoWidget);
mediaStream = new MediaStream(uri, ffmpegDecoder, videoConsumer);//= new MediaStream(uri, ffmpegDecoder, videoConsumer);
//...
}
void MainWindow::run()
{
mediaStream->receiveFrame();
}My main.cpp makes sure my window
run()
method runs in the background.MainWindow w;
w.setFixedSize(1280,720);
w.show();
boost::thread mediaThread(&MainWindow::run, &w);
std::cout << "mediaThread running" << std::endl;If someone wants to view the entire code, please feel free to visit the commit I just did : https://github.com/lucaszanella/orwell/tree/bbd74e42bd42df685bacc5d51cacbee3a178689f
-
Convert Black to Transparency in FFMPEG
12 février 2019, par KapitanoI have a sequence of BMP images, which I’m concatenating to an MPNG video file, with this FFMPEG code :
ffmpeg -f image2 -framerate 12 -i "Frame_%d.bmp" -c:v png "Video.avi"
I want to replace all black pixels with a transparency in the alpha layer, so it can be laid over other videos in an editor. The following code doesn’t work :
ffmpeg -f image2 -framerate 12 -i "Frame_%d.bmp" -filter_complex "[0:v]colorkey=0x000000:0.01:0.0[BlackToTransparancy]" -map [BlackToTransparancy] -c:v png "Video.avi"
As requested, here’s the full log :
ffmpeg version N-93020-g3224d6691c Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181201
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 44.100 / 58. 44.100
libavformat 58. 26.100 / 58. 26.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, image2, from 'D:\ReadOut_Process\Test\Test__Frame_%d.bmp':
Duration: 00:00:16.83, start: 0.000000, bitrate: N/A
Stream #0:0: Video: bmp, bgra, 1280x720, 12 tbr, 12 tbn, 12 tbc
Stream mapping:
Stream #0:0 (bmp) -> colorkey
colorkey -> Stream #0:0 (png)
Press [q] to stop, [?] for help
Output #0, avi, to 'D:\ReadOut_Process\Test\Test__Scribe.avi':
Metadata:
ISFT : Lavf58.26.100
Stream #0:0: Video: png (MPNG / 0x474E504D), rgba, 1280x720, q=2-31, 200 kb/s, 12 fps, 12 tbn, 12 tbc
Metadata:
encoder : Lavc58.44.100 png
frame= 34 fps=0.0 q=-0.0 size= 774kB time=00:00:02.16 bitrate=2924.7kbits/s speed=4.21x
frame= 65 fps= 64 q=-0.0 size= 1798kB time=00:00:04.75 bitrate=3100.1kbits/s speed=4.66x
frame= 95 fps= 62 q=-0.0 size= 3078kB time=00:00:07.25 bitrate=3477.4kbits/s speed=4.76x
frame= 124 fps= 61 q=-0.0 size= 4358kB time=00:00:09.66 bitrate=3692.8kbits/s speed=4.76x
frame= 155 fps= 61 q=-0.0 size= 6150kB time=00:00:12.25 bitrate=4112.4kbits/s speed=4.83x
frame= 185 fps= 61 q=-0.0 size= 7686kB time=00:00:14.75 bitrate=4268.5kbits/s speed=4.84x
frame= 202 fps= 58 q=-0.0 Lsize= 9187kB time=00:00:16.83 bitrate=4470.8kbits/s speed=4.83x
video:9176kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.112806%The BMPs are too large to upload, but here’s a link to a section of a typical one : https://pasteboard.co/I0RzfjI.bmp
Can it be done ?