
Recherche avancée
Autres articles (36)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (5864)
-
Render YUV video in OpenGL of ffmpeg using CVPixelBufferRef and Shaders
4 septembre 2012, par resident_I'm using to render YUV frames of ffmpeg with the iOS 5.0 method "CVOpenGLESTextureCacheCreateTextureFromImage".
I'm using like the apple example GLCameraRipple
My result in iPhone screen is this : iPhone Screen
I need to know I'm doing wrong.
I put part of my code to find errors.
ffmpeg configure frames :
ctx->p_sws_ctx = sws_getContext(ctx->p_video_ctx->width,
ctx->p_video_ctx->height,
ctx->p_video_ctx->pix_fmt,
ctx->p_video_ctx->width,
ctx->p_video_ctx->height,
PIX_FMT_YUV420P, SWS_FAST_BILINEAR, NULL, NULL, NULL);
// Framebuffer for RGB data
ctx->p_frame_buffer = malloc(avpicture_get_size(PIX_FMT_YUV420P,
ctx->p_video_ctx->width,
ctx->p_video_ctx->height));
avpicture_fill((AVPicture*)ctx->p_picture_rgb, ctx->p_frame_buffer,PIX_FMT_YUV420P,
ctx->p_video_ctx->width,
ctx->p_video_ctx->height);My render method :
if (NULL == videoTextureCache) {
NSLog(@"displayPixelBuffer error");
return;
}
CVPixelBufferRef pixelBuffer;
CVPixelBufferCreateWithBytes(kCFAllocatorDefault, mTexW, mTexH, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, buffer, mFrameW * 3, NULL, 0, NULL, &pixelBuffer);
CVReturn err;
// Y-plane
glActiveTexture(GL_TEXTURE0);
err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault,
videoTextureCache,
pixelBuffer,
NULL,
GL_TEXTURE_2D,
GL_RED_EXT,
mTexW,
mTexH,
GL_RED_EXT,
GL_UNSIGNED_BYTE,
0,
&_lumaTexture);
if (err)
{
NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err);
}
glBindTexture(CVOpenGLESTextureGetTarget(_lumaTexture), CVOpenGLESTextureGetName(_lumaTexture));
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
// UV-plane
glActiveTexture(GL_TEXTURE1);
err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault,
videoTextureCache,
pixelBuffer,
NULL,
GL_TEXTURE_2D,
GL_RG_EXT,
mTexW/2,
mTexH/2,
GL_RG_EXT,
GL_UNSIGNED_BYTE,
1,
&_chromaTexture);
if (err)
{
NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err);
}
glBindTexture(CVOpenGLESTextureGetTarget(_chromaTexture), CVOpenGLESTextureGetName(_chromaTexture));
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
// Set the view port to the entire view
glViewport(0, 0, backingWidth, backingHeight);
static const GLfloat squareVertices[] = {
1.0f, 1.0f,
-1.0f, 1.0f,
1.0f, -1.0f,
-1.0f, -1.0f,
};
GLfloat textureVertices[] = {
1, 1,
1, 0,
0, 1,
0, 0,
};
// Draw the texture on the screen with OpenGL ES 2
[self renderWithSquareVertices:squareVertices textureVertices:textureVertices];
// Flush the CVOpenGLESTexture cache and release the texture
CVOpenGLESTextureCacheFlush(videoTextureCache, 0);
CVPixelBufferRelease(pixelBuffer);
[moviePlayerDelegate bufferDone];RenderWithSquareVertices method
- (void)renderWithSquareVertices:(const GLfloat*)squareVertices textureVertices:(const GLfloat*)textureVertices
{
// Use shader program.
glUseProgram(shader.program);
// Update attribute values.
glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices);
glEnableVertexAttribArray(ATTRIB_VERTEX);
glVertexAttribPointer(ATTRIB_TEXTUREPOSITON, 2, GL_FLOAT, 0, 0, textureVertices);
glEnableVertexAttribArray(ATTRIB_TEXTUREPOSITON);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
// Present
glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
[context presentRenderbuffer:GL_RENDERBUFFER];}
My fragment shader :
uniform sampler2D SamplerY;
uniform sampler2D SamplerUV;
varying highp vec2 _texcoord;
void main()
{
mediump vec3 yuv;
lowp vec3 rgb;
yuv.x = texture2D(SamplerY, _texcoord).r;
yuv.yz = texture2D(SamplerUV, _texcoord).rg - vec2(0.5, 0.5);
// BT.601, which is the standard for SDTV is provided as a reference
/* rgb = mat3( 1, 1, 1,
0, -.34413, 1.772,
1.402, -.71414, 0) * yuv;*/
// Using BT.709 which is the standard for HDTV
rgb = mat3( 1, 1, 1,
0, -.18732, 1.8556,
1.57481, -.46813, 0) * yuv;
gl_FragColor = vec4(rgb, 1);
}Very thanks,
-
Why mp4 can not shared on Facebook or Instagram on Android ?
8 janvier 2023, par JánosThis is the file : https://t44-post-cover.s3.eu-central-1.amazonaws.com/2e3s.mp4


When I download and try share, it fails. Why ? This is the parameters was rendered. Downloading and sharing works from iPhone to Facebook on Messenger or Instagram, but not from Android phone to Facebook on Messenger or Instagram.


What parameters
ffpmpeg
need to be able to sharemp4
from Android to Facebook / Instagram ?

await new Promise<void>((resolve, reject) => {
 ffmpeg()
 .setFfmpegPath(pathToFfmpeg)
 .input(`/tmp/input_${imgId}.gif`)
 .inputFormat('gif')
 .inputFPS(30)
 .input('anullsrc')
 .inputFormat('lavfi')
 .audioCodec('aac')
 .audioChannels(2)
 .audioFilters(['apad'])
 .videoCodec('libx264')
 .videoBitrate(1000)
 .videoFilters([
 'tpad=stop_mode=clone:stop_duration=2',
 'scale=trunc(iw/2)*2:trunc(ih/2)*2:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse',
 ])
 .fps(30)
 .duration(5)
 .format('mp4')
 .outputOptions([
 '-pix_fmt yuvj420p',
 '-profile:v baseline',
 '-level 3.0',
 '-crf 17',
 '-movflags +faststart',
 '-movflags frag_keyframe+empty_moov',
 ])
 .output(`/tmp/output_${imgId}.mp4`)
 .on('end', () => {
 console.log('MP4 video generated')
 resolve()
 })
 .on('error', (e) => {
 console.log(e)
 reject()
 })
 .run()
 })
</void>


-
Evolution #3692 : Suivre les évolution de MediaJS
9 avril 2017, par Franck DHello
Bon alors avec après pas mal de tests, en me servant des fichiers audios et vidéos qu’il y a ici : https://github.com/mediaelement/mediaelement-files
Je ne sais pas s’il est vraiment utile, mais il semble qu’il manque encore un fichier qui était dans la lib https://github.com/mediaelement/mediaelement/tree/master/build (jquery.js)
Dans le modèles vidéo (je crois qu’il y a que lui) il y a des références à des fichiers qui ne sont plus dans la dernière version de la lib (flashmediaelement.swf et les skins)
https://zone.spip.org/trac/spip-zone/browser/_core_/plugins/medias/modeles/video.htmlJ’ai pas fait l’essai de l’utilisation du fichier, mediaelement.srt car je sais pas trop comment faire.
En php 5.6.30 chez ovh
Tests fait en SPIP 3.2.0-alpha [23495]
http://www.lien-d-amis.net/spip3/spip07/spip.php?article4Sous windows 10 (les images fonctionnent toujours) :
- Firefox = ok (pas complètement concernant le flv )
- Internet explorer 11 = il ne semble y avoir que les deux mp4, le mp3 et un peu le flv
- Edge = pareil que IE11
- Chrome 57 = pareil que Firefox
- Opera 44 = pareil que Firefox (même si le dernier webm semble avoir été long avant de partir)Sous Iphone 6 avec iOS 10.3.1
- Safari = Il n’y a que les mp4 et le mp3 qui fonctionnent (le mp3 semble long à partir)Pour les skins, je pense que le mieux, c’est sans doute de faire disparaitre les lignes puisqu’il ne sont plus dans la lib, sachant que celui qui en voudra pourra toujours les faire via des thèmes ?
Car même du côté des plugins de la lib, il ne semble pas y en avoir : https://github.com/mediaelement/mediaelement-plugins
Concernant les .flv, il y a deux tickets qui en parle et qui semble vouloir dire que c’est loin d’être simple :
https://github.com/mediaelement/mediaelement/issues/2142
https://github.com/mediaelement/mediaelement/issues/2143Sinon, juste pour info, en SPIP 3.1.4 [23496] donc avec la vielle lib
http://www.lien-d-amis.net/spip3/spip06/spip.php?article5Sous windows 10 (les images fonctionnent toujours) :
- Firefox = ok (sauf flv)
- Internet explorer 11 = il ne semble y avoir que les deux mp4, et le mp3 de ok
- Edge = Le flv fonctionne, même si avec plusieurs manips à la suite, il a planté par moment, il n’y a que les mp4 et mp3 qui fonctionnent
- Chrome 57 = Tout fonctionne, sauf que le flv ou, il n’est pas possible de faire pause en appuyant au milieu de la vidéo en plein écran, il faut obligatoirement, se servir du bouton en bas à gauche
- Opera 44 = Tout fonctionne sauf le flvSous Iphone 6 avec iOS 10.3.1
- Safari = Il n’y a que les mp4 et le mp3 qui fonctionnent (le mp3 semble long avant de partir)
Franck