Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (12589)

  • Revision 36038 : Améliorations diverses dont l’encodage

    10 mars 2010, par kent1@… — Log

    Améliorations diverses dont l’encodage

  • How to add watermark while record video using ffmpeg

    7 décembre 2017, par Hitesh Gehlot

    I am recording square video using following ffmpeg library. Square Video recorded successfully with audio but now i want to add watermark on video but my application crashed and getting error. Please help me how can i add watermark while record video.

    Gradle dependency

    compile(group: 'org.bytedeco', name: 'javacv-platform', version: '1.3') {
       exclude group: 'org.bytedeco.javacpp-presets'
    }
    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3'
    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3', classifier: 'android-arm'

    I am using following code for add watermark while record video

        // add water mark
               String imgPath = audioPath + "jodelicon.png";
               String watermark = "movie=" + imgPath + " [logo];[in][logo]overlay=0:0:1:format=rgb [out]";
               filters.add(watermark);

    Complete Code

    class VideoRecordThread extends Thread {

           private boolean isRunning;

           @Override
           public void run() {
               List<string> filters = new ArrayList&lt;>();
               // Transpose
               String transpose = null;
               android.hardware.Camera.CameraInfo info =
                       new android.hardware.Camera.CameraInfo();
               android.hardware.Camera.getCameraInfo(mCameraId, info);
               if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) {
                   switch (info.orientation) {
                       case 270:
    //                        transpose = "transpose=clock_flip"; // Same as preview display
                           transpose = "transpose=cclock"; // Mirrored horizontally as preview display
                           break;
                       case 90:
    //                        transpose = "transpose=cclock_flip"; // Same as preview display
                           transpose = "transpose=clock"; // Mirrored horizontally as preview display
                           break;
                   }
               } else {
                   switch (info.orientation) {
                       case 270:
                           transpose = "transpose=cclock";
                           break;
                       case 90:
                           transpose = "transpose=clock";
                           break;
                   }
               }
               if (transpose != null) {
                   filters.add(transpose);
               }
               // Crop (only vertically)
               int width = previewHeight;
               int height = width * videoHeight / videoWidth;
               String crop = String.format("crop=%d:%d:%d:%d",
                       width, height,
                       (previewHeight - width) / 2, (previewWidth - height) / 2);

               filters.add(crop);
               // Scale (to designated size)

               String scale = String.format("scale=%d:%d", videoHeight, videoWidth);
               filters.add(scale);

               // add water mark
               String imgPath = audioPath + "jodelicon.png";
               String watermark = "movie=" + imgPath + " [logo];[in][logo]overlay=0:0:1:format=rgb [out]";
               filters.add(watermark);

               FFmpegFrameFilter frameFilter = new FFmpegFrameFilter(TextUtils.join(",", filters),
                       previewWidth, previewHeight);
               frameFilter.setPixelFormat(avutil.AV_PIX_FMT_NV21);
               frameFilter.setFrameRate(frameRate);
               try {
                   frameFilter.start();
               } catch (FrameFilter.Exception e) {
                   e.printStackTrace();
               }

               isRunning = true;
               FrameToRecord recordedFrame;

               while (isRunning || !mFrameToRecordQueue.isEmpty()) {
                   try {
                       recordedFrame = mFrameToRecordQueue.take();
                   } catch (InterruptedException ie) {
                       ie.printStackTrace();
                       try {
                           frameFilter.stop();
                       } catch (FrameFilter.Exception e) {
                           e.printStackTrace();
                       }
                       break;
                   }

                   if (mFrameRecorder != null) {
                       long timestamp = recordedFrame.getTimestamp();
                       if (timestamp > mFrameRecorder.getTimestamp()) {
                           mFrameRecorder.setTimestamp(timestamp);
                       }
                       long startTime = System.currentTimeMillis();
    //                    Frame filteredFrame = recordedFrame.getFrame();
                       Frame filteredFrame = null;
                       try {
                           frameFilter.push(recordedFrame.getFrame());
                           filteredFrame = frameFilter.pull();
                       } catch (FrameFilter.Exception e) {
                           e.printStackTrace();
                       }
                       try {
                           mFrameRecorder.record(filteredFrame);
                       } catch (FFmpegFrameRecorder.Exception e) {
                           e.printStackTrace();
                       }
                       long endTime = System.currentTimeMillis();
                       long processTime = endTime - startTime;
                       mTotalProcessFrameTime += processTime;
                       Log.d(LOG_TAG, "This frame process time: " + processTime + "ms");
                       long totalAvg = mTotalProcessFrameTime / ++mFrameRecordedCount;
                       Log.d(LOG_TAG, "Avg frame process time: " + totalAvg + "ms");
                   }
                   Log.d(LOG_TAG, mFrameRecordedCount + " / " + mFrameToRecordCount);
                   mRecycledFrameQueue.offer(recordedFrame);
               }
           }

           public void stopRunning() {
               this.isRunning = false;
               if (getState() == WAITING) {
                   interrupt();
               }
           }

           public boolean isRunning() {
               return isRunning;
           }
       }
    </string>

    Error in logcat

    android A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18 in tid 320 (Thread-24542)
  • FFMPEG watermark + hls stream

    20 novembre 2023, par Mohamed Taher

    i want to convert mp4 video into hls multi resolution (360 , 720) and add watermark image inside the output segments

    &#xA;

    i did two result but missing the watermark image with the multi scale

    &#xA;

    //one hls with water mark image&#xA;ffmpeg \&#xA;-i input.mp4 \&#xA;-i watermark.png \&#xA;-filter_complex "[0:v][1:v] overlay=10:10:format=auto,format=yuv420p" \&#xA;-filter_complex "[0:v][1:v] overlay=10:10:format=auto,format=yuv420p" \&#xA;-filter_complex "[0:v][1:v] overlay=10:10:format=auto,format=yuv420p" \&#xA;-c:a copy -b:a 128k -c:v libx264 -crf 23 \&#xA;-f hls \&#xA;-hls_time 3 \&#xA;-hls_flags independent_segments \&#xA;-master_pl_name "output.m3u8" "output-%v.m3u8"&#xA;

    &#xA;

    //multi hls with watermark text&#xA;ffmpeg \&#xA;-i ../input.mp4 \&#xA;-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 \&#xA;-c:v:0 libx264 -crf 28 -preset faster -maxrate:v:0 600k -vf "drawtext=fontfile=font.ttf:text=&#x27;Your Watermark Text&#x27;:x=10:y=10:fontsize=24:fontcolor=white, scale=-1:360"  -b:a:0 64k \&#xA;-c:v:1 libx264 -crf 28 -preset faster -maxrate:v:0 3000k -vf "drawtext=fontfile=font.ttf:text=&#x27;Your Watermark Text&#x27;:x=10:y=10:fontsize=24:fontcolor=white, scale=-1:720" -b:a:0 64k \&#xA;-var_stream_map "v:0,a:0,name:360p v:1,a:1,name:460p" \&#xA;-f hls \&#xA;-hls_list_size 0 \&#xA;-threads 0 \&#xA;-hls_playlist_type event \&#xA;-hls_time 3 \&#xA;-hls_key_info_file ../keys/enc.keyinfo \&#xA;-hls_flags independent_segments \&#xA;-master_pl_name "output.m3u8" "output-%v.m3u8"&#xA;

    &#xA;