Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (39)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (6271)

  • CJEU rules US cloud servers don’t comply with GDPR and what this means for web analytics

    17 juillet 2020, par Jake Thornton

    Breaking news : On July 16, 2020, the Court of Justice of the European Union (CJEU) has ruled that any cloud services hosted in the US are incapable of complying with the GDPR and EU privacy laws.

    In August 2016, the EU-US Privacy Shield framework came into effect, which “protects the fundamental rights of anyone in the EU whose personal data is transferred to the United States for commercial purposes. It allows the free transfer of data to companies that are certified in the US under the Privacy Shield.” – European Commission website

    However after today’s CJEU ruling, this Privacy Shield framework became invalidated due to significant differences between EU and US privacy laws.

    European privacy law activist Max Schrems summarises with “The Court clarified for a second time now that there is a clash between EU privacy law and US surveillance law. As the EU will not change its fundamental rights to please the NSA, the only way to overcome this clash is for the US to introduce solid privacy rights for all people – including foreigners. Surveillance reform thereby becomes crucial for the business interests of Silicon Valley.” – noyb website

    Today’s ruling also continues to spark concern into the legitimacy of US privacy laws which doesn’t fully protect people’s personal data when hosted on cloud servers based in the US.

    Web analytics hosted on US cloud servers don’t comply with GDPR

    How will this affect you ?

    For any business operating a website in the EU or if you have traffic coming to your website from EU visitors, you need to know what data you’re capturing and where this data is being stored.

    Here’s what Maja Smoltczyk (Berlin’s Commissioner for Data Protection and Freedom of Information) says :

    Controllers who transfer personal data to the USA, especially when using cloud-based services, are now required to switch immediately to service providers based in the European Union or a country that can
    ensure an adequate level of data protection. 
    The CJEU has made it refreshingly clear that data exports are not just financial decisions, as people’s fundamental rights must also be considered as a matter of priority. This ruling will put
    an end to the transfer of personal data to the USA
    for the sake of convenience or to cut costs.

    The controller is you (not Google) and by transferring data to the US you are at risk of being fined up to €20 million or 4% of your annual worldwide turnover for not being GDPR compliant. 

    It’s you who has to take action, not Google or other US companies. The court’s decision has immediate effect. While we assume there will be a grace period, companies should act now as finding and implementing alternatives solution can take a while. 

    Can no data be exported outside the EU anymore ?

    Data can still be exported outside the EU if an adequate level of data protection is guaranteed. This is the case for some trading partners of the EU such as New Zealand, Japan, Switzerland, and Canada. They have been certified by the EU as having a comparable level of privacy protection and therefore demonstrate adequacy at a country level.

    Necessary data can still flow to countries like the US too. This is for example the case when someone books a hotel in the US or when sending an email to someone in the US. Backups for disaster recovery and most other reasons don’t qualify as necessary.

    In all other cases you can still send data to countries like the US if you get explicit and informed consent from a user. Meaning the user has been informed about all possible risks of sending the data to the US and who can access the data (for example the US government).

    How this affects Google Analytics and Google Tag Manager users

    If your website is using Google Analytics, the safest bet is to deactivate it immediately. Otherwise, you must ask for consent from everyone who visits your website and inform them that the data will be processed in the United States under less strict privacy laws and all associated risks. If you don’t, you could be liable to privacy law infringements and face being fined for not complying with the GDPR. This also applies to Google Tag Manager as it transfers the IP address to the US which is considered personal data under the GDPR.

    Consent needs to be :

    • Freely given (the user must have a choice to not give consent and be able to opt out at any time) 
    • Informed (you need to disclose who is processing the data, what data is processed, where the data will be stored and how to opt out) 
    • Specific (consent is only valid for the specific informed purpose) 
    • Unambiguous (for example pre-ticked boxes or similar aren’t allowed)
    Web analytics that complies with GDPR

    If users don’t give you consent, you are not allowed to track them using Google Analytics or any other US based cloud solution.

    Update August 19, 2020

    A month after this ruling, over 100 complaints have been filed against websites for continuing to send data to the US via Google Analytics or Facebook, by the European privacy campaign group noyb. It’s clear Google and Facebook fall under US surveillance laws such as FISA 702 and the court clearly ruled these companies cannot rely on SCCs to transfer data to the US. Anyone still using Google Analytics is now at risk of facing fines and compensation damages

    How this affects Matomo users

    Our cloud servers are based in Germany.

    Matomo On-Premise users choose the location of their data themselves. If the servers are located in the EU nothing changes. If the servers are located outside the EU and the website targets EU users and tracks personal data, then you need to assess whether you are required to ask for tracking consent.

    If the data is stored inside the EU you can use Matomo without asking for any consent and you can continue tracking users even if they reject a consent screen which greatly increases the quality of your data.

    Want to avoid informing users about transferring their data to the US and all associated risks ?

    Try Matomo now for free ! No credit card required.

  • Q. FFMPEG - linux (Rasberry pi 4- Raspbian)- FFMPEG av_read_frame error

    5 juin 2020, par KNS

    User environment

    



    -Raspberry Pi 4B 4G x2

    



    -arm32 & arm64

    



    -OS : Raspbian

    



    -gcc (Raspbian 8.3.0-6+rpi1) 8.3.0

    



    -ffmpeg version 4.1.4-1+rpt7 deb10u1
 built with gcc 8 (Raspbian 8.3.0-6+rpi1)

    



    -IDE-visual studio 2017-ssh connetction

    



    Good morning. I have a question and post it.

    



    When Raspbian is installed, the installed FFMPEG library is used.

    



    I want to output a video display - file encoded in h264 using gtk3.0.

    



    When I open the video file & find the codec and try to read the frame,
I get an error and I'm asking.Error symptoms

    



      

    1. AVPacket struct memory padding ? error
    2. 


    



    2.AVPacket-data error:Cannot access memory at address 0xxxxxxxxxxxx>

    



      

    1. AVPacket-stream_index value error- The stream_index and flags values ​​seem to have been reversed.
    2. 


    



    my source code and error photos are attached.
Thank you.

    



    case 1 stream_index error (flags value ->stream_index)

    



    enter image description here

    



    case 2 data memory access error

    



    enter image description here

    



    typedef struct _struMovContext2
{
AVFormatContext*    pFormatCtx;
AVCodecContext*     pVCodecCtx;
AVCodecContext*     pACodecCtx;
AVCodec*            pVCodec;
AVCodec*            pACodec;
int                 nVStreamIndex;
int                 nAStreamIndex;
struct SwsContext*  pSwsCtx;
GtkWidget*          pImage;
pthread_t           tID;    
}MovContext2;

static MovContext2      Ctx;

static void pixmap_destroy_nf(guchar *pixels, gpointer data)
{
    printf("Destroy pixmap - not sure how\n");
}

static void* PlayBackGround(void* pData)
{
MovContext2*    pCtx = NULL;
GdkPixbuf*      pixbuf = NULL;
GError*         error = NULL;   
int             nFrameWidth, nFrameHeight;
int             nFrameEos = 0;
AVFrame*        pFrame = NULL;
AVFrame*        pPicture_RGB = NULL;
AVPacket        packet;
uint8_t*        pBuffer = NULL;

cairo_surface_t*    surface = NULL;
cairo_t*            cr = NULL;

//if ((pCtx = static_cast(pData)) == NULL)
pCtx = &Ctx;
if(pCtx == NULL)
{
    av_log(NULL, AV_LOG_ERROR, "Couldn't get context struct - Data nullpointer");
    return NULL;
}

printf("In Thread - PlayBackGround\n");


if ((pFrame = av_frame_alloc()) == NULL)
{
    av_log(NULL, AV_LOG_ERROR, "Couldn't alloc frame");
    return NULL;
}

if ((pPicture_RGB = av_frame_alloc()) == NULL)
{
    av_log(NULL, AV_LOG_ERROR, "Couldn't alloc Picture RGB");
    return NULL;
}

if ((pBuffer = (uint8_t*)malloc(avpicture_get_size(AV_PIX_FMT_RGB24, 1920, 1080))) == NULL)
{
    av_log(NULL, AV_LOG_ERROR, "Couldn't malloc data buffer");
    return NULL;
}
avpicture_fill((AVPicture*)pPicture_RGB, pBuffer, AV_PIX_FMT_RGB24, 1920, 1080);*/

av_init_packet(&packet);    
packet.data = NULL;
packet.size = 0;

//packet = *av_packet_alloc();

while (av_read_frame(pCtx->pFormatCtx, &packet) >= 0)
{
    printf("Read packet stream index : %d\n", packet.stream_index);

    if (packet.stream_index == pCtx->nVStreamIndex)
    {
        //av_usleep(33670);

        printf("Decoding to frame start\n");
        if (avcodec_decode_video2(pCtx->pVCodecCtx, pFrame, &nFrameEos, &packet) < 0)
        {
            av_log(NULL, AV_LOG_ERROR, "Decod video error");
            return NULL;
        }
        printf("Decoding to frame end\n");

        nFrameWidth = pCtx->pVCodecCtx->width;
        nFrameHeight = pCtx->pVCodecCtx->height;

        printf("frame Width : %d, Height : %d\n", nFrameWidth, nFrameHeight);

        pCtx->pSwsCtx = sws_getContext(nFrameWidth,
            nFrameHeight,
            pCtx->pVCodecCtx->pix_fmt,
            nFrameWidth,
            nFrameHeight,
            AV_PIX_FMT_RGB24,
            SWS_BICUBIC,
            NULL, NULL, NULL);

        printf("sws Get context\n");

        if (nFrameEos > 0)
        {
            sws_scale(  pCtx->pSwsCtx,
                        pFrame->data,
                        pFrame->linesize,
                        0,
                        nFrameHeight,
                        pPicture_RGB->data,
                        pPicture_RGB->linesize);

            printf("sws set scale\n");

            pixbuf = gdk_pixbuf_new_from_data(pPicture_RGB->data[0],
                GDK_COLORSPACE_RGB,
                0,
                8,
                nFrameWidth,
                nFrameHeight,
                pPicture_RGB->linesize[0],
                pixmap_destroy_nf,
                NULL);

            printf("create pixbuf from frame data\n");

            gtk_image_set_from_pixbuf((GtkImage*)pCtx->pImage, pixbuf);

            g_object_unref(pixbuf);
            cairo_surface_destroy(surface);
            cairo_destroy(cr);

            //gdk_threads_leave();

        }
        av_free_packet(&packet);
    }
}


printf("Exit Thread\n");

return NULL;
}


int main(int argc, char *argv[])
{
GtkWidget*          overlay;
GtkWidget*          eventBox;
GError*             err = NULL;
CMonitorManager*    pManager;
GdkRectangle        Rect;
char*               pFileURI = "/home/pi/test.mp4";
//char*             pFileURI = "/home/ubuntu/test.mp4";
//char*             pFileURI = "/home/ubuntu/cev.avi";
int                 nIndex;
//MovContext2           Ctx;

//XInitThreads();   
memset(&Ctx, 0x00, sizeof(Ctx));
av_register_all();

if (avformat_open_input(&Ctx.pFormatCtx, pFileURI, NULL, NULL) != 0)
{
    av_log(NULL, AV_LOG_ERROR, "Couldn't open file");
    return FALSE;
}
printf("C - open uri\n");

if (avformat_find_stream_info(Ctx.pFormatCtx, NULL) != 0)
{
    av_log(NULL, AV_LOG_ERROR, "Couldn't find stream information");
    return FALSE;
}
printf("C - find stream info\n");

av_dump_format(Ctx.pFormatCtx, 0, pFileURI, 0);
printf("C - media dump\n");

Ctx.nVStreamIndex = av_find_best_stream(Ctx.pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
if (Ctx.nVStreamIndex == AVERROR_STREAM_NOT_FOUND)
{
    for (nIndex = 0; nIndex < Ctx.pFormatCtx->nb_streams; nIndex++)
    {
        if (Ctx.pFormatCtx->streams[nIndex]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
        {
            Ctx.nVStreamIndex = nIndex;
            break;
        }
    }

    if (Ctx.nVStreamIndex < 0)
    {
        av_log(NULL, AV_LOG_ERROR, "Didn't find a video stream");
        return FALSE;
    }
}
printf("C - get video stream index\n");

Ctx.nAStreamIndex = av_find_best_stream(Ctx.pFormatCtx, AVMEDIA_TYPE_AUDIO, Ctx.nVStreamIndex, -1, NULL, 0);
if (Ctx.nAStreamIndex == AVERROR_STREAM_NOT_FOUND)
{
    for (nIndex = 0; nIndex < Ctx.pFormatCtx->nb_streams; nIndex++)
    {
        if (Ctx.pFormatCtx->streams[nIndex]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
        {
            Ctx.nAStreamIndex = nIndex;
            break;
        }
    }

    if (Ctx.nAStreamIndex < 0)
    {
        av_log(NULL, AV_LOG_ERROR, "Didn't find a audio stream");
    }
}
printf("C - get audio stream index\n");

if ((Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar = avcodec_parameters_alloc()) == NULL)
{
    av_log(NULL, AV_LOG_ERROR, "Couldn't alloc video codec parameters");
    return FALSE;
}
avcodec_parameters_from_context(Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar,
    Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codec);
printf("C - video codec parameter alloc\n");


Ctx.pVCodec = avcodec_find_decoder(Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar->codec_id);
printf("C - find video codec %s \n", Ctx.pVCodec->long_name);
Ctx.pVCodecCtx = avcodec_alloc_context3(Ctx.pVCodec);

avcodec_parameters_to_context(Ctx.pVCodecCtx, Ctx.pFormatCtx->streams[Ctx.nVStreamIndex]->codecpar);

if (avcodec_open2(Ctx.pVCodecCtx, Ctx.pVCodec, NULL) < 0)
{
    av_log(NULL, AV_LOG_ERROR, "Could not open video codec");
    return FALSE;
}
printf("C - video codec context oepn\n");

if (Ctx.nAStreamIndex > 0)
{
    if ((Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codecpar = avcodec_parameters_alloc()) != NULL)
    {
        avcodec_parameters_from_context(Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codecpar,
            Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codec);
        printf("C - audio codec parameter alloc\n");

        Ctx.pACodec = avcodec_find_decoder(Ctx.pFormatCtx->streams[Ctx.nAStreamIndex]->codecpar->codec_id);
        printf("C - find audio codec\n");
        Ctx.pACodecCtx = avcodec_alloc_context3(Ctx.pACodec);

        if (avcodec_open2(Ctx.pACodecCtx, Ctx.pACodec, NULL) < 0) {
            av_log(NULL, AV_LOG_ERROR, "Could not open audio codec");
        }
        printf("C - audio codec context oepn\n");
    }
    else
    {
        av_log(NULL, AV_LOG_ERROR, "Couldn't alloc video codec parameters");
    }
}

Ctx.pVCodecCtx->width = 1920;
Ctx.pVCodecCtx->height = 1080;

Ctx.pSwsCtx = sws_getContext(Ctx.pVCodecCtx->width,
    Ctx.pVCodecCtx->height,
    Ctx.pVCodecCtx->pix_fmt,
    Ctx.pVCodecCtx->width,
    Ctx.pVCodecCtx->height,
    AV_PIX_FMT_YUV420P,
    SWS_BILINEAR,
    NULL,
    NULL,
    NULL);

pthread_create(&Ctx.tID, NULL, PlayBackGround, &Ctx);

GtkWidget *window;

gtk_init(&argc, &argv);

window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

Ctx.pImage = gtk_image_new();
gtk_container_add(GTK_CONTAINER(window), Ctx.pImage);

gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
gtk_window_set_default_size(GTK_WINDOW(window), 1920, 1080);
gtk_widget_show_all(window);

gtk_main();

return 0;
}


    


  • Is there any option to create a single frame thumbnail for a video in java ?

    13 juin 2020, par Prashanth Shyamprasad

    Is there any option to create a single frame thumbnail for a video in java with java libraries.

    



    I am using Jave2 in my application. Does Jave2 provides any such options ? I didn't find a single documentation related to this.

    



    I heard Xuggler provides some options. But I don't want to move to Xuggler if Jave2 provides the facility as I'm already using Jave2 for many purposes extensively. Adding a full library like Xuggler is an overhead. Replacing Jave2 with Xuggler also is a tedious task

    



    If any light weight thumbnail feature specific utility library is available, then that should also be fine.