Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (37)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5148)

  • ffmpeg - escaping single quotes doesn't work [duplicate]

    18 septembre 2022, par XorOrNor

    I've written a small python script for mass converting audio files. It uses ffmpeg. The problem is it doesn't work for files with single quotes in their filenames.

    


    script :

    


    
import os
import subprocess
import sys
from multiprocessing.pool import ThreadPool as Pool

source_dir="/home/kris/Music/test"
output_dir="/home/kris/Music/test_opus"

def worker(file):

    try:    
        dirname=os.path.dirname(file)
        file=file.replace("'","\\\\'")
        filename=file.split('.flac')[0]
        
        input_file=f"'{source_dir}/{file}'"
        output_file=f"'{output_dir}/{filename}.opus'"
        cmd="ffmpeg -n -i "+input_file+" -c:a libopus -b:a 320k "+output_file
        print(cmd)
        result = subprocess.call(cmd,stdout=subprocess.PIPE,shell=True)
    except:
        print('item error')
        

def start():    
    threads=os.cpu_count()  
    pool = Pool(threads)
    files=os.listdir(source_dir)
    for item in files:
        pool.apply_async(worker, (item,))

    pool.close()
    pool.join()
        
start()



    


    Testing :

    


      

    1. Filename : I'm a file.flac

      


    2. 


    3. When escaping single quote ' with double backslashes \\ - file=file.replace("'","\\\\'") the cmd for ffmpeg is :

      


    4. 


    


    ffmpeg -n -i '/home/kris/Music/test/I\\'m a file.flac' -c:a libopus -b:a 320k '/home/kris/Music/test_opus/I\\'m a file.opus'


    


    ffmpeg returns an error : /home/kris/Music/test/I\\m: No such file or directory

    


      

    1. When escaping single quote ' with a single backslash \ - file=file.replace("'","\\'") the cmd for ffmpeg is :
    2. 


    


    ffmpeg -n -i '/home/kris/Music/test/I\'m a file.flac' -c:a libopus -b:a 320k '/home/kris/Music/test_opus/I\'m a file.opus'


    


    I got an error :

    


    /bin/sh: 1: Syntax error: Unterminated quoted string


    


    According to ffmpeg docs : https://ffmpeg.org/ffmpeg-utils.html#toc-Examples escaping with single backslash should work.

    


  • Missing audio stream which is required by this ffm at Raspberry PI using ffmpeg

    17 mai 2014, par batuman

    I am trying to stream video from my Raspberry PI using ffserver, raspivid and ffmpeg. My command is as follow

    ffserver -f /etc/ffserver.conf & raspivid -vf -t 0 -w 450 -h 200 -fps 25 -b 2000000 -o - | ffmpeg -f h264 -r 25 -c:v h264 -i - -c:v libx264 -c:a libmp3lame http://localhost:8090/feed1.ffm

    It looks working, I see the video displayed on the monitor and got the error as

    Missing audio stream which is required by this ffm

    The whole output at console is as follow.

    ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
     built on May 10 2014 17:04:06 with gcc 4.6 (Debian 4.6.3-14+rpi1)
     configuration: --prefix=/home/pi/ffmpeg_build --extra-cflags=-I/home/pi/ffmpeg_build/include --extra-ldflags=-L/home/pi/ffmpeg_build/lib --bindir=/home/pi/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
     libavutil      52. 82.100 / 52. 82.100
     libavcodec     55. 60.103 / 55. 60.103
     libavformat    55. 37.102 / 55. 37.102
     libavdevice    55. 13.101 / 55. 13.101
     libavfilter     4.  5.100 /  4.  5.100
     libswscale      2.  6.100 /  2.  6.100
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, h264, from 'pipe:':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: h264 (High), yuv420p, 450x200, 25 fps, 25 tbr, 1200k tbn, 50 tbc
    Sat May 17 07:10:56 2014 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
    Missing audio stream which is required by this ffm

    I searched and found that I have to use blank audio using libmp3lame. Is it the only way to do ?And can’t find installer for linux for libmp3lame.

  • ImportError : FFmpeg libraries are not found. Please install FFmpeg in ubuntu 22.04 LTS

    8 juin 2023, par Schrödinger's Cat

    Here i am using diart library for audio transcription using whisper open ai model model for one dependency is throwing error that i mention in the question here is my

    


    Traceback (most recent call last):&#xA;File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site- &#xA;packages/torchaudio/_extension.py", line 71, in _init_ffmpeg&#xA;_load_lib("libtorchaudio_ffmpeg")&#xA;File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site- &#xA;packages/torchaudio/_extension.py", line 52, in _load_lib&#xA;torch.ops.load_library(path)&#xA;File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site- &#xA;packages/torch/_ops.py", &#xA;line 573, in load_library&#xA;ctypes.CDLL(path)&#xA;File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__&#xA;self._handle = _dlopen(self._name, mode)&#xA;OSError: libavdevice.so.58: cannot open shared object file: No such file or directory&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;File "/home/vkyc/Desktop/audio_streaming/LiveStream.py", line 13, in <module>&#xA;from diart.sources import MicrophoneAudioSource&#xA;File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site- &#xA;packages/diart/sources.py", line 11, in <module>&#xA;from torchaudio.io import StreamReader&#xA;File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site- &#xA;packages/torchaudio/io/__init__.py", line 21, in __getattr__&#xA;torchaudio._extension._init_ffmpeg()&#xA;File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site- &#xA;packages/torchaudio/_extension.py", line 73, in _init_ffmpeg&#xA;raise ImportError("FFmpeg libraries are not found. Please install FFmpeg.") from err&#xA;ImportError: FFmpeg libraries are not found. Please install FFmpeg.&#xA;</module></module>

    &#xA;

    i tried pip install python-ffmpeg&#xA;also install from system using the command sudo apt install ffmpeg&#xA;although all ffmpeg install on system using pip and also from terminal using sudo apt command but still throwing same error

    &#xA;

    ImportError: FFmpeg libraries are not found. Please install &#xA;FFmpeg&#xA;

    &#xA;

    if any one know about please resove this error

    &#xA;