Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (59)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 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 (7971)

  • How to download a part of mp3 from server ?

    20 août 2020, par Sharukh Mohammed

    Use Case

    


    My use case is roughly equal to, adding a 15-second mp3 file to a 1 min video. All transcoding merging part will be done by FFmpeg-android so that's not the concern right now.

    


    The flow is as follows

    


      

    • User can select any 15 seconds (ExoPlayer-streaming) of an mp3 (considering 192Kbps/44.1KHz of 3mins = up to 7MB)
    • 


    • Then download ONLY the 15 second part and add it to the video's audio stream. (using FFmpeg)
    • 


    • Use the obtained output
    • 


    


    Tried solutions

    


      

    • Extracting fragment of audio from a url

      


      RANGE_REQUEST - I have replicated the exact same algorithm/formula in Kotlin using the exact sample file provided. But the output is not accurate (± 1.5 secs * c) where c is proportional to startTime

      


    • 


    • How to crop a mp3 from x to x+n using ffmpeg ?

      


      FFMPEG_SS - This works flawlessly with remote URLs as input, but there are two downsides,

      


        

      1. as startTime increases, the size of downloaded bytes are closer to the actual size of the mp3.
      2. 


      3. ffmpeg-android does not support network requests module (at least the way we complied)
      4. 


      


    • 


    


    So above two solutions have not been fruitful and currently, I am downloading the whole file and trimming it locally, which is definitely a bad UX.
I wonder how Instagram's music addition to story feature works because that's close to what I wanted to implement.

    


  • Unable to download a file using youtube_dl

    22 octobre 2020, par perkymaster

    I am trying to play music from a bot using ffmpeg and youtube_dl by making using of discord.py but it seems that I am unable to download the file

    


    Here is my code :

    


    voice = get(client.voice_clients, guild=ctx.guild)

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

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    print("Downloading audio now \n")
    ydl.download([url])

for file in os.listdir("./"):
    if file.endswith(".mp3"):
        name=file
        print(f"Renamed File: {file}\n")
        os.rename(file, "song.mp3")

voice.play(discord.FFmpegPCMAudio('song.mp3'), after=lambda e: print(f"{name} has finished playing"))
voice.is_playing()
voice.source=discord.PCMVolumeTransformer(voice.source)
voice.source.volume= 0.7

nname = name.rsplit("-", 2)
await ctx.send(f"Playing {nname}")
print("Playing \n")


    


    Nothing seems to happen, the bot is not playing any music.

    


    I am new to this, can anyone help ?

    


  • How to use ffmpeg-python library to download a Twitch VOD with a link retrieved using the streamlink library

    28 octobre 2020, par Daniel Norfolk

    This is the whole code, for easy reference :

    


    import urllib.request
import streamlink
import ffmpeg
stream_url = streamlink.streams("https://www.twitch.tv/videos/783301562")['best'].url
print(stream_url)

try:
    urllib.request.urlretrieve(stream_url, "vod.m3u8")
except Exception as e:
    print(e)

stream = (
    ffmpeg
    .input('vod.m3u8')
    .output('output.mp4')
    .run
)
print(stream)


    


    I am looking at a way of downloading Twitch VODs. I started with the link to a VOD : https://www.twitch.tv/videos/783301562 . I then used the code :

    


    stream_url = streamlink.streams("https://www.twitch.tv/videos/783301562")['best'].url
print(stream_url)


    


    This gave me a new link which, when I go to this link it downloaded a file with a '.m3u8' extension. This link is : https://dqrpb9wgowsf5.cloudfront.net/ab3654a5992fbfa52ccb_briziana_40240109614_1603789265/chunked/index-dvr.m3u8

    


    From here, I first tried to put the link directly into the following code :

    


    stream = (
    ffmpeg
    .input(stream_url)
    .output('output.mp4')
    .run
)
print(stream)


    


    This didn't output any mp4 file but did give the output :

    


    


    >

    


    


    I then added the following code to download the file, I also change the ffmpeg code to use the downloaded file rather then the url :

    


    try:
    urllib.request.urlretrieve(stream_url, "vod.m3u8")
except Exception as e:
    print(e)

stream = (
    ffmpeg
    .input('vod.m3u8')
    .output('output.mp4')
    .run
)
print(stream)


    


    This gave the same result, no mp4 file with the same output as above. Any help would be greatly appreciated !