
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (10)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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 (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)
Sur d’autres sites (5648)
-
FFMPEG error : Error while parsing expression 'PTS-STARTPTS+/TB' while trying to merge two videos with different starting time [closed]
13 octobre 2020, par Sankalpa SarkarI was trying to merge two videos in .webm format side-by-side, with the exception that the second video might start a bit later than the first video, in which case there will be a blank buffer on the right side till it starts. To do that, I deployed the following code :


DIFF=$(($start_ts-$BASEts))
 DIFFms=`echo "scale=0;$DIFF/1000" | bc`
 DIFFs=`echo "scale=4;$DIFF/1000000" | bc`
 ffmpeg -i a.webm -i b.webm -filter_complex \
 "[0]pad=2*iw:1*ih[l];[1]setpts=PTS-STARTPTS+$DIFFs/TB[1v]; [l][1v]overlay=x=W/2[v]; \
 [1]adelay=$DIFFms|$DIFFms[1a]; \
 [0][1a]amix=inputs=2[a]" \
 -map "[v]" -map "[a]" -vcodec libvpx -cpu-used -5 -deadline realtime finalOutput.webm



However, I keep getting this error :


[Parsed_setpts_1 @ 0x5598b680cdc0] [Eval @ 0x7ffcb6ae1550] Undefined constant or missing '(' in '/TB'
[Parsed_setpts_1 @ 0x5598b680cdc0] Error while parsing expression 'PTS-STARTPTS+/TB'
[AVFilterGraph @ 0x5598b67872a0] Error initializing filter 'setpts' with args 'PTS-STARTPTS+/TB'
Error initializing complex filters.
Invalid argument



It is not recognizing the DIFFs variable at all and is hence unable to process the code. I tried replacing the entire setpts in a different variable as well and using it in setpts while merging. That process did not work either


-
Decoded YUV shows green edge when rendered with OpenGL
2 février 2023, par AlexAny idea, why decoded YUV -> RGB(shader conversion) has that extra green edge on the right side ?

Almost any 1080X1920 video seems to have this issue.



A screen recording of the issue is uploaded here https://imgur.com/a/JtUZq4h


Once I manually scale up the texture width, I can see it fills up to the viewport, but it would be nice if I could fix the actual cause. Is it some padding that's part of YUV colorspace ? What else could it be ?


My model is -1 to 1, filling the entire width

The texture coordinates are also 0 to 1 ratio

float vertices[] = {
 -1.0, 1.0f, 0.0f, 0.0, // top left
 1.0f, 1.0f, 1.0, 0.0, // top right
 -1.0f, -1.0f, 0.0f, 1.0f, // bottom left
 1.0f, -1.0f, 1.0f, 1.0f // bottom right
};



Fragment Shader


#version 330 core

in vec2 TexCoord;

out vec4 FragColor;
precision highp float;
uniform sampler2D textureY;
uniform sampler2D textureU;
uniform sampler2D textureV;
uniform float alpha;
uniform vec2 texScale;


void main()
{
 float y = texture(textureY, TexCoord / texScale).r;
 float u = texture(textureU, TexCoord / texScale).r - 0.5; 
 float v = texture(textureV, TexCoord / texScale).r - 0.5;
 
 vec3 rgb;
 
 //yuv - 709
 rgb.r = clamp(y + (1.402 * v), 0, 255);
 rgb.g = clamp(y - (0.2126 * 1.5748 / 0.7152) * u - (0.0722 * 1.8556 / 0.7152) * v, 0, 255);
 rgb.b = clamp(y + (1.8556 * u), 0,255);

 FragColor = vec4(rgb, 1.0);
} 



Texture Class


class VideoTexture {
 public:
 VideoTexture(Decoder *dec) : decoder(dec) {
 glGenTextures(1, &texture1);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 glBindTexture(GL_TEXTURE_2D, texture1);
 glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, decoder->frameQueue.first().linesize[0], decoder->frameQueue.first().height, 0, format, GL_UNSIGNED_BYTE, 0);
 glGenerateMipmap(GL_TEXTURE_2D);

 glGenTextures(1, &texture2);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 glBindTexture(GL_TEXTURE_2D, texture2);
 glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, decoder->frameQueue.first().linesize[1], decoder->frameQueue.first().height / 2, 0, format, GL_UNSIGNED_BYTE, 0);
 glGenerateMipmap(GL_TEXTURE_2D);

 glGenTextures(1, &texture3);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 glBindTexture(GL_TEXTURE_2D, texture3);
 glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, decoder->frameQueue.first().linesize[2], decoder->frameQueue.first().height / 2, 0, format, GL_UNSIGNED_BYTE, 0);
 glGenerateMipmap(GL_TEXTURE_2D);
 }

 void Render(Shader *shader, Gui *gui) {
 if (decoder->frameQueue.isEmpty()) {
 return;
 }

 glActiveTexture(GL_TEXTURE0);
 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, decoder->frameQueue.first().linesize[0], decoder->frameQueue.first().height, format, GL_UNSIGNED_BYTE, decoder->frameQueue.at(currentFrame).data[0]);
 glBindTexture(GL_TEXTURE_2D, texture1);
 shader->setInt("textureY", 0);

 glActiveTexture(GL_TEXTURE1);
 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, decoder->frameQueue.first().linesize[1], decoder->frameQueue.first().height / 2, format, GL_UNSIGNED_BYTE, decoder->frameQueue.at(currentFrame).data[1]);
 glBindTexture(GL_TEXTURE_2D, texture2);
 shader->setInt("textureU", 1);

 glActiveTexture(GL_TEXTURE2);
 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, decoder->frameQueue.first().linesize[2], decoder->frameQueue.first().height / 2, format, GL_UNSIGNED_BYTE, decoder->frameQueue.at(currentFrame).data[2]);
 glBindTexture(GL_TEXTURE_2D, texture3);
 shader->setInt("textureV", 2);
 }

 ~VideoTexture() {
 printf("\nVideo texture destructor");
 glDeleteTextures(1, &texture1);
 glDeleteTextures(1, &texture2);
 glDeleteTextures(1, &texture3);
 }

 private:
 GLuint texture1;
 GLuint texture2;
 GLuint texture3;
 GLint internalFormat = GL_RG8;
 GLint format = GL_RED;
 int currentFrame = 0;
 Decoder *decoder;
}



-
FFmpeg - Xstack mutiple inputs for mosaic video output - extra output Blank screen is always green
16 août 2020, par DennisskiI have a website where we combine multple videos with ffmpeg xstack. Its an automated process. When there is not an even number of videos the blank tiles in the mosaic are green. I am trying to figure out how to make the spare blanks Black.


I have tried
xstack=inputs=2:fill='black':layout=0_0
(this gives an error object not found) also tried-filter_complex "color=s=1920x1080:c=black"
.

Any suggestions ? Here is entire command :


ffmpeg -i video1 -i video1 -i video1 -i video1 -i video1 -i video1 -i video1 \ 
 -i video1 -i video1 -filter_complex \
 "color=s=1920x1080:c=black;[0:v] setpts=PTS-STARTPTS, scale=qvga [a0];[1:v] setpts=PTS-STARTPTS, scale=qvga [a1];[2:v] setpts=PTS-STARTPTS, scale=qvga [a2];[3:v] setpts=PTS-STARTPTS, scale=qvga [a3];[4:v] setpts=PTS-STARTPTS, scale=qvga [a4];[5:v] setpts=PTS-STARTPTS, scale=qvga [a5];[6:v] setpts=PTS-STARTPTS, scale=qvga [a6];[7:v] setpts=PTS-STARTPTS, scale=qvga [a7];[8:v] setpts=PTS-STARTPTS, scale=qvga [a8];[a0][a1][a2][a3][a4][a5][a6][a7][a8]xstack=inputs=9:layout=0_0|w0_0|w0+w1_0|0_h0|w0_h0|w0+w1_h0|0_h0+h1|w0_h0+h1|w0+w1_h0+h1[out] " \
 -map "[out]" output