Recherche avancée

Médias (91)

Autres articles (41)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (7904)

  • From Python, piping images to FFMPEG process with audio input, "-shortest" flag causes output file to contain only 1 frame of video and entire audio

    7 novembre 2023, par b_yang

    From Python, I run FFMPEG and write images to its stdin via pipe, the FFMPEG process has an audio file as input too. Everything works fine like this :

    


    cmd = ['ffmpeg', '-hide_banner', '-y', '-loglevel', 'error', '-f', 'rawvideo', 
'-pix_fmt', 'bgr24', '-video_size', '720x1280', '-r', '30.0', '-an', '-i', '-',
'-i', 'audio.aac', '-acodec', 'copy', 
'-crf', '14', '-pix_fmt', 'yuv420p', 'output.mp4']
proc = subprocess.Popen(cmd, **popen_params)


    


    Because the audio duration might be longer than the video duration, I added a '-shortest' flag (before '-crf') :

    


    cmd = ['ffmpeg', '-hide_banner', '-y', '-loglevel', 'error', '-f', 'rawvideo', 
'-pix_fmt', 'bgr24', '-video_size', '720x1280', '-r', '30.0', '-an', '-i', '-',
'-i', 'audio.aac', '-acodec', 'copy', 
'-shortest', '-crf', '14', '-pix_fmt', 'yuv420p', 'output.mp4']
proc = subprocess.Popen(cmd, **popen_params)


    


    However, with the '-shortest' flag, the resulting output.mp4 contains the entire audio, but only 1 frame of video data. What is going on here ?

    


  • yt_dlp gives a strange message : "Seek to desired resync point failed. Seeking to earliest point available instead." and "File ended prematurely"

    16 septembre 2023, par nikita goncharov

    I have a discord bot (discord.py) in python and it can play music. Lastly it had trouble in playing the music, giving some random warnings but it mostly worked. But now it gives me this message :

    


    [matroska,webm @ 000001570fe92d40] Seek to desired resync point failed. Seeking to earliest point available instead.


    


    [matroska,webm @ 000001570fe92d40] File ended prematurely


    


    and also this one

    


    Warning: program compiled against libxml 211 using older 209


    


    As I saw this is a very common warning but I still have no Idea how to fix it.

    


    I will leave the code of the bot down bellow :

    


    Ytdlp setup (I have renamed the librarie to be youtube_dl)

    


    youtube_dl.utils.bug_reports_message = lambda: ''


ytdl_format_options = {
    'format': 'bestaudio/best',
    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
    'restrictfilenames': True,
    'noplaylist': True,
    'nocheckcertificate': True,
    'ignoreerrors': False,
    'logtostderr': True,
    'quiet': True,
    'no_warnings': False,
    'default_search': 'auto',
    'source_address': '0.0.0.0',  # bind to ipv4 since ipv6 addresses cause issues sometimes
}

ffmpeg_options = {
    'options': '-vn',
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)


class YTDLSource(discord.PCMVolumeTransformer):
    def __init__(self, source, *, data, volume=0.5):
        super().__init__(source, volume)

        self.data = data

        self.title = data.get('title')
        self.url = data.get('url')
        self.duration = data.get('duration')
        img = ""
        imgs = ['']
        for image in data.get("thumbnails"):
            img = image["url"]
            imgs.append(image["url"])
        self.image = img
        self.thumbnails = imgs


    


    The play command :

    


    # if message.author.voice_client is not None:
try:
    print(1)
    sessionChannel = message.author.voice.channel
except:
    embedAns = discord.Embed(color=discord.Color.from_rgb(255, 201, 115))
    # embedImg.set_image(url=player.image)
    # embedImg.type = "image"
    embedAns.add_field(name="Player", value=f'To play audio you must join a voice channel!',
                       inline=True)
    embedAns.add_field(name="", value=f'*{message.author.name}*', inline=False)
    # embedImg.image.width = "800"
    await message.channel.send(embed=embedAns)
try:
    print(2)
    await message.author.voice.channel.connect(reconnect=False)
    print(2)
except:
    pass
"""embedAns = discord.Embed(color=discord.Color.from_rgb(102, 196, 250))
# embedImg.set_image(url=player.image)
# embedImg.type = "image"
embedAns.add_field(name="Player", value=f'Succesfuly joined voice channel to play music in {sessionChannel}! Loading in youtube song... Please wait...', inline=True)
embedAns.add_field(name="", value=f'*{message.author.name}*', inline=False)
# embedImg.image.width = "800"
await message.channel.send(embed=embedAns)"""
try:
    print(3)
    load = await message.channel.send(
        f'Succesfuly joined voice channel to play music in {sessionChannel}')
    print(4)
    url = matched.group(1)
    player = await YTDLSource.from_url(url, loop=client.loop, stream=True)
    # Embed = await YTDLSource.from_url(url, loop=client.loop, stream=False)
    sessionChannel.guild.voice_client.play(player, after=lambda e: print(
        f'Player error: {e}') if e else None)
    await load.delete()
    sec = player.duration % 60
    temp = player.duration // 60
    min = temp % 60
    hour = temp // 60
    if hour == 0:
        timeStr = f"{min:02d}:{sec:02d}"
    else:
        timeStr = f"{hour}:{min:02d}:{sec:02d}"
    # await message.reply()
    embedImg = discord.Embed(color=discord.Color.from_rgb(102, 196, 250))
    # embedImg.set_image(url=player.image)
    # embedImg.type = "image"
    embedImg.set_thumbnail(url=player.image)
    embedImg.add_field(name="Player", value=f'Now playing: **{player.title}** \n `{timeStr}`',
                       inline=True)
    embedImg.add_field(name="", value=f'Requested by: {message.author.name}', inline=False)
    # embedImg.image.width = "800"
    await message.channel.send(embed=embedImg)
except Exception as ex:
    embedAns = discord.Embed(color=discord.Color.from_rgb(255, 119, 115))
    # embedImg.set_image(url=player.image)
    # embedImg.type = "image"
    # embedImg.set_thumbnail(url=player.image)
    embedAns.add_field(name="Player Error",
                       value=f'Couldent play audio on {sessionChannel} \n`{ex}`', inline=True)
    embedAns.add_field(name="", value=f'Requested by: {message.author.name}', inline=False)


    


  • avcodec/h264dec : Fix data race when updating decode_error_flags

    12 septembre 2023, par Andreas Rheinhardt
    avcodec/h264dec : Fix data race when updating decode_error_flags
    

    When using multi-threaded decoding, every decoding thread
    has its own DBP consisting of H264Pictures and each of these
    points to its own AVFrames. They are synced during
    update_thread_context via av_frame_ref() and therefore
    the threads actually decoding (as well as all the others)
    must not modify any field that is copied by av_frame_ref()
    after ff_thread_finish_setup().

    Yet this is exactly what happens when an error occurs
    during decoding and the AVFrame's decode_error_flags are updated.
    Given that these errors only become apparent during decoding,
    this can't be set before ff_thread_finish_setup() without
    defeating the point of frame-threading ; in practice,
    this meant that the decoder did not set these flags correctly
    in case frame-threading was in use. (This means that e.g.
    the ffmpeg cli tool fails to output its "corrupt decoded frame"
    message in a nondeterministic fashion.)

    This commit fixes this by adding a new H264Picture field
    that is actually propagated across threads ; the field
    is an AVBufferRef* whose data is an atomic_int ; it is
    atomic in order to allow multiple threads to update it
    concurrently and not to provide synchronization
    between the threads setting the field and the thread
    ultimately returning the AVFrame.

    This unfortunately has the overhead of one allocation
    per H264Picture (both the original one as well as
    creating a reference to an existing one), even in case
    of no errors. In order to mitigate this, an AVBufferPool
    has been used and only if frame-threading is actually
    in use. This expense will be removed as soon as
    a proper API for refcounted objects (not based upon
    AVBuffer) is in place.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/h264_picture.c
    • [DH] libavcodec/h264_slice.c
    • [DH] libavcodec/h264dec.c
    • [DH] libavcodec/h264dec.h