Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (36)

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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (6193)

  • Merge commit ’57ead8449e44bd07b3d4a5bd42f1aab64566f92e’

    23 décembre 2013, par Michael Niedermayer
    Merge commit ’57ead8449e44bd07b3d4a5bd42f1aab64566f92e’
    

    * commit ’57ead8449e44bd07b3d4a5bd42f1aab64566f92e’ :
    doc : fix link to the ISC license text in the developer documentation.

    Merged-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] doc/developer.texi
  • Mobile Camera live audio/video streaming and encoding

    7 juin 2015, par Strikecounter2

    I know this question has been asked a couple of times, but I still haven’t found the right answer for my question.

    I would like to code an app that is able to live-stream audio and video while the content is being recorded and then uploaded to a server. I’d prefer to have my own back-end using Parse, because I want a high scalability. I know that the video has to be encoded to a h.264 codec and the audio to an AAC codec, but I don’t know how to achieve this. I have heard of the FFmpeg framework, but I am not sure if I would violate their license if I distribute my app or even sell it to somebody else.
    I would then like to receive the stream from the server to open it on the iPhone/android phone.

    They key requirements would be :

    • Low Latency
    • About 24 fps
    • Audio/Video in sync
    • No buffering while watching

    I would like to use Swift as a programming language, but if there is no way to use a swift-wrapper for any frameworks I would focus on Objective-C too.

    I am willing to learn everything that is needed, but I don’t know where to start.

  • 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;