
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (36)
-
Personnaliser les catégories
21 juin 2013, parFormulaire 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 2013Puis-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, parMediaSPIP 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 hihihiI'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:
Traceback (most recent call last):
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\core.py", line 165, in wrapped
 ret = await coro(*args, **kwargs)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "c:\Users\gmmz5\OneDrive\เดสก์ท็อป\python\qweqwewqeqewqe\hi.py", line 4
5, in tts
 source = await nextcord.FFmpegOpusAudio.from_probe("please read this.mp3", method="fallback")
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 496, in from_probe
 return cls(source, bitrate=bitrate, codec=codec, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 426, in __init__
 super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 165, in __init__
 self._process: subprocess.Popen = self._spawn_process(args, **kwargs) 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 184, in _spawn_process
 raise ClientException(executable + " was not found.") from None
nextcord.errors.ClientException: ffmpeg was not found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\bot.py", line 1381, in invoke
 await ctx.command.invoke(ctx)
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\core.py", line 948, in invoke
 await injected(*ctx.args, **ctx.kwargs)
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\ext\commands\core.py", line 174, in wrapped
 raise CommandInvokeError(exc) from exc
nextcord.ext.commands.errors.CommandInvokeError: Command raised an exception: 
ClientException: ffmpeg was not found.
Exception ignored in: <function at="at" 0x0000022c43a47ba0="0x0000022c43a47ba0"> 
Traceback (most recent call last):
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 116, in __del__
 self.cleanup()
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 235, in cleanup
 self._kill_process()
 File "C:\Users\gmmz5\AppData\Local\Programs\Python\Python311\Lib\site-packages\nextcord\player.py", line 191, in _kill_process
 proc = self._process
 ^^^^^^^^^^^^^
AttributeError: 'FFmpegOpusAudio' object has no attribute '_process'
</function>


-
ffmpeg - over 1000 files into a mp4
20 octobre 2013, par FabrizioI 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='-msse -I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --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 '20131019205500.jpg':
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 filesWhen 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 directoryIf 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 HanXuI 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.

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 avideo
withsrc
to behttp://localhost:8080
.

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.

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


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

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



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


<reactplayer url="/some/public/video.m3u8"></reactplayer>



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 avideo77.ts
, I can not seek to timestamp within that segment.

All in all, I am looking for some solution like




that supports


- 

- playing videos in browsers in as many codecs and formats as possible,
- allowing users to seek to any arbitrary timestamp.






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 !