Quantcast
Channel: MediaSPIP
Viewing all 117762 articles
Browse latest View live

Anomalie #3814 (Nouveau): Onglet {Mes articles} erroné en SPIP3.0

$
0
0

Je rencontre le soucis avec SPIP 3.0.22 reproduis sur deux versions du même site (prod et dev). Je n'ai pas eu de réponse sur la liste. J'ignore si ici est le bon endroit pour signaler ce genre de problème, alors merci de votre bienveillance.

Dans la partie privée, l'onglet mes articles de la page articles affiche des information incorrectes, c'est à dire des article qui ne sont pas forcément de l'auteur passé en paramètre.

En explorant avec le mode debug, voila ce que j'ai découvert :

la boucle telle que prévue initialement est :

Elle donne le code suivant :

SELECT articles.id_article, 0 as points, '', articles.titre, articles.statut, articles.id_rubrique, articles.titre AS titre_rang, articles.lang, articles.date, articles.id_rubrique, articles.id_article
FROM info_articles AS `articles` INNER JOIN info_evenements AS L2 ON ( L2.id_article = articles.id_article )
WHERE (L2.id_auteur = 3) AND ((articles.statut IN ('prepa','publie','refuse','prepa')))
GROUP BY articles.id_article
ORDER BY articles.date DESC, articles.titre

Je ne comprends pas la raison du recours à la table événements. et j'y vois une raison des résultats aberrant de la boucle

Si par contre Je modifie la boucle avec une jointure :

Cela me donne un code plus encourageant :

SELECT articles.id_article, 0 as points, '', articles.titre, articles.statut, articles.id_rubrique, articles.titre AS titre_rang, articles.lang, articles.date, articles.id_rubrique, articles.id_article
FROM info_articles AS `articles` INNER JOIN info_auteurs_liens AS L2 ON ( L2.id_objet = articles.id_article AND L2.objet='article')
WHERE (L2.id_auteur = 3) AND ((articles.statut IN ('prepa','publie','refuse','prepa')))
GROUP BY articles.id_article
ORDER BY articles.date DESC, articles.titre

et surtout le résultat est conforme à mes attentes.

Quelqu'un pourra-t'il éclaircir la raison de ce mystère ?


Anomalie #3814: Onglet {Mes articles} erroné en SPIP3.0

$
0
0

Bonsoir,

Tu utilises des plugins précis pour avoir ce problème ?

Anomalie #3814: Onglet {Mes articles} erroné en SPIP3.0

$
0
0

J'ai effectivement un ensemble de plugins installés, mais j'ai déja pu
évacuer agenda et inscription 2.5 comme source puisqu'un autre
internaute à testé avec ces deux plugins et ne reproduis pas.

Le 09/08/2016 21:01, a écrit :

La demande #3814 a été mise à jour par Pierre KUHN.

Bonsoir,

Tu utilises des plugins précis pour avoir ce problème ?


Anomalie #3814: Onglet {Mes articles} erroné en SPIP3.0
<https://core.spip.net/issues/3814#change-11946>

  • Auteur: Olivier Dutertre
  • Statut: Nouveau
  • Priorité: Normal
  • Assignéà:
  • Catégorie: base de données
  • Version cible: 3.0
  • Resolution:
  • Navigateur:

Je rencontre le soucis avec SPIP 3.0.22 reproduis sur deux versions du
même site (prod et dev). Je n'ai pas eu de réponse sur la liste.
J'ignore si ici est le bon endroit pour signaler ce genre de problème,
alors merci de votre bienveillance.

Dans la partie privée, l'onglet /mes articles/ de la page /articles/
affiche des information incorrectes, c'est à dire des article qui ne
sont pas forcément de l'auteur passé en paramètre.

En explorant avec le mode debug, voila ce que j'ai découvert :

la boucle telle que prévue initialement est :

Elle donne le code suivant :

SELECT articles.id_article, 0 as points, '', articles.titre, articles.statut, articles.id_rubrique, articles.titre AS titre_rang, articles.lang, articles.date, articles.id_rubrique, articles.id_article
FROM info_articles AS `articles`
INNER JOIN info_evenements AS L2 ON ( L2.id_article = articles.id_article )
WHERE (L2.id_auteur = 3)
AND ((articles.statut IN ('prepa','publie','refuse','prepa')))
GROUP BY articles.id_article
ORDER BY articles.date DESC, articles.titre

Je ne comprends pas la raison du recours à la table événements. et j'y
vois une raison des résultats aberrant de la boucle

Si par contre Je modifie la boucle avec une jointure :

auteurs_liens){id_article?}{id_rubrique?}{id_mot?}{id_auteur?}{where?}{statut?}{recherche?}{tri #ENV{par,date},#GET{defaut_tri}}{par titre}{pagination #ENV{nb,10}}{!lang_select}>

Cela me donne un code plus encourageant :

SELECT articles.id_article, 0 as points, '', articles.titre, articles.statut, articles.id_rubrique, articles.titre AS titre_rang, articles.lang, articles.date, articles.id_rubrique, articles.id_article
FROM info_articles AS `articles`
INNER JOIN info_auteurs_liens AS L2 ON ( L2.id_objet = articles.id_article AND L2.objet='article')
WHERE (L2.id_auteur = 3)
AND ((articles.statut IN ('prepa','publie','refuse','prepa')))
GROUP BY articles.id_article
ORDER BY articles.date DESC, articles.titre

et surtout le résultat est conforme à mes attentes.

Quelqu'un pourra-t'il éclaircir la raison de ce mystère ?


Vous recevez ce mail car vous êtes impliqués sur ce projet.
Pour changer les préférences d'envoi de mail, allez sur
http://core.spip.org/my/account

errors when compiling c code with ffmpeg library

$
0
0

I've installed ffmpeg library in my new ubuntu 16.04 OS. When I tried to compile my c code, I got the following strange errors:

/home/widerstand/ffmpeg_build/lib/libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_free':
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:861: undefined reference to `XCloseDisplay'
/home/widerstand/ffmpeg_build/lib/libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_create':
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:891: undefined reference to `XOpenDisplay'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:896: undefined reference to `vaGetDisplay'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:903: undefined reference to `XDisplayName'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:893: undefined reference to `XDisplayName'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:917: undefined reference to `vaGetDisplayDRM'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:891: undefined reference to `XOpenDisplay'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:893: undefined reference to `XDisplayName'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vaapi.c:898: undefined reference to `XDisplayName'
/home/widerstand/ffmpeg_build/lib/libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_create':
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:431: undefined reference to `XOpenDisplay'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:437: undefined reference to `XDisplayString'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:439: undefined reference to `XDefaultScreen'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:439: undefined reference to `vdp_device_create_x11'
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:433: undefined reference to `XDisplayName'
/home/widerstand/ffmpeg_build/lib/libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_free':
/home/widerstand/ffmpeg_sources/ffmpeg/libavutil/hwcontext_vdpau.c:410: undefined reference to `XCloseDisplay'
collect2: error: ld returned 1 exit status
Makefile:30: recipe for target 'video_analysis' failed
make: *** [video_analysis] Error 1

I've reinstalled ffmpeg library multiple times using the following configurations:

PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ --prefix="$HOME/ffmpeg_build" \ --pkg-config-flags="--static" \ --extra-cflags="-I$HOME/ffmpeg_build/include" \ --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ --bindir="$HOME/bin" \ --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopus \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ --enable-libx264 \ --enable-nonfree
PATH="$HOME/bin:$PATH" make

The installation process was successful each time. But when I tried to compile my own c code, I always encountered the same errors as mentioned above. I have no idea about that...

FFMPEG: ‘PIX_FMT_BGR24' was not declared in this scope

$
0
0

I am building a simple decoding application using FFMPEG API. I know there are solutions available in OpenCV but for specific reason I am refraining myself from using that. Since I am very new to FFMPEG (and to this community as well), I would like to know if there is any mistake that I might have done while building FFMPEG.

Compiler: I am using gcc 5.3.0 for compilation and building.

Following are the steps that I followed:

  1. I have build FFMPEG library using following configuration:

    ./configure --prefix=/home/dep/ffmpeg/install/ --pkg-config-flags=--static --enable-gpl --disable-yasm

  2. My compiling command is for the application:

    g++ -std=c++11 -I/home/dep/ffmpeg/install/include/ Queue.cpp Image.cpp CaptureFFMPEGFrame.cpp Object.cpp main.cpp -o main -L/home/dep/ffmpeg/install/lib -lavutil -lavcodec -lavformat -lavdevice -lavfilter -lswscale -lswresample -lpostproc -lpthread -lz -lrt -llzma -lbz2

The error I am facing is :

CaptureFFMPEGFrame.cpp:203:169: error: ‘PIX_FMT_BGR24' was not declared in this scope mpFrameSwsContext = sws_getContext(mpAVCodecContext->width, mpAVCodecContext->height, mpAVCodecContext->pix_fmt, mpAVCodecContext->width, mpAVCodecContext->height, PIX_FMT_BGR24, SWS_BICUBIC, NULL, NULL, NULL)

My effort and understanding:

  1. From my understanding, libavutil/pixfmt.h contains pixel formats which I included along with other includes and the error persists. You can also see libraries I have included along with my application.

  2. Since my program is cpp code, therefore my headers are already included using extern "C", i.e. #include "libavcodec/avcodec.h"

Anything I might have missed?

Many thanks.

Anomalie #3814: Onglet {Mes articles} erroné en SPIP3.0

$
0
0

Salut, il n'y a aucune occurrence de la chaîne "info_evenements" dans le core les plugins-dist. De plus, aucun plugin de la zone ne déclare un champ de ce nom, du coup ça doit certainement venir d'un code perso dans ton instance.

Bref, tout ça me fait penser que le ticket est invalide et qu'on devrait le fermer ;)

Anomalie #3814: Onglet {Mes articles} erroné en SPIP3.0

$
0
0

b b a écrit :

Salut, il n'y a aucune occurrence de la chaîne "info_evenements" dans le core les plugins-dist. De plus, aucun plugin de la zone ne déclare un champ de ce nom, du coup ça doit certainement venir d'un code perso dans ton instance.

Bref, tout ça me fait penser que le ticket est invalide et qu'on devrait le fermer ;)

Anomalie #3814: Onglet {Mes articles} erroné en SPIP3.0

$
0
0

Il faut sans doute regarder plutot spip_evenements (info étant un prefixe utilisé par notre site en partage de base). Si ça ce confirme qu'il n'y a aucune trace, je conçois que la demande n'a pas de raison d'être.

Comment je la ferme ?


doc/filters: add one more lutyuv example

$
0
0
doc/filters: add one more lutyuv example
  • [DH] doc/filters.texi

avfilter/drawutils: Fix single plane with alpha

$
0
0
avfilter/drawutils: Fix single plane with alpha Fixes Ticket5720 Signed-off-by: Michael Niedermayer 
  • [DH] libavfilter/drawutils.c

compatible Android AudioEncoder and pydub decoder

$
0
0

I am recording an audio in android in mp3 format and to do that I am using MPEG_4 as an Output Format while AAC as an AudioEncoder and It does record an audio.

The problem is when I am using that file for further processing in python pydub it could not decode the audio amd gives me error something like this:

CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Even though I have ffmpeg installed. I have also tried different audio encoder such as AMR_NB but problem is still the same. It couldnt decode the audio.

Here is what I am doing in pydub:

sound = AudioSegment.from_mp3("test.mp3") da = np.fromstring(sound.raw_data, dtype=np.int16)

Does anyone have idea what could be the proper AudioEncoder for recording mp3 audio?

Mix 2 videos with FFmpeg (overlay one on top of other)

$
0
0

I using ffmpeg through Android-NDK. I've 2 pieces of the videos , The first one is my main video and the second one is my effect video.

Now I wanna mix this 2 videos together, Is it possible ?

Note : Both videos decoding through MP4 format.

aiff: Skip padding byte for odd-sized chunks

$
0
0
aiff: Skip padding byte for odd-sized chunks Bug-Id: 660
  • [DBH] libavformat/aiffdec.c

libavformat/mxfenc: add UID for unconstrained H.264 coded video in baseline profile

$
0
0
libavformat/mxfenc: add UID for unconstrained H.264 coded video in baseline profile Enable the MXF muxer to mux baseline H.264 video streams. Signed-off-by: Matthias Hunstock 
Signed-off-by: Michael Niedermayer 
  • [DH] libavformat/mxfenc.c

Merging Many Webms With FFMPEG

$
0
0

We've been trying to merge multiple webms together so that they play in series in a new webm using FFMPEG. These webms are from multiple sources (webcams), so the resolution will vary.

We're using these options, it works perfectly for 3 files. But, we need to be able to do it for n number video files.

-filter_complex "[1:v]scale=640:-1[v1]; [0:v][0:a][v1][1:a][2:v]
[2:a]concat=n=3:v=1:a=1[v][a]" -map "[v]" -map "[a]"

FFMPEG Encode webcam to webm videos

$
0
0

I am building a screen recorder that captures the screen from Chrome then encode the video to webm extension using FFMPEG.

The code below handles each frame I get from Chrome, I convert it to unit8_t I also have buffer size and frame size. The thread is working and I am handling all the frames correctly.

I tired this these two sample codes to encode frames into a video https://ffmpeg.org/doxygen/trunk/encoding-example_8c-source.htmlhttps://www.ffmpeg.org/doxygen/0.6/output-example_8c-source.html

but I failed,

I want help to achieve the following

1- Register only VP8 codec, I do not want to register all codecs because I am not using all of them. (The compilation time takes to long to link all codecs)

2- Write frames to a context in the function write_frame(const uint8_t * data, uint32_t size, int w, int h,float timestamp)

3- Encoding the video and store it.

I think I will make this code open source since many people asked for it using Google Native Client but I do not have enough experience with FFMPEG so I need some help

void OnGetFrame(int32_t result, pp::VideoFrame frame) { if (result != PP_OK) { LogToConsole(PP_LOGLEVEL_ERROR, pp::Var("OnGetFrame error")); } //get the bufffer data const uint8_t* data = static_cast(frame.GetDataBuffer()); pp::Size size; frame.GetSize(&size); if (!attrib_width_ || !attrib_height_) { //initialize width, height and starttime attrib_starttime_ = frame.GetTimestamp(); attrib_width_ = size.width(); attrib_height_ = size.height(); } //DO SOMETHING WITH THE FRAME if (is_recording_) { uint32_t buffersize = frame.GetDataBufferSize(); frames_counter_++; write_frame(data, buffersize, size.width(), size.height(), frame.GetTimestamp()); } else return; //THEN DISPOSE IT video_track_.RecycleFrame(frame); //make sure tracks are configured properly if (need_config_) { ConfigureTrack(); return; } else { //AND REQUEST A NEW FRAME video_track_.GetFrame( callback_factory_.NewCallbackWithOutput( &EncoderInstance::OnGetFrame)); } } void write_frame(const uint8_t * data, uint32_t size, int w, int h, float timestamp) { PostMessage("LOG:: Writing Frame \n"); }
-- https://ffmpeg.org/doxygen/trunk/encoding-example_8c-source.html, https://www.ffmpeg.org/doxygen/0.6/output-example_8c-source.html

Custom real-time input for ffmpeg in C

$
0
0

I'm implementing a custom io with avformat_alloc_context and avio_alloc_context to be able to read the output of another function in real-time. A buffer is populated by this function in a boost asio thread, while ffmpeg is reading this buffer from another thread.

I initialise an io buffer where this function writes into, and which ffmpeg reads:

BufferData input_buffer = {0};
input_buffer.size = 65536;
input_buffer.ptr = (uint8_t *) av_malloc(buf_size);
memset(input_buffer.ptr,'0',100); fprintf(stdout, "initialisation: buffer pointer %p buffer data pointer: %p\n", &input_buffer, input_buffer.ptr);

Why i do the memset is explained here. Then to test out the pointer address I did:

BufferData * decode_buffer;
decode_buffer->size = 65536;
decode_buffer->ptr = (uint8_t *) av_malloc(decode_buffer->size); AVIOContext * av_io_ctx = avio_alloc_context(decode_buffer->ptr, decode_buffer->size, 0, &input_buffer, &read_function, NULL, NULL); AVFormatContext *av_fmt_ctx = avformat_alloc_context();
av_fmt_ctx->pb = av_io_ctx; BufferData * tmpPtr = (BufferData * ) video_input_file->av_io_ctx->opaque; fprintf(stdout, "video decoder before: buffer pointer %p, buffer data pointer: %p\n", tmpPtr, tmpPtr->ptr); open_res = avformat_open_input(&av_fmt_ctx, "anyname", in_fmt, options ? &options : NULL); fprintf(stdout, "video decoder after: buffer pointer %p, buffer data pointer: %p\n", tmpPtr, tmpPtr->ptr);

For reference

typedef struct { uint8_t *ptr; size_t size;
} BufferData;

The read function

static int read_function(void* opaque, uint8_t* buf, int buf_size) { BufferData *bd = (BufferData *) opaque; buf_size = FFMIN(buf_size, bd->size); memcpy(buf, bd->ptr, buf_size); bd->ptr += buf_size; //This seemed to cause the problem bd->size -= buf_size; return buf_size;
}

And the result will be:

initialisation: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c48c56040 video decoder before: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c48c56040 video decoder after: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c49e24b50

Is it a normal behaviour that the buffer data ptr is changed by avformat_open_input? since I would like to keep the initial pointer address given I am using it in another function, and have malloced it the required memory.

Anomalie #3815 (Nouveau): sql_updateq qui ne fait pas de jointure

$
0
0

Bonjour,

Suite à des tests, je remarque que sql_updateq n'applique pas de jointures (explicites) sur les SET.

Un exemple de comparaison, voici une requête faite avec sql_allfetsel :
sql_allfetsel('mots.id_mot, mots.id_groupe,mots.titre,groupes.titre as type', 'spip_mots as mots, spip_groupes_mots as groupes', 'mots.id_groupe=groupes.id_groupe', '', '', '', '', '', false);
Lancera la requête SQL :
SELECT mots.id_mot, mots.id_groupe,mots.titre,groupes.titre as type FROM spip_mots as mots, spip_groupes_mots as groupes WHERE mots.id_groupe=groupes.id_groupe

Tandis que sql_updateq :
sql_updateq('spip_mots as mots, spip_groupes_mots as groupes', array('mots.type' =>'groupes.titre'), "mots.id_groupe=groupes.id_groupe", '', '', false);
Lancera la requête SQL :
UPDATE spip_mots as mots, spip_groupes_mots as groupes WHERE mots.id_groupe=groupes.id_groupe

Ce qui forcément crée une erreur SQL car il n'y a pas de SET.
La requête attendue serait celle-ci :
UPDATE spip_mots as mots, spip_groupes_mots as groupes SET mots.type=groupes.titre WHERE mots.id_groupe=groupes.id_groupe

Soit je n'utilise pas correctement cette fonction, soit elle a du mal à interpréter les expressions du SET.

Qu'en pensez-vous ?

Anomalie #3814 (Fermé): Onglet {Mes articles} erroné en SPIP3.0

$
0
0

Je viens de vérifier sur un SPIP 3.0.22 svn avec des plugins à jour et la boucle ne mentionne pas la table événements, cf :

SELECT articles.id_article, 0 as points, '', articles.titre, articles.lang, articles.statut, articles.id_rubrique, articles.titre AS titre_rang, articles.date
FROM spip_articles AS `articles` INNER JOIN spip_auteurs_liens AS L2 ON ( L2.id_objet = articles.id_article AND L2.objet='article')
WHERE (L2.id_auteur = 1) AND ((articles.statut IN ('prepa','prop','publie','refuse','prepa'))) AND articles.id_rubrique>0
GROUP BY articles.id_article
ORDER BY articles.date DESC, articles.titre

On ferme :)

Anomalie #3815: sql_updateq qui ne fait pas de jointure

Viewing all 117762 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>