Advanced search

Medias (1)

Tag: - Tags -/ogg

Other articles (21)

  • MediaSPIP Core : La Configuration

    9 November 2010, by

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 September 2013, by

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo; l’ajout d’une bannière l’ajout d’une image de fond;

  • Librairies et logiciels spécifiques aux médias

    10 December 2010, by

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel; FFMpeg avec le maximum de décodeurs et (...)

On other websites (7079)

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

    15 March 2021, by Chad

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

    


    import io
from google.cloud import speech_v1p1beta1 as speech
def transcribe_file(speech_file):
    """Transcribe the given audio file."""

    client = speech.SpeechClient()

    encoding = speech.RecognitionConfig.AudioEncoding.FLAC
    if os.path.splitext(speech_file)[1] == ".wav":
        encoding = speech.RecognitionConfig.AudioEncoding.LINEAR16
    with io.open(speech_file, "rb") as audio_file:
        content = audio_file.read()

    audio = speech.RecognitionAudio(content=content)
    config = speech.RecognitionConfig(
        encoding=speech.RecognitionConfig.AudioEncoding.FLAC,
        sample_rate_hertz=32000,
        language_code="ja-JP",
        max_alternatives=3,
        enable_word_time_offsets=True,
        enable_automatic_punctuation=True,
        enable_word_confidence=True,
    )

    response = client.recognize(config=config, audio=audio)
    #print(speech_file, "Recognition Done")
    return response


    


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

    


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

    


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

    


    How can I get non empty results?

    


    Result of ffprobe

    


    Edit:

    


    Result of ffprobe show stream show format

    


    Something not captured in one screen

    


    Sadly, re-mux didn't work.

    


    I used ffmpeg-git-20210225

    


    ffbrobe result of broken one

    


    ./ffprobe -show_streams -show_format broken.flac 
ffprobe version N-56320-ge937457b7b-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  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
  libavutil      56. 66.100 / 56. 66.100
  libavcodec     58.125.101 / 58.125.101
  libavformat    58. 68.100 / 58. 68.100
  libavdevice    58. 12.100 / 58. 12.100
  libavfilter     7.107.100 /  7.107.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, flac, from 'broken.flac':
  Metadata:
    encoder         : Lavf58.45.100
  Duration: 00:00:00.90, start: 0.000000, bitrate: 342 kb/s
  Stream #0:0: Audio: flac, 32000 Hz, mono, s16
[STREAM]
index=0
codec_name=flac
codec_long_name=FLAC (Free Lossless Audio Codec)
profile=unknown
codec_type=audio
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=s16
sample_rate=32000
channels=1
channel_layout=mono
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/32000
start_pts=0
start_time=0.000000
duration_ts=28672
duration=0.896000
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=16
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
[FORMAT]
filename=broken.flac
nb_streams=1
nb_programs=0
format_name=flac
format_long_name=raw FLAC
start_time=0.000000
duration=0.896000
size=38362
bit_rate=342517
probe_score=100
TAG:encoder=Lavf58.45.100
[/FORMAT]


    


    ffprobe result of non_broken one

    


    ./ffprobe -show_streams -show_format non_broken.flac 
ffprobe version N-56320-ge937457b7b-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  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
  libavutil      56. 66.100 / 56. 66.100
  libavcodec     58.125.101 / 58.125.101
  libavformat    58. 68.100 / 58. 68.100
  libavdevice    58. 12.100 / 58. 12.100
  libavfilter     7.107.100 /  7.107.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, flac, from 'non_broken.flac':
  Metadata:
    encoder         : Lavf58.45.100
  Duration: 00:00:00.86, start: 0.000000, bitrate: 358 kb/s
  Stream #0:0: Audio: flac, 32000 Hz, mono, s16
[STREAM]
index=0
codec_name=flac
codec_long_name=FLAC (Free Lossless Audio Codec)
profile=unknown
codec_type=audio
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=s16
sample_rate=32000
channels=1
channel_layout=mono
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/32000
start_pts=0
start_time=0.000000
duration_ts=27648
duration=0.864000
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=16
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
[FORMAT]
filename=non_broken.flac
nb_streams=1
nb_programs=0
format_name=flac
format_long_name=raw FLAC
start_time=0.000000
duration=0.864000
size=38701
bit_rate=358342
probe_score=100
TAG:encoder=Lavf58.45.100
[/FORMAT]


    


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

    


    ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  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
  WARNING: library configuration mismatch
  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
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, lavfi, from 'sine=d=0.864:r=32000':
  Duration: N/A, start: 0.000000, bitrate: 512 kb/s
    Stream #0:0: Audio: pcm_s16le, 32000 Hz, mono, s16, 512 kb/s
File 'output.flac' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> flac (native))
Press [q] to stop, [?] for help
Output #0, flac, to 'output.flac':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Audio: flac, 32000 Hz, mono, s16, 128 kb/s
    Metadata:
      encoder         : Lavc57.107.100 flac
[Parsed_sine_0 @ 0x55c317ddda00] EOF timestamp not reliable
size=      16kB time=00:00:00.86 bitrate= 154.0kbits/s speed= 205x    
video:0kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 99.364586%


    


  • Error with LocalAudioFile(file) returns OSError: [Errno 2] No such file or directory

    5 March 2016, by 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 && 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.

  • Mpeg Dash code having compilation issues and want to know what to do after the code is built and how to play the .mpd file generated

    11 April 2013, by niuuuu

    I'm trying to build the DashEncoder code which I downloaded from github https://github.com/slederer/DASHEncoder. Well, I followed all the instructions given in the how to compile dash file. installed Gpac n X264 and compiled both successfully. Then did make of Dashencoder and ran it as ./Dashencoder. But I found some issues in it. Got this log :

    ==========DASH ENCODER===============
    Unknown option in resourcefile : sql-pw :
    current encoder x264
    YES
    x264 encoding @ 300 kbps: Pass 1
    x264: x264 --profile baseline --preset slow --verbose --fps 24 --vbv-maxrate 300 --vbv-bufsize 600 --scenecut 0 --keyint 48 --output /opt/lampp/htdocs/tests_updates/sintel_trailer_2k_480p24_300kbit.h264 /home/niu/sintel_trailer_2k_480p24.y4m >out.txt 2>&1
    mkdir: cannot create directory `/opt/lampp/htdocs/tests_updates/sintel_300kbit': File exists
    cp: omitting directory `/opt/lampp/htdocs/tests_updates/'
    copy audio: cp /opt/lampp/htdocs/tests_updates/ /opt/lampp/htdocs/tests_updates/sintel_300kbit/MP4Box multiplexing Video: /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.h264  
    mp4box: MP4Box -add /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.h264  /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.mp4
    AVC-H264 import - frame size 854 x 480 at 24.000 FPS
    AVC Import results: 1253 samples - Slices: 27 I 1226 P 0 B - 1 SEI - 27 IDR
    Saving to /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.mp4: 0.500 secs Interleaving
    MP4Box multiplexing Audio:/opt/lampp/htdocs/tests_updates/sintel_300kbit/
    mp4box: MP4Box -add /opt/lampp/htdocs/tests_updates/sintel_300kbit/ /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.mp4
    Unknown input file type
    Unknown input file type
    Error importing /opt/lampp/htdocs/tests_updates/sintel_300kbit/: Bad Parameter
    MP4Box Cleaning ...
    mp4box: MP4Box -no-sys  /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.mp4
    Saving /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.mp4: 0.500 secs Interleaving
    MP4Box segmentation: /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.h264  
    mp4box: MP4Box -frag 2000 -dash 2000 -rap -segment-name /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.mp4
    DASH-ing file: 2.00s segments 2.00s fragments single sidx per segment
    Spliting segments at GOP boundaries
    [DASH] Generating MPD at time 2013-03-16T16:40:03Z
    DASHing file /opt/lampp/htdocs/tests_updates/sintel_300kbit/sintel_trailer_2k_480p24_300kbit.mp4
    terminate called after throwing an instance of 'std::out_of_range'
     what():  basic_string::substr
    Error: Unable to open MPD file!Aborted

    Why is this error at the end?
    and also one folder got created in my /opt/lampp/htdocs/tests_updates/sintel_300kbit.
    which has two types of files :
    27 files of .m4s extension
    1 file -sintelinit.mp4
    1 file- sintel_trailer_2k_480p24_300kbit.mp4 , which when played in vlc player played the video bt no audio! &

    1 file- sintel_trailer_2k_480p24_300kbit.h264 which cannot be opened.

    No .mpd file was created.

    Also I want to know aft creating that .mpd file how will i be able to test it on my android client say media player.

    I am damn confused with all this happening. Please help.