Recherche avancée

Médias (91)

Autres articles (18)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (3310)

  • Buffer overrun Blackmagic Intensity 4K as input to FFmpeg

    24 mai 2016, par colossus47

    I am trying to take direct video output from a 4k Sony Handycam, via HDMI directly into a Blackmagic Intensity Pro 4K. I can verify that the camera, Hdmi and blackmagic card are working as I can capture and view video using the provided "Media Express" program. When use ffmpeg I do get video output but I also get a buffer overrun.

    Here is the command :

    time ffmpeg -f decklink -i "Intensity Pro 4K@20" -c:v nvenc -b:v 100M -vf yadif=0:-1:0" -pix_fmt yuv420p -crf 29.97 -strict -2 output.mp4

    And I get the following output :

    ffmpeg version N-76538-gb83c849 Copyright (c) 2000-2015 the FFmpeg

    developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
    configuration: --enable-nonfree --enable-nvenc --enable-nvresize --extra-cflags=-I../cudautils --extra-ldflags=-L../cudautils --enable-gpl --enable-libx264 --enable-libx265 --enable-decklink --extra-cflags=-I/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include --extra-ldflags=-L/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include
    libavutil      55.  5.100 / 55.  5.100
    libavcodec     57. 15.100 / 57. 15.100
    libavformat    57. 14.100 / 57. 14.100
    libavdevice    57.  0.100 / 57.  0.100
    libavfilter     6. 15.100 /  6. 15.100
    libswscale      4.  0.100 /  4.  0.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
    [decklink @ 0x1ccd6e0] Found Decklink mode 3840 x 2160 with rate 29.97
    [decklink @ 0x1ccd6e0] Stream #1: not enough frames to estimate rate; consider increasing probesize
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, decklink, from 'Intensity Pro 4K@20':
    Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422, 3840x2160, -5 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc
    Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (output.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
    File 'output.mp4' already exists. Overwrite ? [y/N] y
    Output #0, mp4, to 'output.mp4':
    Metadata:
    encoder         : Lavf57.14.100
    Stream #0:0: Video: h264 (nvenc) ([33][0][0][0] / 0x0021), yuv420p, 3840x2160, q=-1--1, 100000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
    Metadata:
    encoder         : Lavc57.15.100 nvenc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
    encoder         : Lavc57.15.100 aac
    Stream mapping:
    Stream #0:1 -> #0:0 (rawvideo (native) -> h264 (nvenc))
    Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
    Press [q] to stop, [?] for help
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.15 bitrate=70411.7kbits/s  
    Last message repeated 1 times
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.54 bitrate=73110.9kbits/s  
    Last message repeated 20 times
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.92 bitrate=76270.2kbits/s  
    Last message repeated 15 times
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:04.28 bitrate=78367.6kbits/s  
    Last message repeated 61 times
    frame=  140 fps= 22 q=-0.0 Lsize=   57266kB time=00:00:04.67 bitrate=100425.2kbits/s  
    video:57187kB audio:72kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.009844%
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!
    Last message repeated 7 times
    [aac @ 0x1cd7020] Qavg: 215.556

    real   0m8.808s
    user   0m5.785s
    sys   0m1.749s

    Some sort of insight into this, be that just some commands that may fix it the issue, or otherwise.

  • How to create a video file webm from chunks by media recorder api using ffmpeg

    17 octobre 2020, par Caio Nakai

    I'm trying to create a webm video file from blobs generated by MediaRecorderAPI in a NodeJS server using FFMPEG. I'm able to create the .webm file but it's not playable, I ran this command $ ffmpeg.exe -v error -i lel.webm -f null - >error.log 2>&1 to generate an error log, the error log file contains this :

    


    


    [null @ 000002ce7501de40] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 1 >= 1

    


    [h264 @ 000002ce74a727c0] Invalid NAL unit size (804 > 74).

    


    [h264 @ 000002ce74a727c0] Error splitting the input into NAL units.

    


    Error while decoding stream #0:0 : Invalid data found when processing input

    


    


    This is my web server code

    


    const app = require("express")();
const http = require("http").createServer(app);
const io = require("socket.io")(http);
const fs = require("fs");
const child_process = require("child_process");

app.get("/", (req, res) => {
  res.sendFile(__dirname + "/index.html");
});

io.on("connection", (socket) => {
  console.log("a user connected");

  const ffmpeg = child_process.spawn("ffmpeg", [
    "-i",
    "-",
    "-vcodec",
    "copy",
    "-f",
    "flv",
    "rtmpUrl.webm",
  ]);

  ffmpeg.on("close", (code, signal) => {
    console.log(
      "FFmpeg child process closed, code " + code + ", signal " + signal
    );
  });

  ffmpeg.stdin.on("error", (e) => {
    console.log("FFmpeg STDIN Error", e);
  });

  ffmpeg.stderr.on("data", (data) => {
    console.log("FFmpeg STDERR:", data.toString());
  });

  socket.on("message", (msg) => {
    console.log("Writing blob! ");
    ffmpeg.stdin.write(msg);
  });

  socket.on("stop", () => {
    console.log("Stop recording..");
    ffmpeg.kill("SIGINT");
  });
});

http.listen(3000, () => {
  console.log("listening on *:3000");
});



    


    And this is my client code, using HTML, JS :

    


    &#xA;&#xA;  &#xA;    &#xA;    &#xA;    &#xA;  &#xA;  <code class="echappe-js">&lt;script src='http://stackoverflow.com/socket.io/socket.io.js'&gt;&lt;/script&gt;&#xA;  &lt;script&gt;&amp;#xA;    const socket = io();&amp;#xA;    let mediaRecorder = null;&amp;#xA;    const startRecording = (someStream) =&gt; {&amp;#xA;      const mediaStream = new MediaStream();&amp;#xA;      const videoTrack = someStream.getVideoTracks()[0];&amp;#xA;      const audioTrack = someStream.getAudioTracks()[0];&amp;#xA;      console.log(&quot;Video trac &quot;, videoTrack);&amp;#xA;      console.log(&quot;audio trac &quot;, audioTrack);&amp;#xA;      mediaStream.addTrack(videoTrack);&amp;#xA;      mediaStream.addTrack(audioTrack);&amp;#xA;&amp;#xA;      const recorderOptions = {&amp;#xA;        mimeType: &quot;video/webm;codecs=h264&quot;,&amp;#xA;        videoBitsPerSecond: 3 * 1024 * 1024,&amp;#xA;      };&amp;#xA;&amp;#xA;      mediaRecorder = new MediaRecorder(mediaStream, recorderOptions);&amp;#xA;      mediaRecorder.start(1000); // 1000 - the number of milliseconds to record into each Blob&amp;#xA;      mediaRecorder.ondataavailable = (event) =&gt; {&amp;#xA;        console.debug(&quot;Got blob data:&quot;, event.data);&amp;#xA;        if (event.data &amp;amp;&amp;amp; event.data.size &gt; 0) {&amp;#xA;          socket.emit(&quot;message&quot;, event.data);&amp;#xA;        }&amp;#xA;      };&amp;#xA;    };&amp;#xA;&amp;#xA;    const getVideoStream = async () =&gt; {&amp;#xA;      try {&amp;#xA;        const stream = await navigator.mediaDevices.getUserMedia({&amp;#xA;          video: true,&amp;#xA;          audio: true,&amp;#xA;        });&amp;#xA;        startRecording(stream);&amp;#xA;        myVideo.srcObject = stream;&amp;#xA;      } catch (e) {&amp;#xA;        console.error(&quot;navigator.getUserMedia error:&quot;, e);&amp;#xA;      }&amp;#xA;    };&amp;#xA;&amp;#xA;    const stopRecording = () =&gt; {&amp;#xA;      mediaRecorder.stop();&amp;#xA;      socket.emit(&quot;stop&quot;);&amp;#xA;    };&amp;#xA;  &lt;/script&gt;&#xA;  &#xA;    
    

    hello world

    &#xA;

    &#xA;

    &#xA;&#xA; &#xA; &lt;script&gt;&amp;#xA;      const myVideo = document.getElementById(&quot;myvideo&quot;);&amp;#xA;      myVideo.muted = true;&amp;#xA;    &lt;/script&gt;&#xA; &#xA;&#xA;&#xA;

    &#xA;

    Any help is appreciated !

    &#xA;

  • exo player mp2, aac audio format and avi video format [closed]

    27 mai 2020, par Muhammet
    &#xD;&#xA;
    &#xD;&#xA;
    /*&#xD;&#xA; * Copyright (C) 2016 The Android Open Source Project&#xD;&#xA; *&#xD;&#xA; * Licensed under the Apache License, Version 2.0 (the "License");&#xD;&#xA; * you may not use this file except in compliance with the License.&#xD;&#xA; * You may obtain a copy of the License at&#xD;&#xA; *&#xD;&#xA; *      http://www.apache.org/licenses/LICENSE-2.0&#xD;&#xA; *&#xD;&#xA; * Unless required by applicable law or agreed to in writing, software&#xD;&#xA; * distributed under the License is distributed on an "AS IS" BASIS,&#xD;&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xD;&#xA; * See the License for the specific language governing permissions and&#xD;&#xA; * limitations under the License.&#xD;&#xA; */&#xD;&#xA;package com.google.android.exoplayer2.ext.ffmpeg;&#xD;&#xA;&#xD;&#xA;import android.os.Handler;&#xD;&#xA;import androidx.annotation.Nullable;&#xD;&#xA;import com.google.android.exoplayer2.C;&#xD;&#xA;import com.google.android.exoplayer2.ExoPlaybackException;&#xD;&#xA;import com.google.android.exoplayer2.Format;&#xD;&#xA;import com.google.android.exoplayer2.audio.AudioProcessor;&#xD;&#xA;import com.google.android.exoplayer2.audio.AudioRendererEventListener;&#xD;&#xA;import com.google.android.exoplayer2.audio.AudioSink;&#xD;&#xA;import com.google.android.exoplayer2.audio.DefaultAudioSink;&#xD;&#xA;import com.google.android.exoplayer2.audio.SimpleDecoderAudioRenderer;&#xD;&#xA;import com.google.android.exoplayer2.drm.DrmSessionManager;&#xD;&#xA;import com.google.android.exoplayer2.drm.ExoMediaCrypto;&#xD;&#xA;import com.google.android.exoplayer2.util.Assertions;&#xD;&#xA;import com.google.android.exoplayer2.util.MimeTypes;&#xD;&#xA;import java.util.Collections;&#xD;&#xA;import org.checkerframework.checker.nullness.qual.MonotonicNonNull;&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * Decodes and renders audio using FFmpeg.&#xD;&#xA; */&#xD;&#xA;public final class FfmpegAudioRenderer extends SimpleDecoderAudioRenderer {&#xD;&#xA;&#xD;&#xA;  /** The number of input and output buffers. */&#xD;&#xA;  private static final int NUM_BUFFERS = 16;&#xD;&#xA;  /** The default input buffer size. */&#xD;&#xA;  private static final int DEFAULT_INPUT_BUFFER_SIZE = 960 * 6;&#xD;&#xA;&#xD;&#xA;  private final boolean enableFloatOutput;&#xD;&#xA;&#xD;&#xA;  private @MonotonicNonNull FfmpegDecoder decoder;&#xD;&#xA;&#xD;&#xA;  public FfmpegAudioRenderer() {&#xD;&#xA;    this(/* eventHandler= */ null, /* eventListener= */ null);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be&#xD;&#xA;   *     null if delivery of events is not required.&#xD;&#xA;   * @param eventListener A listener of events. May be null if delivery of events is not required.&#xD;&#xA;   * @param audioProcessors Optional {@link AudioProcessor}s that will process audio before output.&#xD;&#xA;   */&#xD;&#xA;  public FfmpegAudioRenderer(&#xD;&#xA;          @Nullable Handler eventHandler,&#xD;&#xA;          @Nullable AudioRendererEventListener eventListener,&#xD;&#xA;          AudioProcessor... audioProcessors) {&#xD;&#xA;    this(&#xD;&#xA;            eventHandler,&#xD;&#xA;            eventListener,&#xD;&#xA;            new DefaultAudioSink(/* audioCapabilities= */ null, audioProcessors),&#xD;&#xA;            /* enableFloatOutput= */ false);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be&#xD;&#xA;   *     null if delivery of events is not required.&#xD;&#xA;   * @param eventListener A listener of events. May be null if delivery of events is not required.&#xD;&#xA;   * @param audioSink The sink to which audio will be output.&#xD;&#xA;   * @param enableFloatOutput Whether to enable 32-bit float audio format, if supported on the&#xD;&#xA;   *     device/build and if the input format may have bit depth higher than 16-bit. When using&#xD;&#xA;   *     32-bit float output, any audio processing will be disabled, including playback speed/pitch&#xD;&#xA;   *     adjustment.&#xD;&#xA;   */&#xD;&#xA;  public FfmpegAudioRenderer(&#xD;&#xA;          @Nullable Handler eventHandler,&#xD;&#xA;          @Nullable AudioRendererEventListener eventListener,&#xD;&#xA;          AudioSink audioSink,&#xD;&#xA;          boolean enableFloatOutput) {&#xD;&#xA;    super(&#xD;&#xA;            eventHandler,&#xD;&#xA;            eventListener,&#xD;&#xA;            /* drmSessionManager= */ null,&#xD;&#xA;            /* playClearSamplesWithoutKeys= */ false,&#xD;&#xA;            audioSink);&#xD;&#xA;    this.enableFloatOutput = enableFloatOutput;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  @Override&#xD;&#xA;  @FormatSupport&#xD;&#xA;  protected int supportsFormatInternal(&#xD;&#xA;          @Nullable DrmSessionManager<exomediacrypto> drmSessionManager, Format format) {&#xD;&#xA;    Assertions.checkNotNull(format.sampleMimeType);&#xD;&#xA;    if (!FfmpegLibrary.isAvailable()) {&#xD;&#xA;      return FORMAT_UNSUPPORTED_TYPE;&#xD;&#xA;    } else if (!FfmpegLibrary.supportsFormat(format.sampleMimeType) || !isOutputSupported(format)) {&#xD;&#xA;      return FORMAT_UNSUPPORTED_SUBTYPE;&#xD;&#xA;    } else if (!supportsFormatDrm(drmSessionManager, format.drmInitData)) {&#xD;&#xA;      return FORMAT_UNSUPPORTED_DRM;&#xD;&#xA;    } else {&#xD;&#xA;      return FORMAT_HANDLED;&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  @Override&#xD;&#xA;  @AdaptiveSupport&#xD;&#xA;  public final int supportsMixedMimeTypeAdaptation() throws ExoPlaybackException {&#xD;&#xA;    return ADAPTIVE_NOT_SEAMLESS;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  @Override&#xD;&#xA;  protected FfmpegDecoder createDecoder(Format format, @Nullable ExoMediaCrypto mediaCrypto)&#xD;&#xA;          throws FfmpegDecoderException {&#xD;&#xA;    int initialInputBufferSize =&#xD;&#xA;            format.maxInputSize != Format.NO_VALUE ? format.maxInputSize : DEFAULT_INPUT_BUFFER_SIZE;&#xD;&#xA;    decoder =&#xD;&#xA;            new FfmpegDecoder(&#xD;&#xA;                    NUM_BUFFERS, NUM_BUFFERS, initialInputBufferSize, format, shouldUseFloatOutput(format));&#xD;&#xA;    return decoder;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  @Override&#xD;&#xA;  public Format getOutputFormat() {&#xD;&#xA;    Assertions.checkNotNull(decoder);&#xD;&#xA;    int channelCount = decoder.getChannelCount();&#xD;&#xA;    int sampleRate = decoder.getSampleRate();&#xD;&#xA;    @C.PcmEncoding int encoding = decoder.getEncoding();&#xD;&#xA;    return Format.createAudioSampleFormat(&#xD;&#xA;            /* id= */ null,&#xD;&#xA;            MimeTypes.AUDIO_RAW,&#xD;&#xA;            /* codecs= */ null,&#xD;&#xA;            Format.NO_VALUE,&#xD;&#xA;            Format.NO_VALUE,&#xD;&#xA;            channelCount,&#xD;&#xA;            sampleRate,&#xD;&#xA;            encoding,&#xD;&#xA;            Collections.emptyList(),&#xD;&#xA;            /* drmInitData= */ null,&#xD;&#xA;            /* selectionFlags= */ 0,&#xD;&#xA;            /* language= */ null);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  private boolean isOutputSupported(Format inputFormat) {&#xD;&#xA;    return shouldUseFloatOutput(inputFormat)&#xD;&#xA;            || supportsOutput(inputFormat.channelCount, C.ENCODING_PCM_16BIT);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  private boolean shouldUseFloatOutput(Format inputFormat) {&#xD;&#xA;    Assertions.checkNotNull(inputFormat.sampleMimeType);&#xD;&#xA;    if (!enableFloatOutput || !supportsOutput(inputFormat.channelCount, C.ENCODING_PCM_FLOAT)) {&#xD;&#xA;      return false;&#xD;&#xA;    }&#xD;&#xA;    switch (inputFormat.sampleMimeType) {&#xD;&#xA;      case MimeTypes.AUDIO_RAW:&#xD;&#xA;        // For raw audio, output in 32-bit float encoding if the bit depth is > 16-bit.&#xD;&#xA;        return inputFormat.pcmEncoding == C.ENCODING_PCM_24BIT&#xD;&#xA;                || inputFormat.pcmEncoding == C.ENCODING_PCM_32BIT&#xD;&#xA;                || inputFormat.pcmEncoding == C.ENCODING_PCM_FLOAT;&#xD;&#xA;      case MimeTypes.AUDIO_AC3:&#xD;&#xA;        // AC-3 is always 16-bit, so there is no point outputting in 32-bit float encoding.&#xD;&#xA;        return false;&#xD;&#xA;      default:&#xD;&#xA;        // For all other formats, assume that it&#x27;s worth using 32-bit float encoding.&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;}</exomediacrypto>

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;&#xA;

    I use exoplayer but no sound from mp2 and aac audio formats in android application.

    &#xA;&#xA;

    I get this error when I open mp2 and aac audio format videos "media includes audio tracks but none

    &#xA;&#xA;

    are playable by this device"and some are not working in .avi format, some are working please can you help me

    &#xA;&#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    /*&#xD;&#xA; * Copyright (C) 2016 The Android Open Source Project&#xD;&#xA; *&#xD;&#xA; * Licensed under the Apache License, Version 2.0 (the "License");&#xD;&#xA; * you may not use this file except in compliance with the License.&#xD;&#xA; * You may obtain a copy of the License at&#xD;&#xA; *&#xD;&#xA; *      http://www.apache.org/licenses/LICENSE-2.0&#xD;&#xA; *&#xD;&#xA; * Unless required by applicable law or agreed to in writing, software&#xD;&#xA; * distributed under the License is distributed on an "AS IS" BASIS,&#xD;&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xD;&#xA; * See the License for the specific language governing permissions and&#xD;&#xA; * limitations under the License.&#xD;&#xA; */&#xD;&#xA;package com.google.android.exoplayer2.ext.ffmpeg;&#xD;&#xA;&#xD;&#xA;import androidx.annotation.Nullable;&#xD;&#xA;import com.google.android.exoplayer2.ExoPlayerLibraryInfo;&#xD;&#xA;import com.google.android.exoplayer2.util.LibraryLoader;&#xD;&#xA;import com.google.android.exoplayer2.util.Log;&#xD;&#xA;import com.google.android.exoplayer2.util.MimeTypes;&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * Configures and queries the underlying native library.&#xD;&#xA; */&#xD;&#xA;public final class FfmpegLibrary {&#xD;&#xA;&#xD;&#xA;  static {&#xD;&#xA;    ExoPlayerLibraryInfo.registerModule("goog.exo.ffmpeg");&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  private static final String TAG = "FfmpegLibrary";&#xD;&#xA;&#xD;&#xA;  private static final LibraryLoader LOADER =&#xD;&#xA;          new LibraryLoader("avutil", "swresample", "avcodec", "ffmpeg");&#xD;&#xA;&#xD;&#xA;  private FfmpegLibrary() {}&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * Override the names of the FFmpeg native libraries. If an application wishes to call this&#xD;&#xA;   * method, it must do so before calling any other method defined by this class, and before&#xD;&#xA;   * instantiating a {@link FfmpegAudioRenderer} instance.&#xD;&#xA;   *&#xD;&#xA;   * @param libraries The names of the FFmpeg native libraries.&#xD;&#xA;   */&#xD;&#xA;  public static void setLibraries(String... libraries) {&#xD;&#xA;    LOADER.setLibraries(libraries);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * Returns whether the underlying library is available, loading it if necessary.&#xD;&#xA;   */&#xD;&#xA;  public static boolean isAvailable() {&#xD;&#xA;    return LOADER.isAvailable();&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /** Returns the version of the underlying library if available, or null otherwise. */&#xD;&#xA;  public static @Nullable String getVersion() {&#xD;&#xA;    return isAvailable() ? ffmpegGetVersion() : null;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * Returns whether the underlying library supports the specified MIME type.&#xD;&#xA;   *&#xD;&#xA;   * @param mimeType The MIME type to check.&#xD;&#xA;   */&#xD;&#xA;  public static boolean supportsFormat(String mimeType) {&#xD;&#xA;    if (!isAvailable()) {&#xD;&#xA;      return false;&#xD;&#xA;    }&#xD;&#xA;    String codecName = getCodecName(mimeType);&#xD;&#xA;    if (codecName == null) {&#xD;&#xA;      return false;&#xD;&#xA;    }&#xD;&#xA;    if (!ffmpegHasDecoder(codecName)) {&#xD;&#xA;      Log.w(TAG, "No " &#x2B; codecName &#x2B; " decoder available. Check the FFmpeg build configuration.");&#xD;&#xA;      return false;&#xD;&#xA;    }&#xD;&#xA;    return true;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * Returns the name of the FFmpeg decoder that could be used to decode the format, or {@code null}&#xD;&#xA;   * if it&#x27;s unsupported.&#xD;&#xA;   */&#xD;&#xA;  /* package */ static @Nullable String getCodecName(String mimeType) {&#xD;&#xA;    switch (mimeType) {&#xD;&#xA;      case MimeTypes.AUDIO_AAC:&#xD;&#xA;        return "aac";&#xD;&#xA;      case MimeTypes.AUDIO_MPEG:&#xD;&#xA;      case MimeTypes.AUDIO_MPEG_L1:&#xD;&#xA;      case MimeTypes.AUDIO_MPEG_L2:&#xD;&#xA;        return "mp3";&#xD;&#xA;      case MimeTypes.AUDIO_AC3:&#xD;&#xA;        return "ac3";&#xD;&#xA;      case MimeTypes.AUDIO_E_AC3:&#xD;&#xA;      case MimeTypes.AUDIO_E_AC3_JOC:&#xD;&#xA;        return "eac3";&#xD;&#xA;      case MimeTypes.AUDIO_TRUEHD:&#xD;&#xA;        return "truehd";&#xD;&#xA;      case MimeTypes.AUDIO_DTS:&#xD;&#xA;      case MimeTypes.AUDIO_DTS_HD:&#xD;&#xA;        return "dca";&#xD;&#xA;      case MimeTypes.AUDIO_VORBIS:&#xD;&#xA;        return "vorbis";&#xD;&#xA;      case MimeTypes.AUDIO_OPUS:&#xD;&#xA;        return "opus";&#xD;&#xA;      case MimeTypes.AUDIO_AMR_NB:&#xD;&#xA;        return "amrnb";&#xD;&#xA;      case MimeTypes.AUDIO_AMR_WB:&#xD;&#xA;        return "amrwb";&#xD;&#xA;      case MimeTypes.AUDIO_FLAC:&#xD;&#xA;        return "flac";&#xD;&#xA;      case MimeTypes.AUDIO_ALAC:&#xD;&#xA;        return "alac";&#xD;&#xA;      case MimeTypes.AUDIO_MLAW:&#xD;&#xA;        return "pcm_mulaw";&#xD;&#xA;      case MimeTypes.AUDIO_ALAW:&#xD;&#xA;        return "pcm_alaw";&#xD;&#xA;      default:&#xD;&#xA;        return null;&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  private static native String ffmpegGetVersion();&#xD;&#xA;  private static native boolean ffmpegHasDecoder(String codecName);&#xD;&#xA;&#xD;&#xA;}

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;&#xA;

    [enter image description here][1]&#xA;[enter image description here][2]

    &#xA;