
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (99)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (8703)
-
Extracting frames from video uniformly using ffmpeg (and doing it fast)
27 mai 2024, par SergioI'm using this code to extract frames from a video :


duration=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$input_video")

# Calculate the time interval to uniformly extract frames
fps=$(bc -l <<< "($num_frames)/$duration")
fps=$(printf "%.2f" "$fps")

echo "Extracting frames..."

# Use FFmpeg to extract frames
ffmpeg -loglevel quiet -i "$input_video" -vf fps="$fps" -q:v 2 "$output_folder/frame_%04d.jpg"



This takes a lot of time even if I need a small number of frames ! I understand that ffmpeg decodes the whole video to extract the frames. Is there any way of doing this faster ? Is there a difference in the frame quality if I use another method ?


-
How do I add a sine pulse to my audio file ? I get stuck with an error with the code below : [closed]
21 mai 2024, par imabug#!/bin/bash

# Set paths to your audio files
input_file="File (File Path)"
output_file="$(dirname "Repeat Item (File Path)")/Repeat Item-watermark.mp3"

# Get the duration of the input file in seconds
input_duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$input_file")

# Run ffmpeg with the updated command
ffmpeg -y -i "$input_file" -filter_complex "
sine=frequency=438:duration=0.1,volume=12dB[beep];
aevalsrc=0:d=0.9[silence];
[beep][silence]concat=n=2:v=0:a=1[beep_pulse];
[beep_pulse]aloop=loop=-1:size=44100[heartbeat];
[0:a][heartbeat]amix=inputs=2:duration=shortest,atrim=duration=$input_duration[audio]
" -map "[audio]" -b:a 128k "$output_file"




The error message reads as follows :


[atrim @ 0x7fcf37f16080] Unable to parse option value "" as duration
Last message repeated 1 times
[atrim @ 0x7fcf37f16080] Error setting option duration to value .
[Parsed_atrim_6 @ 0x7fcf37f15f80] Error applying options to the filter.
[AVFilterGraph @ 0x7fcf37f0ff40] Error initializing filter 'atrim' with args 'duration='
Error initializing complex filters.
Invalid argument


I tried to generate an audio loop on the fly using the ffmpeg filter for sine wave generation and then mix it with the input audio. Somehow I still find this command line syntax very confusing and I am sure that I made a mistake somewhere in the code... I'm a musician :P - coding is not new to me but I don't do it all the time.


By the way the "Repeat Item" stuff and "File (File Path)" comes from Apple shortcuts. It is an object that got translated into text when I copy/pasted it here.


Thanks in advance !


-
The bot doesn't play music (discord.py)
30 avril 2024, par NaydarThe code works fine, but when using the command in guild the bot enters the voice channel but doesn't play music, immediately console gives : ffmpeg process 56560 successfully terminated with return code of 3199971767.


import discord
import youtube_dl
import ffmpeg
import requests
from discord.ext import commands

class music(commands.Cog, name = 'music'):
 def __init__(self, bot):
 self.bot = bot

 self.is_playing = False
 self.is_paused = False


 self.music_queue = []
 self.YTDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
 self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn -filter "volume=0.25"'}

 self.voice_client = None
 
 @commands.command(name="play")
 async def play(self, ctx, url):
 if not ctx.message.author.voice:
 await ctx.send("You are not connected to a voice channel.")
 return

 self.voice_channel = ctx.message.author.voice.channel
 if self.voice_client and self.voice_client.is_connected():
 await self.voice_client.move_to(self.voice_channel)
 else:
 self.voice_client = await self.voice_channel.connect()

 api_key = "my_key"
 video_id = url.split("v=")[1]
 api_url = f"https://www.googleapis.com/youtube/v3/videos?part=snippet&id={video_id}&key={api_key}"

 response = requests.get(api_url)
 if response.status_code == 200:
 data = response.json()
 title = data["items"][0]["snippet"]["title"]
 audio_url = f"https://www.youtube.com/watch?v={video_id}"
 self.voice_client.play(discord.FFmpegOpusAudio(audio_url))
 await ctx.send("Now playing: " + title)
 else:
 await ctx.send("Unable to fetch video information.")

async def setup(bot):
 await bot.add_cog(music(bot))



I tried to rewrite some YTDL and FFMPEG options
(tried to replace "noplaylist" option on "False" and terminal sent :
"discord.player : ffmpeg process 51124 successfully terminated with return code of 4294967295").
Also i checked the updates of modules.