Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (36)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (7522)

  • discord.py nextcord.py It cant read mp3 audio files

    23 février 2023, par hihihi hihihi

    I'm trying to make my discord bot speak some text, but I can't make it stream the generated mp3 audio file. I'm using Nextcord and FFmpeg.

    


    This is the code I run :

    


    @bot.command(name="bottalk")
async def bottalk(ctx, *args):
    text = " ".join(args)
    user = ctx.message.author
    if user.voice != None:
        try:
            vc = await user.voice.channel.connect()

        except:
            vc = ctx.voice_client   

        sound = gTTS(text=text, lang="en", slow=False)  
        sound.save("please read this.mp3")

        if vc.is_playing():
            vc.stop()

        source = await nextcord.FFmpegOpusAudio.from_probe("please read this.mp3", method="fallback")
        vc.play(source)
    else:
        await ctx.send("join vc")    


    


    When I run the code it generates the mp3 audio file but cannot play the audio file. I get this error :

    


    Ignoring exception in command bottalk:&#xA;Traceback (most recent call last):&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\core.py", line 165, in wrapped&#xA;    ret = await coro(*args, **kwargs)&#xA;          ^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "c:\Users\gmmz5\OneDrive\เดสก์ท็อป\python\qweqwewqeqewqe\hi.py", line 4&#xA;5, in tts&#xA;    source = await nextcord.FFmpegOpusAudio.from_probe("please read this.mp3", method="fallback")&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 496, in from_probe&#xA;    return cls(source, bitrate=bitrate, codec=codec, **kwargs)  # type: ignore           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 426, in __init__&#xA;    super().__init__(source, executable=executable, args=args, **subprocess_kwargs)&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 165, in __init__&#xA;    self._process: subprocess.Popen = self._spawn_process(args, **kwargs)     &#xA;                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^     &#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 184, in _spawn_process&#xA;    raise ClientException(executable &#x2B; " was not found.") from None&#xA;nextcord.errors.ClientException: ffmpeg was not found.&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\bot.py", line 1381, in invoke&#xA;    await ctx.command.invoke(ctx)&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\core.py", line 948, in invoke&#xA;    await injected(*ctx.args, **ctx.kwargs)&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\core.py", line 174, in wrapped&#xA;    raise CommandInvokeError(exc) from exc&#xA;nextcord.ext.commands.errors.CommandInvokeError: Command raised an exception: &#xA;ClientException: ffmpeg was not found.&#xA;Exception ignored in: <function at="at" 0x0000022c43a47ba0="0x0000022c43a47ba0">    &#xA;Traceback (most recent call last):&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 116, in __del__&#xA;    self.cleanup()&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 235, in cleanup&#xA;    self._kill_process()&#xA;  File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 191, in _kill_process&#xA;    proc = self._process&#xA;           ^^^^^^^^^^^^^&#xA;AttributeError: &#x27;FFmpegOpusAudio&#x27; object has no attribute &#x27;_process&#x27;&#xA;</function>

    &#xA;

  • ffmpeg - over 1000 files into a mp4

    20 octobre 2013, par Fabrizio

    I am using FreeBSD and ffmpeg and I am trying to convert over 1000 files into an mp4. Keep in mind that I am completely NEW to ffmpeg and that in the future I might have up to 3600 images.

    I was thinking that simply executing :

    ffmpeg -i /usr/local/www/tmp/phpFa5LT3/*.jpg -r 2 output.mp4

    would work, but I keep getting

    ffmpeg version 0.7.12, Copyright (c) 2000-2011 the FFmpeg developers
     built on Jun  9 2013 12:48:13 with gcc 4.2.1 20070831 patched [FreeBSD]
     configuration: --prefix=/usr/local --mandir=/usr/local/man --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect --cc=cc --extra-cflags=&#39;-msse -I/usr/local/include/vorbis -I/usr/local/include&#39; --extra-ldflags=&#39;-L/usr/local/lib &#39; --extra-libs=-pthread --disable-debug --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libcelt --disable-libdirac --disable-libfaac --enable-libfreetype --enable-frei0r --disable-libgsm --disable-libmp3lame --enable-libopencv --enable-libopenjpeg --disable-librtmp --enable-libschroedinger --disable-ffplay --disable-libspeex --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
     libavutil    50. 43. 0 / 50. 43. 0
     libavcodec   52.123. 0 / 52.123. 0
     libavformat  52.111. 0 / 52.111. 0
     libavdevice  52.  5. 0 / 52.  5. 0
     libavfilter   1. 80. 0 /  1. 80. 0
     libswscale    0. 14. 1 /  0. 14. 1
     libpostproc  51.  2. 0 / 51.  2. 0
    Input #0, image2, from &#39;20131019205500.jpg&#39;:
     Duration: 00:00:00.50, start: 0.000000, bitrate: N/A
       Stream #0.0: Video: mjpeg, yuvj420p, 320x240 [PAR 96:96 DAR 4:3], 2 tbr, 2 tbn, 2 tbc
    Too many output files

    When I try :

    ffmpeg -y -f image2 -r 4 -i /usr/local/www/tmp/phpFa5LT3/%14d.jpg output.mp4

    I get :

    [same output but last line reads]
    /usr/local/www/tmp/phpFa5LT3/%12d.jpg: No such file or directory

    If I reduce the number of files to just a 100 or so, I can do it without any problems... Do you know what the problem might be ?

    #ulimit -a
    cpu time               (seconds, -t)  unlimited
    file size           (512-blocks, -f)  unlimited
    data seg size           (kbytes, -d)  33554432
    stack size              (kbytes, -s)  524288
    core file size      (512-blocks, -c)  unlimited
    max memory size         (kbytes, -m)  unlimited
    locked memory           (kbytes, -l)  unlimited
    max user processes              (-u)  5547
    open files                      (-n)  230400
    virtual mem size        (kbytes, -v)  unlimited
    swap limit              (kbytes, -w)  unlimited
    sbsize                   (bytes, -b)  unlimited
    pseudo-terminals                (-p)  unlimited
  • How to play an local video in arbitrary codec and format in browser ? [closed]

    24 septembre 2023, par HanXu

    I am developing a video player in browser to let the user select a local video to play, and want to support as many video formats as possible. I know that in browser a video tag can only play videos in a limited set of codecs, and on desktop libraries like VLC can play literally any videos. I would like to bring that broad compatibility to the browser, but not sure how to achieve it.

    &#xA;

    One thing come up in my mind is to let the user run a thin client natively, which read the local video and stream it at, say, http://localhost:8080, in some web-friendly codec and format, and in the frontend I use a video with src to be http://localhost:8080.

    &#xA;

    In the client I think I need to run some ffmpeg command to somehow stream and process the video in real-time. I also run into the libVLC which seems nice, and am not sure which one to use.

    &#xA;

    Furthermore, I need to enable the user to seek to any arbitrary timestamp, and am not sure if the streaming technic supports it.

    &#xA;

    I have done some googling, and found a method which first runs a ffmpeg command as

    &#xA;

    VIDSOURCE="/some/video.mp4"&#xA;AUDIO_OPTS="-c:a aac -b:a 160000 -ac 2"&#xA;VIDEO_OPTS="-s 854x480 -c:v libx264 -b:v 800000"&#xA;OUTPUT_HLS="-hls_time 10 -hls_list_size 10 -start_number 1"&#xA;ffmpeg -i "$VIDSOURCE" -y $AUDIO_OPTS $VIDEO_OPTS $OUTPUT_HLS /some/public/video.m3u8&#xA;

    &#xA;

    and in the frontend I can use the react-player to play the video like

    &#xA;

    <reactplayer url="/some/public/video.m3u8"></reactplayer>&#xA;

    &#xA;

    However, I can not seek to an arbitrary timestamp, and the ffmpeg command creates a lot of .ts files one by one about which I am not sure what is going on. It seems that before it creates a video77.ts, I can not seek to timestamp within that segment.

    &#xA;

    All in all, I am looking for some solution like

    &#xA;

    enter image description here

    &#xA;

    that supports

    &#xA;

      &#xA;
    • playing videos in browsers in as many codecs and formats as possible,
    • &#xA;

    • allowing users to seek to any arbitrary timestamp.
    • &#xA;

    &#xA;

    Since many native video player like VLC supports it, I believe it can be done. Does anyone have any idea that may help ? Appreciate in advance !

    &#xA;