
Recherche avancée
Autres articles (38)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (6265)
-
How to link the ffmpeg transcoding process information into a vb6 GUI app ?
19 décembre 2019, par melaosi’m playing with a vb6 gui frontend for ffmpeg and as of now all i can do is to call the ffmpeg via cmd.exe which will shows the command prompt while the whole process is still running. And i thought this was the norm seeing how WinFF, another pascal based frontend gui for ffmpeg works.
But i was blown away when i saw this other GVC gui which has a progress bar and everything.
So basically, i’m looking into a way how i could cleanly hide the whole command prompt and link the transcoding progress to a progress bar into my gui.
So here’s my plan, I’m thinking of finding a win32 api function which i can call the cmd line and yet hide it, and from another discussion here, i think i would have to read the log file to get the ffmpeg progress information.
So which function should i call for the win32 api ?
And does anyone knows of a better/easier way to get this done ?
thanksUpdates :
In case anybody is interested, i find a nice class module on how to grab the cmd output into my vb6 app, and it’s by none other than the great joacim :)
-
Delete file after discord.FFmpegPCMAudio is done playing
12 novembre 2023, par MoniI want to delete a mp3 file in the same directory after discord.FFmpegPCMAudio is done playing, but i don't know how ! I've searched everywhere before posting here, but with no luck.


@bot.command(name='play')
async def play(ctx, url):
 global current_audio_file
 voice_client = ctx.guild.voice_client

 if voice_client.is_connected():
 if ctx.author.voice and ctx.author.voice.channel == voice_client.channel:
 try:
 server = ctx.guild
 voice_channel = server.voice_client

 async with ctx.typing():
 if "youtube" or "youtu" in url:
 result, title = await download_youtube_audio(url)
 result_b = bytes(result, "utf-8")
 audio_file_name = codecs.decode(result_b, 'charmap')

 audio_file, title2 = find_file(audio_file_name, 2)
 elif "spotify" in url:
 result = await download_spotify_audio(url)
 result_b = bytes(result, "utf-8")
 audio_file_name = codecs.decode(result_b, 'charmap')

 audio_file, title = find_file(audio_file_name, 1)

 if result:
 if "ERROR" not in result:
 await ctx.send(f'**Now playing:** {title}')

 if not voice_channel.is_playing():
 voice_channel.on_audio_end = lambda e: asyncio.create_task(delete_file(audio_file))

 voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=audio_file))
 current_audio_file = audio_file
 else:
 await ctx.send("Another song is playing right now!")
 else:
 print(f"An error occurred while trying to download the audio. Error: {result}")
 send_error(ctx, Exception(result))
 else:
 await ctx.send("An error occurred while trying to download the audio.")
 except Exception as e:
 print(f"An error occurred: {e}")
 send_error(ctx, e)
 await ctx.send("An error occurred while trying to play the audio.")
 else:
 await ctx.send("You are not in the same voice channel as the bot.")
else:
 await ctx.send("The bot is not connected to a voice channel.")

def delete_file(filename: str):
if os.path.exists(filename):
 os.remove(filename)
 print(f"Deleted {filename}")



If anyone knows how to do it, please help me out.


-
FFMPEG MP3 file size much larger than expected on Windows 10
8 avril 2018, par The GoraI’ve been using FFMPEG on Windows to :
- Convert iTunes M4A files to MP3s (with a bit rate of 128k) ; and
- Create 30 sec sample MP3s of the above MP3s (same bit rate).
When I run FFMEG on a Windows 7 64 bit machine, the size of the MP3s (both for 1. & 2.) is in line with the rough calculation of :
(Audio length in seconds) X (Bit rate)
For example, a 4 minute audio yields an approx. 3.7MB MP3 file ; a 30 second sample MP3 is approx. 470KB.
However when I run the same FFMPEG binary (copied from the Windows 7 machine) on a Windows 10 64 bit machine, all of the MP3s (both for 1. and for 2.) are inflated by approx 5MB. I’m using the same batch file on both machines to execute FFMEG with the required parameters, so pretty confident the difference is not down to user error.
My questions are :
- Why is there this apparent 5MB overhead on Windows 10 ? and more importantly ;
- What can I do to remove this ?
The large file size is a problem as the sample MP3s are to be put on a website for people to listen to a snippet of the song, and the webpage with multiple tags takes a long time to load completely (several minutes).
Here is the version and lib info :
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
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
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100And here are the command lines I’m using :
- ffmpeg -i input.m4a -id3v2_version 3 -b:a 128k -output.mp3
- ffmpeg -i input.m4a -ss 30 -t 30 -af "afade=in:st=30:d=5,afade=out:st=55:d=5" -id3v2_version 3 -b:a 128k -output.mp3