Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (68)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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 (9316)

  • ffmpeg audio output in iOS

    19 septembre 2015, par user3249421

    Good day,

    I have own project which using iFrameExtraktor (https://github.com/lajos/iFrameExtractor). I modified initWithVideo method to :

    -(id)initWithVideo:(NSString *)moviePath imgView: (UIImageView *)imgView {
    if (!(self=[super init])) return nil;

    AVCodec         *pCodec;
    AVCodec         *aCodec;

    // Register all formats and codecs
    avcodec_register_all();
    av_register_all();

    imageView = imgView;

    // Open video file
    if(avformat_open_input(&pFormatCtx, [moviePath cStringUsingEncoding:NSASCIIStringEncoding], NULL, NULL) != 0) {
       av_log(NULL, AV_LOG_ERROR, "Couldn't open file\n");
       goto initError;
    }

    // Retrieve stream information
    if(avformat_find_stream_info(pFormatCtx,NULL) < 0) {
       av_log(NULL, AV_LOG_ERROR, "Couldn't find stream information\n");
       goto initError;
    }

    // Find the first video stream
    if ((videoStream =  av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &pCodec, 0)) < 0) {
       av_log(NULL, AV_LOG_ERROR, "Cannot find a video stream in the input file\n");
       goto initError;
    }

    if((audioStream = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_AUDIO, -1, -1, &aCodec, 0)) < 0 ){
       av_log(NULL, AV_LOG_ERROR, "Cannot find a audio stream in the input file\n");
       goto initError;
    }

    // Get a pointer to the codec context for the video stream
    pCodecCtx = pFormatCtx->streams[videoStream]->codec;
    aCodecCtx = pFormatCtx->streams[audioStream]->codec;

    // Find the decoder for the video stream
    pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
    if(pCodec == NULL) {
       av_log(NULL, AV_LOG_ERROR, "Unsupported video codec!\n");
       goto initError;
    }

    aCodec = avcodec_find_decoder(aCodecCtx->codec_id);
    if(aCodec == NULL) {
       av_log(NULL, AV_LOG_ERROR, "Unsupported audio codec!\n");
       goto initError;
    }

    // Open codec
    if(avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
       av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
       goto initError;
    }

    if(avcodec_open2(aCodecCtx, aCodec, NULL) < 0){
       av_log(NULL, AV_LOG_ERROR, "Cannot open audio decoder\n");
       goto initError;
    }

    // Allocate video frame
    pFrame = av_frame_alloc();

    outputWidth = pCodecCtx->width;
    self.outputHeight = pCodecCtx->height;

    lastFrameTime = -1;
    [self seekTime:0.0];

    return self;

    initError:
       //[self release];
       return nil;
    }

    Video rendering works fine, but I don’t know how play audio to device output.

    Thanks for any tips.

  • Displaying 450 image files from SDCard at 30fps on android

    11 décembre 2013, par nikhilkerala

    I am trying to develop an app that takes a 15 seconds of video, allows the user to apply different filters, shows the preview of the effect, then allows to save the processed video to sdcard. I use ffmpeg to split the video into JPEG frames, apply the desired filter using GPUImage to all the frames, then use ffmpeg to encode the frames back to a video. Everything works fine except the part where user selects the filter. When user selects a filter, the app is supposed to display the preview of the video with the filter applied. Though 450 frames get the filter applied fairly quick, displaying the images sequentially at 30 fps (to make the user feel the video is being played) is performing poorly. I tried different approaches but the maximum frame rate I could attain even on the fastest devices is 10 to 12 fps.

    The AnimationDrawable technique doesn't work in this case because it requires the entire images to be buffered into memory which in this case is huge. App crashes.

    The below code is the best performing one so far (10 to 12 fps).

    package com.example.animseqvideo;
    import ......

    public class MainActivity extends Activity {
       Handler handler;
       Runnable runnable;
       final int interval = 33; // 30.30 FPS
       ImageView myImage;
       int i=0;

       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           myImage = (ImageView) findViewById(R.id.imageView1);

           handler = new Handler();
           runnable = new Runnable(){
               public void run() {

                   i++;  if(i>450)i=1;

                   File imgFile = new  File(Environment.getExternalStorageDirectory().getPath() + "/com.example.animseqvideo/image"+ String.format("%03d", i)   +".jpg");
                   if(imgFile.exists()){
                       Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
                       myImage.setImageBitmap(myBitmap);
                   }
    //SOLUTION EDIT - MOVE THE BELOW LINE OF CODE AS THE FIRST LINE OF run() AND FPS=30 !!!

                   handler.postDelayed(runnable, interval);
               }
           };
           handler.postAtTime(runnable, System.currentTimeMillis()+interval);
           handler.postDelayed(runnable, interval);
       }
    }

    I understand that the process of getting an image from SDCard, decoding it, then displaying it onto the screen involves the performance of the SDCard reading, the CPUs performance and graphics performance of the device. But I am wondering if there is a way I could save a few milliseconds in each iteration. Any suggestion would be of great help at this point.

  • ffmpeg build from source fails in docker container ?

    24 mars 2016, par John Allard

    I’m trying to make some changes to the ffmpeg source code (yes, I’m a masochist), and to start I booted an Arch Linux docker container, installed the requirements, downloaded ffmpeg source code, and tried to compile, but I’m getting some extremely odd errors.

    compile command :

    ./configure --bindidr=~/ffmpeg_build --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree

    Output :

    ./configure:unset:3338: no such has table element: mktemp
    pr: /tmp/ffconf.uQI7CeV.c: No such file or directory.
    pr: /tmp/ffconf.uQI7CeV.c: No such file or directory.
    pr: /tmp/ffconf.uQI7CeV.c: No such file or directory.
    pr: /tmp/ffconf.uQI7CeV.c: No such file or directory.
    ... (24 times)
    pr: /tmp/ffconf.uQI7CeV.c: No such file or directory.
    pr: /tmp/ffconf.r547UgWy.m: No such file or directory.
    ./configure:53378: parse error near '}'
    ==> ERROR" A failure occured in build()
       Aborting...
    The build failed.

    This doesn’t seem to be a problem with ffmpeg, more a problem with the container. If I check find /tmp -name ffconf\* I see that the files do exist and they contain

    extern int getrusage();
    int main(void){ getrusage(); }

    what in the hell is going on ? hash tabled ? mktemp not working ? files not being found ?

    edit-

    here is what is on the line numbers in the files that give the errors

    3338:configure - unset -f mktemp
    5338:configure - check_builtin gmtime_r time.g "time_t * time; strict tm*; gmtime_r(time, tm)"

    edit2 - Here’s the dockerfile (cloned from here https://hub.docker.com/r/greyltc/archlinux/ /dockerfile/)

    # Arch Linux baseline docker container
    # Generated on Sat Mar 19 14:26:28 GMT 2016 using code in this GitHub repo:
    # https://github.com/greyltc/docker-archlinux
    FROM scratch
    MAINTAINER Grey Christoforo <grey@christoforo.net>

    # copy in super minimal root filesystem archive
    ADD archlinux.tar.xz /

    # perform initial container setup tasks
    RUN setup-arch-docker-container

    # this allows the system profile to be sourced at every shell
    ENV ENV /etc/profile