Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (9)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    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 (...)

Sur d’autres sites (4019)

  • VideoView does not play Audio in Video properly

    30 janvier 2014, par Jay

    I have an *.mp4 file which is duration of 2 min. Now it has audio track starting from 30 seconds upto 1.10 min. The rest before 30s and after 1.10min is blank.

    Now the problem is when I try to play it in videoview or mediaplayer then, it plays audio right from beginning of the video rather from its actual position. I tried this on multiple phones with same result.

    When I play the same video in MXPlayer or in Windows(VLC) ; it plays properly.

    What is the solution to this problem ?

    Edit

    I have used -itsoffset command of Ffmpeg for achieving above video.

    ffmpeg -y -i a.mp4 -itsoffset 00:00:30 sng.m4a -map 0:0 -map 1:0 -c:v copy -preset ultrafast out.mp4

    Thanks in advance.

  • Android. Problems with AudioTrack class. Sound sometimes lost

    29 janvier 2014, par bukka.wh

    I have found open source video player for Android, which uses ffmpeg to decode video.
    I have some problems with audio, that sometimes plays with jerks, but video picture is shown well. The basic idea of player is that audio and video are decoded in two different streams, and then in the third stream the are passed back, video picture is shown on SurfaceView and video sound is passed in byte array to AudioTrack and then plays. But sometimes sound is lost or playing with jerks. Can anyone give me start point for what to do (some basic concepts). May be I should change buffer size for AudioTrack or add some flags to it. Here is a piece of code, where AudioTrack class is created.

    private AudioTrack prepareAudioTrack(int sampleRateInHz,
           int numberOfChannels) {

       for (;;) {
           int channelConfig;
           if (numberOfChannels == 1) {
               channelConfig = AudioFormat.CHANNEL_OUT_MONO;
           } else if (numberOfChannels == 2) {
               channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
           } else if (numberOfChannels == 3) {
               channelConfig = AudioFormat.CHANNEL_OUT_FRONT_CENTER
                       | AudioFormat.CHANNEL_OUT_FRONT_RIGHT
                       | AudioFormat.CHANNEL_OUT_FRONT_LEFT;
           } else if (numberOfChannels == 4) {
               channelConfig = AudioFormat.CHANNEL_OUT_QUAD;
           } else if (numberOfChannels == 5) {
               channelConfig = AudioFormat.CHANNEL_OUT_QUAD
                       | AudioFormat.CHANNEL_OUT_LOW_FREQUENCY;
           } else if (numberOfChannels == 6) {
               channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
           } else if (numberOfChannels == 8) {
               channelConfig = AudioFormat.CHANNEL_OUT_7POINT1;
           } else {
               channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
           }
           try {
               Log.d("MyLog","Creating Audio player");
               int minBufferSize = AudioTrack.getMinBufferSize(sampleRateInHz,
                       channelConfig, AudioFormat.ENCODING_PCM_16BIT);
               AudioTrack audioTrack = new AudioTrack(
                       AudioManager.STREAM_MUSIC, sampleRateInHz,
                       channelConfig, AudioFormat.ENCODING_PCM_16BIT,
                       minBufferSize, AudioTrack.MODE_STREAM);
               return audioTrack;
           } catch (IllegalArgumentException e) {
               if (numberOfChannels > 2) {
                   numberOfChannels = 2;
               } else if (numberOfChannels > 1) {
                   numberOfChannels = 1;
               } else {
                   throw e;
               }
           }
       }
    }

    And this is a piece of native code where sound bytes are written to AudioTrack

    int player_write_audio(struct DecoderData *decoder_data, JNIEnv *env,
       int64_t pts, uint8_t *data, int data_size, int original_data_size) {
    struct Player *player = decoder_data->player;
    int stream_no = decoder_data->stream_no;
    int err = ERROR_NO_ERROR;
    int ret;
    AVCodecContext * c = player->input_codec_ctxs[stream_no];
    AVStream *stream = player->input_streams[stream_no];
    LOGI(10, "player_write_audio Writing audio frame")

    jbyteArray samples_byte_array = (*env)->NewByteArray(env, data_size);
    if (samples_byte_array == NULL) {
       err = -ERROR_NOT_CREATED_AUDIO_SAMPLE_BYTE_ARRAY;
       goto end;
    }

    if (pts != AV_NOPTS_VALUE) {
       player->audio_clock = av_rescale_q(pts, stream->time_base, AV_TIME_BASE_Q);
       LOGI(9, "player_write_audio - read from pts")
    } else {
       int64_t sample_time = original_data_size;
       sample_time *= 1000000ll;
       sample_time /= c->channels;
       sample_time /= c->sample_rate;
       sample_time /= av_get_bytes_per_sample(c->sample_fmt);
       player->audio_clock += sample_time;
       LOGI(9, "player_write_audio - added")
    }
    enum WaitFuncRet wait_ret = player_wait_for_frame(player,
           player->audio_clock + AUDIO_TIME_ADJUST_US, stream_no);
    if (wait_ret == WAIT_FUNC_RET_SKIP) {
       goto end;
    }

    LOGI(10, "player_write_audio Writing sample data")

    jbyte *jni_samples = (*env)->GetByteArrayElements(env, samples_byte_array,
           NULL);
    memcpy(jni_samples, data, data_size);
    (*env)->ReleaseByteArrayElements(env, samples_byte_array, jni_samples, 0);

    LOGI(10, "player_write_audio playing audio track");
    ret = (*env)->CallIntMethod(env, player->audio_track,
           player->audio_track_write_method, samples_byte_array, 0, data_size);
    jthrowable exc = (*env)->ExceptionOccurred(env);
    if (exc) {
       err = -ERROR_PLAYING_AUDIO;
       LOGE(3, "Could not write audio track: reason in exception");
       // TODO maybe release exc
       goto free_local_ref;
    }
    if (ret < 0) {
       err = -ERROR_PLAYING_AUDIO;
       LOGE(3,
               "Could not write audio track: reason: %d look in AudioTrack.write()", ret);
       goto free_local_ref;
    }

    free_local_ref:
    LOGI(10, "player_write_audio releasing local ref");
    (*env)->DeleteLocalRef(env, samples_byte_array);

    end: return err;

    }

    I will be pleased for any help !!!! Thank you very much !!!!

  • Merge commit 'a25dac976a4478331e4db86d44c3db4456c93eff'

    27 septembre 2017, par James Almer
    Merge commit 'a25dac976a4478331e4db86d44c3db4456c93eff'
    

    * commit 'a25dac976a4478331e4db86d44c3db4456c93eff' :
    Use bitstream_init8() where appropriate

    This commit is a noop, see
    http://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209609.html

    Merged-by : James Almer <jamrial@gmail.com>