
Recherche avancée
Autres articles (47)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP 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 (...) -
Support de tous types de médias
10 avril 2011Contrairement à 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 2011MediaSPIP 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 (...)
Sur d’autres sites (4667)
-
How to convert a .avif images to video with ffmpeg ?
18 mars 2023, par tousangconvert a .avif images to video with ffmpeg


by read ffmpeg doc, i run such cmd in shell :


ffmpeg -framerate 10 -pattern_type glob -i *.avif -c:v libx264 -pix_fmt yuv420p out.mp4



but only get some error :


ffmpeg version N-109896-g156ca86569 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.202)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/HEAD-156ca86_1 --enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --enable-opencl --enable-audiotoolbox --enable-videotoolbox --enable-neon --disable-htmlpages --enable-libfdk-aac --enable-libsvtav1 --enable-nonfree
 libavutil 58. 3.100 / 58. 3.100
 libavcodec 60. 4.100 / 60. 4.100
 libavformat 60. 4.100 / 60. 4.100
 libavdevice 60. 2.100 / 60. 2.100
 libavfilter 9. 4.100 / 9. 4.100
 libswscale 7. 2.100 / 7. 2.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
Option framerate not found.



my ffmpeg can convert png image to avif , i wonder if there have some ways to convert avif image to mp4 video.


thanks.


-
M3u8 with either video or audio
21 février 2023, par undercashI m facing an issue with this link that I can't seem to resolve.


The m3u8 display either the video track or the audio track, but never both, though they exist.


ffmpeg -re -i https://origin2-6play.live.6cloud.fr/pool_u81ytesz/w9/sixplayhde/hls_short_enc_w9/NA/aHEUMcx/index.m3u8
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1\~20.04)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfdk_aac --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-librtmp --enable-libass --enable-libfreetype --extra-libs=-ldl --enable-openssl
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
\[hls @ 0x562ecf699b40\] Skip ('#EXT-X-VERSION:7')
\[hls @ 0x562ecf699b40\] Skip ('## Just In Time Delivered by Quortex Solution')
\[hls @ 0x562ecf699b40\] Skip ('#EXT-X-DISCONTINUITY-SEQUENCE:0')
\[hls @ 0x562ecf699b40\] Skip ('#EXT-X-PROGRAM-DATE-TIME:2023-02-21T10:14:12.480000Z')
\[hls @ 0x562ecf699b40\] Opening 'https://url/segment_6246422.ts' for reading
Input #0, hls, from 'https://url/index.m3u8':
Duration: N/A, start: 92548.466311, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Audio: aac (LC) (\[15\]\[0\]\[0\]\[0\] / 0x000F), 48000 Hz, stereo, fltp
Metadata:
variant_bitrate : 0

ffmpeg -i url.m3u8
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1\~20.04)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfdk_aac --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-librtmp --enable-libass --enable-libfreetype --extra-libs=-ldl --enable-openssl
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
\[hls @ 0x55806439cc00\] Skip ('#EXT-X-VERSION:7')
\[hls @ 0x55806439cc00\] Skip ('## Just In Time Delivered by Quortex Solution')
\[hls @ 0x55806439cc00\] Skip ('#EXT-X-DISCONTINUITY-SEQUENCE:0')
\[hls @ 0x55806439cc00\] Skip ('#EXT-X-PROGRAM-DATE-TIME:2023-02-21T10:14:00.960000Z')
\[hls @ 0x55806439cc00\] Opening 'url/segment_6246419.ts' for reading
\[hls @ 0x55806439cc00\] Opening 'url.ts' for reading
Input #0, hls, from 'url/index.m3u8':
Duration: N/A, start: 92536.988978, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High) (\[27\]\[0\]\[0\]\[0\] / 0x001B), yuv420p, 1280x720 \[SAR 1:1 DAR 16:9\], 25 fps, 25 tbr, 90k tbn, 50 tbc
Metadata:
variant_bitrate : 0\



I put the same command on 2 different shells and on one I get the audio track, or the video one on the other..


Question : Since I have seen a site properly using this link (I had audio and video on the player) how can I use ffmpeg (or any other program ) to grab both input and output them in a single file ?


I tried to use -analyzeduration 1000M -probesize 1000M in ffmpeg parameters but it doesn't help


-
Discord FFMPEG audio wont play from yt-dlp
19 mars 2023, par user21236822My question is this : Why isn't my bot playing audio ?


I want the bot to join, play audio from queue, then disconnect without downloading an mp3 file.


I tried using youtube-dl, but I switched to the yt-dlp library after getting errors I couldn't fix.
I am running on Windows 10 locally. All my libraries are up to date.


Here are my ydl_opts and FFMPEG_OPTS :


ydl_opts = {
 'format': 'bestaudio/best',
 'postprocessors': [{
 'key': 'FFmpegExtractAudio',
 'preferredcodec': 'mp3',
 'preferredquality': '192',
 }],
}

FFMPEG_OPTIONS = {
 'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
 'options': '-vn'
} 



Here is where I believe the problem is.


async def play():
 print("Play Called")
 musicPlay()
 # Get message object from initial request
 message = ytLinkQue.get()
 print(f"Message object recieved: {message}")
 voiceChannel = message.author.voice.channel
 vc = await voiceChannel.connect()
 songsPlayed = 0
 
 while not ytLinkQue.empty():
 # Get current song
 currentSong = ytLinkQue.get()[0]
 print(f"Current song: {currentSong}")

 # Get song from Youtube
 with yt_dlp.YoutubeDL(ydl_opts) as ydl:
 # song = ydl.download(currentSong)
 info = ydl.extract_info(currentSong, download=False)
 song = info['formats'][0]['url']

 # Play Song
 vc.play(discord.FFmpegPCMAudio(song, **FFMPEG_OPTIONS), after=lambda e: print('Song done'))

 # Wait until the song has finished playing
 while vc.is_playing():
 print("playing rn")
 await asyncio.sleep(1)
 
 await vc.disconnect()
 musicStop()



When play() is called, here is the output in terminal with my annotations as **** text **** :


>python main.py
2023-02-17 15:21:09 INFO discord.client logging in using static token
2023-02-17 15:21:10 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: 60b9fce14faa5daa4aed9eb6db01a74d).
Max que: 50
Text Channel: 828698708123451434
Testing Bot#4591 is ready.
Passing message object
**** play() funciton is called ****
Play Called
Message object recieved: <message channel="<TextChannel" position="7" nsfw="False" news="False"> type= author=<member discriminator="'0199'" bot="False" nick="'Fragnk7?'" guild="<Guild" chunked="True">> flags=<messageflags value="0">>
2023-02-17 15:21:16 INFO discord.voice_client Connecting to voice...
2023-02-17 15:21:16 INFO discord.voice_client Starting voice handshake... (connection attempt 1)
2023-02-17 15:21:17 INFO discord.voice_client Voice handshake complete. Endpoint found seattle2004.discord.media
Current song: https://www.youtube.com/watch?v=vcAp4nmTZCA
[youtube] Extracting URL: https://www.youtube.com/watch?v=vcAp4nmTZCA 
[youtube] vcAp4nmTZCA: Downloading webpage 
[youtube] vcAp4nmTZCA: Downloading android player API JSON 
**** Does not play any audio ****
Playing rn
Song done
2023-02-17 15:21:18 INFO discord.player ffmpeg process 20700 successfully terminated with return code of 1.
2023-02-17 15:21:19 INFO discord.voice_client The voice handshake is being terminated for Channel ID 400178308467392513 (Guild ID 261601676941721602)
2023-02-17 15:21:19 INFO discord.voice_client Disconnecting from voice normally, close code 1000.
</messageflags></member></message>


On Discord's end, the bot successfully connects then disconnects after 2 second.


Note : I've only included code I think is relevant. Please let me know if I should add anything else to the post, otherwise, here is the github for the project. Code is in main.py.
https://github.com/LukeLeimbach/wallMomentMusic


Thank you in advance !


I've applied the advice from these posts but it still will not play audio :


-
https://stackoverflow.com/questions/45770016/how-do-i-make-my-discord-bot-play-audio-from-youtube


-
https://stackoverflow.com/questions/66070749/how-to-fix-discord-music-bot-that-stops-playing-before-the-song-is-actually-over?newreg=c70dd786cf5844e490045494223c0381


-
https://stackoverflow.com/questions/57688808/playing-music-with-a-bot-from-youtube-without-downloading-the-file