Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (90)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (10026)

  • Icecast : always send a content-type

    11 novembre 2014, par Marvin Scholz
    Icecast : always send a content-type
    

    use a default (audio/mpeg for historical reason) if none. Required since Icecast 2.4.1
    Not using AVOption default because this breaks content-type warnings (needs to
    detect if no type was set by the user)

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

    • [DH] libavformat/icecast.c
  • Error with LocalAudioFile(file) returns OSError : [Errno 2] No such file or directory

    5 mars 2016, par beriukay

    Much like the question here http://developer.echonest.com/forums/thread/3843#reply, I am having the following error :

    File
    "/usr/local/lib/python2.7/dist-packages/echonest/remix/audio.py", line
    944, in init
    sampleRate=sampleRate, numChannels=numChannels) File "/usr/local/lib/python2.7/dist-packages/echonest/remix/audio.py", line
    403, in init
    self.load() File "/usr/local/lib/python2.7/dist-packages/echonest/remix/audio.py", line
    421, in load
    numChannels=self.numChannels, sampleRate=self.sampleRate, verbose=self.verbose) File
    "/usr/local/lib/python2.7/dist-packages/echonest/remix/support/ffmpeg.py",
    line 91, in ffmpeg
    close_fds=(not win) File "/usr/lib/python2.7/subprocess.py", line 710, in init
    errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception OSError : [Errno 2] No such file or directory

    I checked input and output file permissions, made sure that both files and all related file paths existed, and that I have all the relevant python tools installed. The first clue is that Subprocess.py is having trouble. Looking at ffmpeg.py on line 88, I started playing around with the Popen function call to see how and why it was misbehaving.

    Solution :

    After messing around with the ffmpeg.py file, I piped the input to the shell (shell=True instead of shell=False), which raised the following error :

    check raise Run timeError(ffmpeg_install_instructions) RuntimeError: en-ffmpeg not found! Please make sure ffmpeg is installed and create a link as follows: sudo ln -s which ffmpeg /usr/local/bin/en-ffmpeg Alternatively, import echonest.remix.support.ffmpeg and modify ffmpeg.FFMPEG to name the appropriate binary.

    So, to finalize the solution, you need to get the binary from https://ffmpeg.org/download.html#build-linux, which in Ubuntu 14.04 means you just need to :

    sudo add-apt-repository ppa:mc3man/trusty-media
    sudo apt-get update &amp;&amp; sudo apt-get upgrade
    sudo apt-get install ffmpeg
    sudo ln -s `which ffmpeg` /usr/local/bin/en-ffmpeg

    That should clear this problem right up.

  • Google Speech API returns empty result for some FLAC files, and not for the others although they have same codec and sample rate

    15 mars 2021, par Chad

    Below code is what I used to make request for transcription.

    &#xA;

    import io&#xA;from google.cloud import speech_v1p1beta1 as speech&#xA;def transcribe_file(speech_file):&#xA;    """Transcribe the given audio file."""&#xA;&#xA;    client = speech.SpeechClient()&#xA;&#xA;    encoding = speech.RecognitionConfig.AudioEncoding.FLAC&#xA;    if os.path.splitext(speech_file)[1] == ".wav":&#xA;        encoding = speech.RecognitionConfig.AudioEncoding.LINEAR16&#xA;    with io.open(speech_file, "rb") as audio_file:&#xA;        content = audio_file.read()&#xA;&#xA;    audio = speech.RecognitionAudio(content=content)&#xA;    config = speech.RecognitionConfig(&#xA;        encoding=speech.RecognitionConfig.AudioEncoding.FLAC,&#xA;        sample_rate_hertz=32000,&#xA;        language_code="ja-JP",&#xA;        max_alternatives=3,&#xA;        enable_word_time_offsets=True,&#xA;        enable_automatic_punctuation=True,&#xA;        enable_word_confidence=True,&#xA;    )&#xA;&#xA;    response = client.recognize(config=config, audio=audio)&#xA;    #print(speech_file, "Recognition Done")&#xA;    return response&#xA;

    &#xA;

    As I wrote in title, the results of response has empty list for some files, and not for some files.&#xA;They have same sample rate and codec(32000, FLAC)

    &#xA;

    Below is the result of ffprobe -i "AUDIOFILE" -show_streams for one of each cases.

    &#xA;

    Left one is empty one. The only difference is duration of file.

    &#xA;

    How can I get non empty results ?

    &#xA;

    Result of ffprobe

    &#xA;

    Edit :

    &#xA;

    Result of ffprobe show stream show format

    &#xA;

    Something not captured in one screen

    &#xA;

    Sadly, re-mux didn't work.

    &#xA;

    I used ffmpeg-git-20210225

    &#xA;

    ffbrobe result of broken one

    &#xA;

    ./ffprobe -show_streams -show_format broken.flac &#xA;ffprobe version N-56320-ge937457b7b-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;  libavutil      56. 66.100 / 56. 66.100&#xA;  libavcodec     58.125.101 / 58.125.101&#xA;  libavformat    58. 68.100 / 58. 68.100&#xA;  libavdevice    58. 12.100 / 58. 12.100&#xA;  libavfilter     7.107.100 /  7.107.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;  libpostproc    55.  8.100 / 55.  8.100&#xA;Input #0, flac, from &#x27;broken.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.45.100&#xA;  Duration: 00:00:00.90, start: 0.000000, bitrate: 342 kb/s&#xA;  Stream #0:0: Audio: flac, 32000 Hz, mono, s16&#xA;[STREAM]&#xA;index=0&#xA;codec_name=flac&#xA;codec_long_name=FLAC (Free Lossless Audio Codec)&#xA;profile=unknown&#xA;codec_type=audio&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;sample_fmt=s16&#xA;sample_rate=32000&#xA;channels=1&#xA;channel_layout=mono&#xA;bits_per_sample=0&#xA;id=N/A&#xA;r_frame_rate=0/0&#xA;avg_frame_rate=0/0&#xA;time_base=1/32000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=28672&#xA;duration=0.896000&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=16&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=0&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;[/STREAM]&#xA;[FORMAT]&#xA;filename=broken.flac&#xA;nb_streams=1&#xA;nb_programs=0&#xA;format_name=flac&#xA;format_long_name=raw FLAC&#xA;start_time=0.000000&#xA;duration=0.896000&#xA;size=38362&#xA;bit_rate=342517&#xA;probe_score=100&#xA;TAG:encoder=Lavf58.45.100&#xA;[/FORMAT]&#xA;

    &#xA;

    ffprobe result of non_broken one

    &#xA;

    ./ffprobe -show_streams -show_format non_broken.flac &#xA;ffprobe version N-56320-ge937457b7b-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers&#xA;  built with gcc 8 (Debian 8.3.0-6)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;  libavutil      56. 66.100 / 56. 66.100&#xA;  libavcodec     58.125.101 / 58.125.101&#xA;  libavformat    58. 68.100 / 58. 68.100&#xA;  libavdevice    58. 12.100 / 58. 12.100&#xA;  libavfilter     7.107.100 /  7.107.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;  libpostproc    55.  8.100 / 55.  8.100&#xA;Input #0, flac, from &#x27;non_broken.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.45.100&#xA;  Duration: 00:00:00.86, start: 0.000000, bitrate: 358 kb/s&#xA;  Stream #0:0: Audio: flac, 32000 Hz, mono, s16&#xA;[STREAM]&#xA;index=0&#xA;codec_name=flac&#xA;codec_long_name=FLAC (Free Lossless Audio Codec)&#xA;profile=unknown&#xA;codec_type=audio&#xA;codec_tag_string=[0][0][0][0]&#xA;codec_tag=0x0000&#xA;sample_fmt=s16&#xA;sample_rate=32000&#xA;channels=1&#xA;channel_layout=mono&#xA;bits_per_sample=0&#xA;id=N/A&#xA;r_frame_rate=0/0&#xA;avg_frame_rate=0/0&#xA;time_base=1/32000&#xA;start_pts=0&#xA;start_time=0.000000&#xA;duration_ts=27648&#xA;duration=0.864000&#xA;bit_rate=N/A&#xA;max_bit_rate=N/A&#xA;bits_per_raw_sample=16&#xA;nb_frames=N/A&#xA;nb_read_frames=N/A&#xA;nb_read_packets=N/A&#xA;DISPOSITION:default=0&#xA;DISPOSITION:dub=0&#xA;DISPOSITION:original=0&#xA;DISPOSITION:comment=0&#xA;DISPOSITION:lyrics=0&#xA;DISPOSITION:karaoke=0&#xA;DISPOSITION:forced=0&#xA;DISPOSITION:hearing_impaired=0&#xA;DISPOSITION:visual_impaired=0&#xA;DISPOSITION:clean_effects=0&#xA;DISPOSITION:attached_pic=0&#xA;DISPOSITION:timed_thumbnails=0&#xA;[/STREAM]&#xA;[FORMAT]&#xA;filename=non_broken.flac&#xA;nb_streams=1&#xA;nb_programs=0&#xA;format_name=flac&#xA;format_long_name=raw FLAC&#xA;start_time=0.000000&#xA;duration=0.864000&#xA;size=38701&#xA;bit_rate=358342&#xA;probe_score=100&#xA;TAG:encoder=Lavf58.45.100&#xA;[/FORMAT]&#xA;

    &#xA;

    And the result of ffmpeg -f lavfi -i sine=d=0.864:r=32000 output.flac

    &#xA;

    ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared&#xA;  WARNING: library configuration mismatch&#xA;  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, lavfi, from &#x27;sine=d=0.864:r=32000&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 512 kb/s&#xA;    Stream #0:0: Audio: pcm_s16le, 32000 Hz, mono, s16, 512 kb/s&#xA;File &#x27;output.flac&#x27; already exists. Overwrite ? [y/N] y&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (pcm_s16le (native) -> flac (native))&#xA;Press [q] to stop, [?] for help&#xA;Output #0, flac, to &#x27;output.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0: Audio: flac, 32000 Hz, mono, s16, 128 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 flac&#xA;[Parsed_sine_0 @ 0x55c317ddda00] EOF timestamp not reliable&#xA;size=      16kB time=00:00:00.86 bitrate= 154.0kbits/s speed= 205x    &#xA;video:0kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 99.364586%&#xA;

    &#xA;