Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (39)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (7815)

  • tv unable to playback ffmpeg converted media

    27 juin 2017, par Sambir

    I am trying to convert some raw video camerafiles using the following ffmpeg commmand. after conversion the pc plays back the files without any problem. also the phone plays it back using vlc. but the tv gives unsupported format. the tv plays back all files even h265 but only this file it gives an error. any help is appreciated :

    ffmpeg command :

    ffmpeg -i 1.mov -map_metadata -1 -c:v libx264 -c:a aac -ac 2 -b:a 128k -strict -2 -crf 23 -preset veryfast -threads 0 converted/1.mp4

    and this is the ffmpeg info of the original file :

    built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
     configuration: --prefix=/root/ffmpeg/target --extra-cflags='-I/root/ffmpeg/target/inclu     de -static' --extra-ldflags='-L/root/ffmpeg/target/lib -lm -static' --extra-version=Xtrea     m-Codes --enable-nonfree --enable-openssl --disable-debug --disable-shared --enable-libx2     65 --enable-static --extra-cflags=--static --disable-ffplay --disable-ffserver --disable-     doc --enable-gpl --enable-pthreads --enable-postproc --enable-libass --enable-gray --enab     le-runtime-cpudetect --enable-gnutls --enable-libmp3lame --enable-libopus --enable-libthe     ora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-bzlib --enable-zlib --e     nable-version3 --enable-libvpx --enable-libxavs --disable-devices --enable-librtmp --extr     a-libs='-lrtmp -lnettle -lhogweed -lgmp -lssl -lcrypto -lz -lc -ldl'
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 28.100 / 56. 28.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 12.100 /  5. 12.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 0
       compatible_brands: qt
       creation_time   : 2017-05-18 07:39:04
     Duration: 00:10:38.28, start: 0.000000, bitrate: 239010 kb/s
       Stream #0:0(und): Video: prores (apcn / 0x6E637061), yuv422p10le(bt709), 1920x1080, 2     36756 kb/s, SAR 1:1 DAR 16:9, 50 fps, 50 tbr, 5k tbn, 5k tbc (default)
       Metadata:
         creation_time   : 2017-05-18 07:39:04
         handler_name    : Core Media Data Handler
         encoder         : Apple ProRes 422
         timecode        : 00:00:00:00
       Stream #0:1(und): Audio: pcm_s24le (lpcm / 0x6D63706C), 44100 Hz, stereo, s32 (24 bit     ), 2116 kb/s (default)
       Metadata:
         creation_time   : 2017-05-18 07:39:04
         handler_name    : Core Media Data Handler
       Stream #0:2(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
       Metadata:
         creation_time   : 2017-05-18 07:39:04
         handler_name    : Core Media Data Handler
         timecode        : 00:00:00:00
    At least one output file must be specified

    After conversion i get like 1.mp4,2.mp4,3.mp4... then I concat them using concat command to one file. all went ok without any problem but the tv does not support the file.

    I found out it is encoded with apple prores so I googled some conversion commands but they also did not seem to help like this :

    yuv422p, lossless audio
    ffmpeg -i "input.mov" -pix_fmt "yuv422p" -vcodec libx264 -preset medium -qp 0 -acodec pcm_s16le "output_yuv422p.mkv"

    yuv422p, aac audio
    ffmpeg -i "input.mov" -pix_fmt "yuv422p" -vcodec libx264 -preset medium -qp 0 -acodec -acodec libvo_aacenc -b:a 256K "output_yuv422p.mp4"
  • Problems of using MediaCodec.getOutputFormat() for an encoder in Android 4.1/4.2 devices

    13 mars 2014, par Mark

    I'm trying to use MediaCodec to encode frames (either by camera or decoder) into a video.
    When processing the encoder output by dequeueOutputBuffer(), I expect to receive the return index = MediaCodec.INFO_OUTPUT_FORMAT_CHANGED, so I can call getOutputFormat() to get the encoder output format as the input of the currently used ffmpeg muxer.

    I have tested some pad/phone devices with Android version 4.1 4.3. All of them have at least one hardware video AVC encoder and is used in the test. On the devices with version 4.3, the encoder gives MediaCodec.INFO_OUTPUT_FORMAT_CHANGED before writing the encoded data as expected, and the output format returned from getOutputFormat() can be used by the muxer correctly. On the devices with 4.2.2 or lower, the encoder never gives MediaCodec.INFO_OUTPUT_FORMAT_CHANGED while it can still output the encoded elementary stream, but the muxer cannot know the exact output format.

    I want to ask the following questions :

    1. Does the behavior of encoder (gives MediaCodec.INFO_OUTPUT_FORMAT_CHANGED or not before outputing encoded data) depend on the Android API Level or the chips on individual devices ?
    2. If the encoder writes data before MediaCodec.INFO_OUTPUT_FORMAT_CHANGED appears, is there any way to get the output format of the encoded data ?
    3. The encoder still output the codec config data (with flag MediaCodec.BUFFER_FLAG_CODEC_CONFIG) on the devices before the encoded data. It is mostly used to config a decoder, but can I derive the output format by the codec config data ?

    I have tried these solutions to get the output format but failed :

    • Call getOutputFormat() frequently during the whole encode process. However, all of them throw IllegalStateException without the appearance of MediaCodec.INFO_OUTPUT_FORMAT_CHANGED.
    • Use the initial MediaFormat use to config the encoder at the beginning, like the example :

      m_init_encode_format = MediaFormat.createVideoFormat(m_encode_video_mime, m_frame_width, m_frame_height);
      int encode_bit_rate = 3000000;
      int encode_frame_rate = 15;
      int encode_iframe_interval = 2;

      m_init_encode_format.setInteger(MediaFormat.KEY_COLOR_FORMAT, m_encode_color_format);
      m_init_encode_format.setInteger(MediaFormat.KEY_BIT_RATE, encode_bit_rate);
      m_init_encode_format.setInteger(MediaFormat.KEY_FRAME_RATE, encode_frame_rate);
      m_init_encode_format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, encode_iframe_interval);

      m_encoder = MediaCodec.createByCodecName(m_video_encoder_codec_info.getName());
      m_encoder.configure(m_init_encode_format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);

      // Assume m_init_encode_format is the output format of the encoder

      However it fails since the output format of the encoder is still "changed" from the initial one.

    Please help me to realize the behavior of an encoder, and if there is any solution to query the output format if the required MediaCodec.INFO_OUTPUT_FORMAT_CHANGED is missing.


    By comparing the output format and the codec config data, the missing fields are csd-0, csd-1, and a "what" field with value = 1869968451.
    (I do not understand the "what" field. It seems to be a constant and is not required. Can anyone tell me about its meaning ?)

    If I parse the codec config data as the csd-1 field (last 8 bytes) and csd-0 field (remaining bytes), it seems that the muxer can work correctly and output a video playable on all of the testing devices.
    (But I want to ask : is this 8-byte assumption correct, or there is more reliable way to parse the data ?)

    However, I got another problem that If I decode the video by Android MediaCodec again, the BufferInfo.presentationTimeUs value get by dequeueOutputBuffer() is 0 for most of the decoded frames. Only the last few frames has correct time. The sample time get by MediaExtractor.getSampleTime() is correct and exactly the value I set to the encoder/muxer, but the decoded frame time is not. This issue only happen on 4.2.2 or lower device.

    It is strange that the frame time is incorrect but the video can be playback in correct speed on the device. (Most of the devices with 4.2.2 or lower I've tested has only 1 Video AVC decoder.) Do I need to set other fields that may affect the presentation time ?

  • FFmpeg can't run in some device Android

    30 mars 2016, par tqn

    i’m working in a video processing project and now i’m using ffmpeg library in Android. I’m facing with a strange problem with asus zenphone 4 t00l (or all x86 device, I’ve just test in this x86 phone). When start command in project, app always crash :

    03-30 15:08:18.461 21068-21068/com.paditech.videa I/FFmpeg: Loading FFmpeg for armv7-neon CPU
    03-30 15:08:18.781 21068-21068/com.paditech.videa I/System.out: Success........
    03-30 15:26:12.933 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 59
    03-30 15:26:12.933 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 63
    03-30 15:26:15.913 21068-21068/com.paditech.videa D/VideoActivity: onDestroy
    03-30 15:26:18.993 21068-21068/com.paditech.videa I/FFmpeg: Loading FFmpeg for armv7-neon CPU
    03-30 15:26:19.263 21068-21068/com.paditech.videa I/System.out: Success........
    03-30 15:26:42.583 21068-21184/com.paditech.videa D/FFmpeg: Running publishing updates method
    03-30 15:26:42.583 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 59
    03-30 15:26:42.583 21068-21068/com.paditech.videa E/IMGSRV: :0: PVRDRMOpen: TP3, ret = 85
    03-30 15:26:42.683 21068-21068/com.paditech.videa D/VideoActivity: /data/data/com.paditech.videa/files/ffmpeg[1]: syntax error: '-�-4�' unexpected
    03-30 15:26:42.683 21068-21068/com.paditech.videa D/VideoActivity: /data/data/com.paditech.videa/files/ffmpeg[1]: syntax error: '-�-4�' unexpected

    First, I think the problem is ffmpeg library. So I created a test module with simple activity just load and run command and there’re no problem.

    Second, I’m afraid that app cannot load version ffmpeg, because in my log, it’s armv7-neon althought it’s x86 (In my test module, it display x86). And according my search result, may be a external library make app to use abi arm (Build.CPU_API="armv7"). So I try remove all library in gradle in module Test and detected a library. But check in aar file of library, it support all x86 and arm. But after remove it, app still crash with same log. And strangely, althogh Test module register as arm but it’still run success (External question : Why add library jp.wasabeef:picasso-transformations make system register as armv7 although it’s x86)

    Finally, i think problem is command. But after debug, I use same command for Test module but it still success. Now i’m still stuck with it. Could anyone help me to solve it. Thanks. Here my demo code :

       String input = "/storage/emulated/0/Videa/Video/VIDEO_20160122_160020.mp4";
       String output = "/storage/emulated/0/Videa/Audio/AUDIO_20160330_142501.wav";
       String[] command = {
               "-y",
               "-i",
               input,
               "-vn",
               "-f",
               "wav",
               output
       };
       FFmpeg ffmpeg = FFmpeg.getInstance(getApplicationContext());
       try {
           ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {

               @Override
               public void onSuccess(String message) {
                   super.onSuccess(message);
                   System.out.println("Success " + message);
               }

               @Override
               public void onFailure(String message) {
                   super.onFailure(message);
                   System.out.println("Failure " + message);
               }
           });
       } catch (Exception e) {
           e.printStackTrace();
       }

    And here is Failed command :

       ArrayList<string> cmd = new ArrayList<string>();
       cmd.add("-y");
       cmd.add("-i");
       cmd.add(input);
       cmd.add("-vn");
       cmd.add("-f");
       cmd.add("wav");
       cmd.add(output);
       String[] result = new String[cmd.size()];
       return cmd.toArray(result);
    </string></string>