Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (111)

  • 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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

Sur d’autres sites (6592)

  • Use ffmpeg to segment streaming video

    4 décembre 2022, par Marc

    Suppose I have a streaming video URL rtsp ://whatever and I wish to store that video stream to my file system as a series of files off approximately the same size or duration. Ideally I would like to store the files with a start and stop timestamp as part of the filename, and each file should be such that it can stand on its own to be displayed as a video file if someone wants to view it. I understand that ffmpeg has a segment command option that allows me to segment by time and store in a series of files like outfile%3d.dat or whatever. But suppose I want to do this perpetually and cycle the files (age out old ones) when the total size of all the saved files exceeds a specific value. For example, suppose I want to save the most recent 500GB of video from this streaming URL and keep doing this day after day continuously into the distant future. What happens to the output filename after outfile999.dat is saved ? Does the count start over at 0 ? Or does ffmpeg just stop or crash ? Is there an ffmpeg command that can segment and age out old files, or is this something I would have to do running another program simultaneously or would I have to hack into ffmpeg itself to do this ? I'm pretty new to ffmpeg so any suggestions you ffmpeg experts might have on how to do this would be welcome. I also welcome suggestions for other command line Linux tools that might be better for this application.

    



    UPDATE : So it turns out that ffmpeg has a segmenter built in, and I can segment the files such that the filenames have the video start datetime as part of the filename. I used a command like this :

    



    ffmpeg -i rtsp://camera_feed_url_here -c copy -f segment -segment_list out.list -segment_time 900 \ -segment_atclocktime 1 -strftime 1 "%Y-%m-%d_%H-%M-%S.mkv"


    



    That's the good news. The bad news is that when I run this command, after about 1 minute it just throws this error and stops :

    



    rtsp ://camera_feed_url_here : Invalid data found when processing input

    



    No other error or diagnostic mesages are printed out. Even when I run with -loglevel debug, it just seems to die with this error message.

    



    When I built ffmpeg, used this :

    



    ./configure --enable-demux='rtsp,rtp,sdp,flac,gif,image2,image2pipe,matrosk' --enable-network --enable-protocols --enable-decoder=h264


    



    Any ideas what I'm doing wrong and how I can make this error go away ?

    


  • Normalizing audio of several wav snippets with ffmpeg

    17 mai 2023, par dick_kickem

    I searched the site and I figured that maybe ffmpeg-normalize could be part of my solution but I'm really not sure.

    


    In my free time me and my friends create quizzes for people to solve. One of these is a music quiz, where you hear audio snippets and have to guess the artist and song title. A few years back I did most of them using Audacity, which means recording snippets from existing videos, inserting fade in and fade out to every snippet, putting announcements like "Number x" before the x-th song and also making sure that all songs are fairly of equal loudeness (-6.0 dB).

    


    The result in Audacity looked like this.

    


    enter image description here

    


    Lazy as I am, I learned about ffmpeg and wrote a script, which does all these steps for me. The script is mostly written in bash. I use some audio files where I extract the audio in wav-format, add a fade in and fade out and then I try to set the volume to -6.0 dB as with Audacity. The part where this happens looks like this :

    


    ...[some code before]...

# write the audio details of temmp.wav into the "info" file
ffmpeg -i temp.wav -filter:a volumedetect -f null - 2> info

#check out the max volume of temp.wav
max_vol=$(grep "max_volume" info | cut -d ' ' -f5)

# determine the difference between the max volume and -6
vol_diff=$(expr "-6-($max_vol)" | bc -l)

# change temp.wav loudness by the determined difference
ffmpeg -y -i temp.wav -filter:a "volume=$vol_diff$db" $count.wav

...[some code after]...


    


    I do this with all snippets, leaving me with usually ten snippets in the format 1.wav, 2.wav and so on. Lastly, I concatenate them all with announcements in the form nr1.wav, 1.wav, nr2.wav, 2.wav and so on. Overall this works really great for me. Yet, the loudness is not quite as equal as in Audacity. Here is a screenshot of a generated music quiz using the described script (not the same music snippets as the example before) :

    


    enter image description here

    


    You can see some peaks pointing out. It's not bad and in fact, it works for me in most cases, but it's not like what I used to have with Audacity. Does anyone have any idea how to fix that to make it more equal ?

    


    Thank you in advance and kind regards

    


  • Discord FFMPEG audio wont play from yt-dlp

    19 mars 2023, par user21236822

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

    &#xA;

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

    &#xA;

    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.&#xA;https://github.com/LukeLeimbach/wallMomentMusic

    &#xA;

    Thank you in advance !

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;