Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

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

Autres articles (38)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6598)

  • ffmpeg webm encode for low powered devices

    21 février 2017, par Max Tkachenko

    I want to play transparent video into my app using built-in player over phone’s camera capture. I try to encode my video with alpha channel for android device :

    ffmpeg -i "Comp.avi" -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" output.webm

    The result is pretty good, but I have lags (freezing video from time to time) while playing it on my android phone. Is it any options to improve decode performance ?

    Some console output :

    D:\SOFT\ffmpeg-20160207-git-9ee4c89-win64-static\bin>ffmpeg -i "d:\temp\cherti\Comp 1.avi" -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" d:\temp\cherti\output.webm
    ffmpeg version N-80386-g5f5a97d Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55. 24.100 / 55. 24.100
     libavcodec     57. 46.100 / 57. 46.100
     libavformat    57. 38.100 / 57. 38.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 46.101 /  6. 46.101
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, avi, from 'd:\temp\cherti\Comp 1.avi':
     Metadata:
       date            : 2017-02-18T14:10:42.00916
       encoder         : Adobe After Effects CC 2015 (Windows)
     Duration: 00:00:05.00, start: 0.000000, bitrate: 1592542 kb/s
       Stream #0:0: Video: rawvideo, bgra, 1080x1920, 1605907 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
    File 'd:\temp\cherti\output.webm' already exists. Overwrite ? [y/N] y
    [libvpx @ 0000000002593640] v1.5.0
    [webm @ 00000000025a54e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Output #0, webm, to 'd:\temp\cherti\output.webm':
     Metadata:
       date            : 2017-02-18T14:10:42.00916
       encoder         : Lavf57.38.100
       Stream #0:0: Video: vp8 (libvpx), yuva420p, 1080x1920, q=-1--1, 200 kb/s, 24 fps, 1k tbn, 24 tbc
       Metadata:
         alpha_mode      : 1
         encoder         : Lavc57.46.100 libvpx
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))
  • Android : Recording audio in Android and then reading audio into python

    4 février 2017, par Hephaestus

    I need to record audio in an Android application that needs to be imported into Python (ndarray) for plotting and signal processing. It seemed like such a simple idea.
    I started with a simple bit of code for AAC/MPEG4 recording. Recording worked great. I can play it on the Android phone (Nexus 5X) and on a Mac (Quicktime). No problem ! Right ?!? But finding codec/formats that match between Android and Python seems to not be trivial. I’m wondering if the file/codec format written by Android is non-standard and FFMPEG can’t read it.
    If so, what is good audio format/codec that can be written simply in Android and read into an array in Python (2.7.x). Thanks.

    Details :
    Here is an abbreviated form of the android code :

    private final int AUDIO_SAMPLE_RATE = 16000;  
    private final String FILE_EXTENSION = "m4a";  // Audio file extension
    mAbsolutePathFile = workingDir + "/" + mFilename + FILE_EXTENSION;
    mMediaRecording = new MediaRecorder();
    mMediaRecording.setAudioSource (MediaRecorder.AudioSource.MIC);
    mMediaRecording.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mMediaRecording.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
    mMediaRecording.setAudioSamplingRate(AUDIO_SAMPLE_RATE);
    mMediaRecording.setOutputFile(mAbsolutePathFile);
    mMediaRecording.prepare();
    mMediaRecording.start();

    As I mentioned, the result audio plays nicely in both Android and MacOS, so all seemed well. I did a bit of searching to find a python package for AAC audio and pydub looked like the simplest (I tried audiotools, but couldn’t find sample code). To install pydub, I followed the instructions :

    pip install pydub

    and

    brew install libav --with-libvorbis --with-sdl --with-theora

    and

    brew install ffmpeg --with-libvorbis --with-ffplay --with-theora

    Following the discussions (here), i tested ffmpeg and it does execute from the command line :

     $ffmpeg
     ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with Apple LLVM version 8.0.0 (clang-800.0.42.1)

    But when I try to read the file using Python :

    import pydub
    pydub.AudioSegment.from_file("sensorlog_2017-02-03_12-50-25-345_Dev26c5_Loc27_TypeAUDIO.m4a", "aac")

    I get :

    Traceback (most recent call last):
     File "...anaconda2/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
       exec(code_obj, self.user_global_ns, self.user_ns)
     File "", line 1, in <module>
    pydub.AudioSegment.from_file("sensorlog_2017-02-03_12-50-25-345_Dev26c5_Loc27_TypeAUDIO.m4a", "aac")
    File ".../anaconda2/lib/python2.7/site-packages/pydub/audio_segment.py", line 472, in from_file
       raise CouldntDecodeError("Decoding failed. ffmpeg returned error code: {0}\n\nOutput from ffmpeg/avlib:\n\n{1}".format(p.returncode, p_err))
    CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1
    Output from ffmpeg/avlib:
    avconv version 11.4, Copyright (c) 2000-2014 the Libav developers
     built on Feb  3 2017 12:09:15 with Apple LLVM version 8.0.0 (clang-800.0.42.1)
    [aac @ 0x7ff30001cc00] get_buffer() failed
    [aac @ 0x7ff30001cc00] channel element 3.14 is not allocated
    [aac @ 0x7ff30001cc00] Sample rate index in program config element does not match the sample rate index configured by the container.
    [aac @ 0x7ff30001cc00] Input buffer exhausted before END element found
    [aac @ 0x7ff30001cc00] More than one AAC RDB per ADTS frame is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    [aac @ 0x7ff30001cc00] Error decoding AAC frame header.
    [aac @ 0x7ff300001000] Could not find codec parameters (Audio: aac, 4.0, fltp, 213 kb/s)
    [aac @ 0x7ff300001000] Estimating duration from bitrate, this may be inaccurate
    /var/folders/cm/1r6x6rbj7hn_51qvfjzj7nx80000gn/T/tmps7b8Gf: could not find codec parameters
    </module>

    In summary, is this a conflict between Android and FFMPEG ? Should I use a different codec/format ? Should I use a different Python Audio library ?
    Thanks.

  • ffmpeg : "Error setting profile"

    26 février 2017, par P. Reid

    I’ve been having trouble using ffmpeg to compress videos to something readable by quicktime. My goal in the end is to have a simple command that I can use to compress high bitrate videos (ie screencaptures) to something more reasonable to be able to share them with people.

    I want to use a command I found here as a starting point :

    ffmpeg -i input-file.avi -codec:v libx264 -profile: high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=-1:480 -threads 0 -codec:a libfdk_aac -b:a 128k output_file.mp4

    Unfortunately I get this error :

    [libx264 @ 0x7f92ab81c200] Error setting profile high.
    [libx264 @ 0x7f92ab81c200] Possible profiles: baseline main high high10 high422 high444
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    If I take out the -profile: high the command functions but the output still doesn’t open in quicktime (it does in VLC). I can’t find the keyword -profile on the ffmpeg man page : https://ffmpeg.org/ffmpeg.html so I don’t know if this is important or what to do about it.

    Does anyone know what might be causing my problem ? What should I do to try and debug this problem ? I would describe myself as inexperienced so sorry if I’m missing something obvious.

    Thanks in advance for your help,
    Peter

    This is my ffmpeg version :

    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 7.0.2 (clang-700.1.81)