Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (54)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (6206)

  • ffmpeg Unrecognized option 'hls_enc'

    16 juin 2017, par riubin

    Does anyone have a ffmpeg problem that Unrecognized option ’hls_enc’ ?

    when I use ffmpeg to convert videos to hls with option ’hls_enc’,followed the document : https://www.ffmpeg.org/ffmpeg-formats.html#Options-5
    but throw error:Unrecognized option ’hls_enc’

    Is it missing any configure options ?

    configuration : —enable-gpl —enable-nonfree —yasmexe=/data/ffmpeg.src/_release/bin/yasm —prefix=/data/ffmpeg.src/_release —cc= —enable-static —disable-shared —enable-debug —extra-cflags=’-I/data/ffmpeg.src/_release/include’ —extra-ldflags=’-L/data/ffmpeg.src/_release/lib -lm -ldl’ —enable-postproc —enable-bzlib —enable-zlib —enable-parsers —enable-pthreads —enable-libx264 —enable-libmp3lame —enable-libfdk_aac —enable-libspeex —extra-libs=-lpthread —enable-encoders —enable-decoders —enable-avfilter —enable-muxers —enable-demuxers

  • Some bugs when using SDL2 and ffmpeg to make a video player

    1er juin 2017, par trycatch

    used sws_scale to resize the image, and SDL2.0 to render, pixel format is YUV420P.

    1.When I Create SDL Render with SDL_RENDERER_SOFTWARE, I Get a black image like this :enter image description here, the top-left corner has a green point ;
    But When I Create SDL Render with SDL_RENDERER_ACCELERATED, I can See normal image ;

    2.When I resize the window, the player will crash on SDL_UpdateYUVTexture. I check width, height and linesize of the data, everything is OK.

    WHY ?

    Key Code :

    if (swscale_.frame.width % 2)
     swscale_.frame.width -= 1;

    swscale_.free();
    swscale_.context = sws_getContext(
           vcodec->width, vcodec->height, vcodec->pix_fmt,
           swscale_.frame.width, swscale_.frame.height,
           AV_PIX_FMT_YUV420P, SWS_BICUBIC, nullptr, nullptr, nullptr);

    if (!swscale_.context)
       throw std::runtime_error("sws_getContext.");

    if (swscale_.frame.avframe)
     av_frame_free(&swscale_.frame.avframe);
    swscale_.frame.avframe = av_frame_alloc();
    unsigned char* out_buffer = (unsigned char *)av_malloc(av_image_get_buffer_size(AV_PIX_FMT_YUV420P, swscale_.frame.width, swscale_.frame.height, 1)+16);
    unsigned char* tmp = &out_buffer[16 - (unsigned long long)out_buffer % 16];
    av_image_fill_arrays(swscale_.frame.avframe->data, swscale_.frame.avframe->linesize, tmp,
     AV_PIX_FMT_YUV420P, swscale_.frame.width, swscale_.frame.height, 1);

    sws_scale(swscale_.context, (const unsigned char* const*)vframe_->data, vframe_->linesize,
     0, vframe_->height,
     swscale_.frame.avframe->data, swscale_.frame.avframe->linesize);

    self.onRenderHandle(swscale_.frame);

    Code of SDL rendering :

    void Player::onRender(const frame& frame)
    {
     if (sdl_lock_.try_lock()) {
       ::ValidateRect(native_window_, NULL);
       if (frame.width != scr_width_ || frame.height != scr_height_) {
         scr_width_ = frame.width; scr_height_ = frame.height;
         SDL_SetWindowSize(screen_, scr_width_ + 2, scr_height_ + 2);
         SDL_DestroyRenderer(sdl_renderer_);
         sdl_renderer_ = SDL_CreateRenderer(screen_, -1, 0);
         video_texture_ = SDL_CreateTexture(sdl_renderer_, SDL_PIXELFORMAT_IYUV,
           SDL_TEXTUREACCESS_STREAMING, scr_width_, scr_height_);
       }
       SDL_UpdateYUVTexture(video_texture_, NULL,
         frame.avframe->data[0], frame.avframe->linesize[0],
         frame.avframe->data[1], frame.avframe->linesize[1],
         frame.avframe->data[2], frame.avframe->linesize[2]);
       sdl_lock_.unlock();
       ::InvalidateRect(native_window_, NULL, false);
     }
    }
    void Player::onPaint()
    {
     std::lock_guard lock(sdl_lock_);
     SDL_RenderClear(sdl_renderer_);
     SDL_RenderCopy(sdl_renderer_, video_texture_, NULL, NULL);
     SDL_RenderPresent(sdl_renderer_);
    }
  • Record video with Media Recorder in WEBM format

    21 mai 2017, par Matho

    I need to record two videos via media recorder and process them with ffmpeg in Android. I want to read videos via pipe in ffmpeg command string. From what I have read, I could not use 3GPP/MP4 format, because these formats contains header at the end of video. Because of it, I want to use WEBM video format, but my app is crashing, when I use webm/vp8 setting in media recorder. Ffmpeg I’m using is : com.writingminds:FFmpegAndroid:0.3.2. Could you help me please ?

    RecorderPrepareTask :

    class RecorderPrepareTask extends AsyncTask {
    private Context mContext;

    public RecorderPrepareTask(Context context) {
       mContext = context;
    }

    @Override
    protected Boolean doInBackground(Void... voids) {
       Timber.d("Starting screen recording...");

       if (!outputRoot.exists() && !outputRoot.mkdirs()) {
           Timber.e("Unable to create output directory '%s'.", outputRoot.getAbsolutePath());
           return false;
       }

       recorder = new MediaRecorder();
       recorder.setVideoSource(SURFACE);
       recorder.setOutputFormat(MediaRecorder.OutputFormat.WEBM);
       recorder.setVideoEncoder(MediaRecorder.VideoEncoder.VP8);
       recorder.setVideoSize(Config.VIDEO_SIZE_W, Config.VIDEO_SIZE_H);
       recorder.setVideoFrameRate(Config.FRAME_RATE);

       Timber.i("Output file '%s'.", outputFileName);
       recorder.setOutputFile(RecordingActivity.pipe[1].getFileDescriptor());


       try {
           recorder.prepare();
       } catch (IOException e) {
           throw new RuntimeException("Unable to prepare MediaRecorder.", e);
       }


       projection = projectionManager.getMediaProjection(resultCode, data);

       Surface surface = recorder.getSurface();
       display = projection.createVirtualDisplay(DISPLAY_NAME, Config.VIDEO_SIZE_W, Config.VIDEO_SIZE_H, 560, VIRTUAL_DISPLAY_FLAG_PRESENTATION, surface, null, null);

       recorder.start();

       return true;
    }

    @Override
    protected void onPostExecute(Boolean result) {

    }

    }

    getConvertCmd :

    private String getConvertCmd(){
       return "-re -r 30 -f webm -c:v vp8 -i pipe:"+ RecordingActivity.pipe[0].getFd() + " -threads 2 -preset ultrafast -profile:v main -level 3.1 -b:v 440k -ar 44100 -ab 128k -s "+ Config.CAMERA_VIDEO_SIZE_W + "x" + Config.CAMERA_VIDEO_SIZE_H + " -vcodec vp8 -acodec vorbis " + outputFileName3;
    }

    Logs :

    D/SoftVPXEncoder: VP8: internalSetAndroidVp8Params. BRMode: 0. TS: 0. KF: 24. QP: 0 - 0 BR0: 100. BR1: 0. BR2: 0
    I/ACodec: setupVideoEncoder succeeded
    E/OMXNodeInstance: setConfig(1a:google.vp8.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
    I/ACodec: codec does not support config priority (err -2147483648)
    W/ACodec: do not know color format 0x7f000789 = 2130708361
    I/SoftMPEG4Encoder: Construct SoftMPEG4Encoder
    I/MediaCodec: MediaCodec will operate in async mode
    E/OMXNodeInstance: getParameter(1b:google.mpeg4.encoder, ParamVideoErrorCorrection(0x6000007)) ERROR: NotImplemented(0x80001006)
    I/ACodec: setupVideoEncoder succeeded
    E/OMXNodeInstance: setConfig(1b:google.mpeg4.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
    I/ACodec: codec does not support config priority (err -2147483648)
    D/SoftVPXEncoder: VP8: initEncoder. BRMode: 0. TSLayers: 0. KF: 24. QP: 0 - 0
    I/AudioFlinger: AudioFlinger's thread 0xb2440000 ready to run
    xW/AudioFlinger: acquireAudioSessionId() unknown client 10079 for session 7
    I/MediaCodec: MediaCodec will operate in async mode
    /system_process I/DisplayManagerService: Display device added: DisplayDeviceInfo{"RMR": uniqueId="virtual:sk.matho.rocket_monkeys.rocketmonkeysrecorder,10052,RMR,0", 480 x 640, modeId 6, defaultModeId 6, supportedModes [{id=6, width=480, height=640, fps=60.0}], density 560, 560.0 x 560.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, state ON, owner sk.matho.rocket_monkeys.rocketmonkeysrecorder (uid 10052), FLAG_PRIVATE, FLAG_PRESENTATION}
    E/OMXNodeInstance: setConfig(1c:google.amrnb.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
    I/ACodec: codec does not support config priority (err -2147483648)
    E/WebmElement: mmap64 failed; errno = 22
    E/WebmElement: fd 18; flags: 1
    E/WebmElement: mmap64 failed; errno = 22
    E/WebmElement: fd 18; flags: 1
    E/WebmElement: mmap64 failed; errno = 22
    E/WebmElement: fd 18; flags: 1
    E/WebmElement: mmap64 failed; errno = 22
    E/WebmElement: fd 18; flags: 1
    E/WebmElement: mmap64 failed; errno = 22
    E/WebmElement: fd 18; flags: 1
    E/WebmElement: mmap64 failed; errno = 22
    E/WebmElement: fd 18; flags: 1
    D/gralloc_ranchu: gralloc_alloc: format 1 and usage 0x10003 imply creation of host color buffer
    I/MediaCodecSource: MediaCodecSource (video) starting
    I/MediaCodecSource: MediaCodecSource (video) started
    D/MPEG4Writer: Video track stopping
    E/MPEG4Writer: Stop() called but track is not started
    D/MPEG4Writer: Audio track stopping
    E/MPEG4Writer: Stop() called but track is not started

    [ 05-21 13:03:44.101  9757: 9766 D/         ]
    HostConnection::get() New Host Connection established 0xb344f140, tid 9766
    /sk.matho.rocket_monkeys.rocketmonkeysrecorder E/MediaRecorder: start failed: -2147483648                                                                                                  
    /sk.matho.rocket_monkeys.rocketmonkeysrecorder E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
    Process: sk.matho.rocket_monkeys.rocketmonkeysrecorder, PID: 10079
    java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:309)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at java.lang.Thread.run(Thread.java:818)
    Caused by: java.lang.RuntimeException: start failed.
    at android.media.MediaRecorder.start(Native Method)
    at sk.matho.rocket_monkeys.rocketmonkeysrecorder.recording.CameraRecordingSession$MediaPrepareTask.doInBackground(CameraRecordingSession.java:181)
    at sk.matho.rocket_monkeys.rocketmonkeysrecorder.recording.CameraRecordingSession$MediaPrepareTask.doInBackground(CameraRecordingSession.java:173)
    at android.os.AsyncTask$2.call(AsyncTask.java:295)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
    at java.lang.Thread.run(Thread.java:818) 

    [ 05-21 13:03:44.109  9757:10315 D/         ]
    HostConnection::get() New Host Connection established 0xb307c1c0, tid 10315