Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (32)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (3186)

  • `ffmpeg -f concat` don't work when all input streams appear to have the same spec

    2 octobre 2024, par Roy

    My ffmpeg command :

    


    ffmpeg -safe 0 -f concat -i list.txt -c copy out.mp4


    


    My 1st input file :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Applications\ffmpeg_6.0_full\a.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.3.100
  Duration: 00:00:04.97, start: 0.000000, bitrate: 40 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 27 kb/s, 30 fps, 30 tbr, 30k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.3.100 libx264


    


    My 2nd input file :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Applications\ffmpeg_6.0_full\b.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    creation_time   : 2023-03-08T06:47:13.000000Z
    artist          : Microsoft Game DVR
    title           : PUBG: BATTLEGROUNDS
  Duration: 00:10:00.16, start: 0.000000, bitrate: 20885 kb/s
  Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 20739 kb/s, 30 fps, 30 tbr, 30k tbn (default)
    Metadata:
      creation_time   : 2023-03-08T06:47:13.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 131 kb/s (default)
    Metadata:
      creation_time   : 2023-03-08T06:47:13.000000Z
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]


    


    The above command outputs some warning signals :

    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 0000025239902d40] Auto-inserting h264_mp4toannexb bitstream filter
[mp4 @ 00000252396fe5c0] Non-monotonous DTS in output stream 0:1; previous: 218112, current: 150024; changing to 218113. This may result in incorrect timestamps in the output file.
...
a lot of them
...
frame=25992 fps=21754 q=-1.0 Lsize= 1519621kB time=00:14:49.39 bitrate=13996.8kbits/s speed= 744x
video:9649kB audio:1519216kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown


    


    The resultant video can play the first part of the video correctly, then the video players either skips directly to the end of the video (MPC-HC), or don't render anything at all while timer passes as normal (VLC).

    


    My impression of the concat is that it requires all videos to have the same spec, which I think my input achieved (all the "Steam #0:0", etc, line matches). I only see the following difference, which I assumed that should be okay :

    


      

    1. Metadata are different both for the whole input (e.g. "major_brand") and for each stream (e.g. "encoder"). I assumed that metadata won't affect the processing.
    2. 


    3. The order of video/audio streams are different in the two inputs : the 1st input file has audio then video ; the 2nd input file has video then audio. I assumed that ffmpeg knows the difference and won't concat a video stream to an audio stream.
    4. 


    


    The full output of the command can be found in this pastebin : https://pastebin.com/Z5q97Uyg

    


  • avcodec/sanm : better frame size detection for old codecs

    11 mars, par Manuel Lauss
    avcodec/sanm : better frame size detection for old codecs
    

    The size of the video frame (FOBJ) of the old codecs (ANIMv0/1/2) can
    very reliably be determined :
    - ANIMv0/1 (=Rebel Assault 1) uses a 384x242 internal buffer for
    everything. The codec parameters only describe the size and offset
    of the specific FOBJ on that buffer.
    - ANIMv2 titles usually use one of the fullscreen codecs (37/47/48)
    as first FOBJ, and their dimensions can generally be trusted.
    - RA2 uses 424x260 as internal buffer, use that if encountered :
    08PLAY.SAN does not use codec37 so we need to guess using the
    codec coordinates.
    - ignore sizes smaller than 2x2 or larger than 800x600.
    - some game videos have an initial fobj with either 1x1 or -1x-1
    pixels in size, ignore them with a warning (Full Throttle
    and the Rebel Assault 2 xxRETRY.SAN videos).

    Once a known/valid dimension set has been discovered, use it and
    don't change it for subsequent FOBJs, rather clamp the large frame
    to the determined dimensions.

    Tested with RA1, RA2, Full Throttle, Dig, Outlaws, SotE and MotS
    videos.

    Signed-off-by : Manuel Lauss <manuel.lauss@gmail.com>

    • [DH] libavcodec/sanm.c
  • ffmpeg doesn't work, when starting up it doesn't play music, it gives errors

    14 août 2024, par Оля Михеева
    import discord&#xA;from discord import FFmpegPCMAudio&#xA;import os&#xA;import random&#xA;from gtts import gTTS&#xA;import asyncio&#xA;&#xA;TOKEN="***"&#xA;VOICE_CHANNEL_ID=11122224444&#xA;&#xA;class Voice_Bot(discord.Client):&#xA;    def __init__(self):&#xA;        intents = discord.Intents.default()&#xA;        intents.message_content = True&#xA;        intents.voice_states=True&#xA;        super().__init__(intents=intents)&#xA;        print(os.getcwd())&#xA;        self.sounds_hello = os.listdir(os.path.join(&#x27;sounds&#x27;,&#x27;hello&#x27;))&#xA;        self.sounds_bye = os.listdir(&#x27;sounds\\bye&#x27;)&#xA;        self.sounds = os.listdir(&#x27;sounds\\nature&#x27;)&#xA;&#xA;    async def on_ready(self):        &#xA;        self.voice_channel = self.get_channel(VOICE_CHANNEL_ID) &#xA;        if self.voice_channel == None:&#xA;            print(&#x27;Не удалось подключиться к голосовому каналу.&#x27;)&#xA;            return&#xA;        self.voice_client = await self.voice_channel.connect()&#xA;        print(&#x27;Бот подключен к голосовому каналу&#x27;)&#xA;        await self.text_to_speech("Lets play Guess the Tune")&#xA;        &#xA;    async def on_message(self,message):&#xA;        if message.author==self.user:&#xA;            return&#xA;        if message.content.startswith("game"):&#xA;            await self.text_to_speech("let&#x27;s start the game guess the melody")&#xA;            music=os.listdir("sounds\\music")&#xA;            self.melody=random.choice(music)&#xA;            await self.play_sound(f"sounds\\music\\{self.melody}")&#xA;        elif message.content==self.melody[0:len(self.melody)-4]:&#xA;            if (self.voice_client.is_playing()):&#xA;                self.voice_client.stop()&#xA;            await self.text_to_speech(f"Congratulations, {message.author.name} answered correctly! To continue, type game")&#xA;        else:&#xA;            if (self.voice_client.is_playing()):&#xA;                self.voice_client.stop()&#xA;            await self.text_to_speech(f"Unfortunately, {message.author.name} did not guess. To continue, write game")&#xA;&#xA;&#xA;    async def on_voice_state_update(self,member,before,after):&#xA;        if member.id ==self.user.id:&#xA;            print(&#x27;Someone entered or left the voice channel.&#x27;)&#xA;        else:&#xA;            try:&#xA;                if before.channel == None:&#xA;                    print(f&#x27;{member.name} entered the voice channel {after.channel}.&#x27;)&#xA;                    await self.play_sound(f&#x27;sounds\\hello\\{random.choice(self.sounds_hello)}&#x27;)&#xA;                elif after.channel == None:&#xA;                    print(f&#x27;{member.name} left the voice channel {before.channel}.&#x27;)&#xA;                    await self.play_sound(f&#x27;sounds\\bye\\{random.choice(self.sounds_bye)}&#x27;)&#xA;            except Exception as e:&#xA;                print(f"Error in on_voise_state_update: {e}")&#xA;&#xA;    async def text_to_speech(self,text):&#xA;        try:&#xA;            tts = gTTS(text=text, lang ="en")&#xA;            tts.save("text.mp3")&#xA;        except Exception as e:&#xA;            print(f"Error e: {e}")&#xA;        await self.voice_channel.send(text)&#xA;        await self.play_sound("text.mp3")&#xA;&#xA;    def play_sound(self,path):&#xA;        print(path)&#xA;        source=discord.FFmpegPCMAudio(source=path, executable="ffmpeg\\bin\\ffmpeg.exe")&#xA;        if (self.voice_client.is_playing()):&#xA;            self.voice_client.stop()&#xA;        self.voice_client.play(source)                &#xA;&#xA;client = Voice_Bot()&#xA;client.run(TOKEN)&#xA;

    &#xA;

    [enter image description here](https://i.sstatic.net/ys8Xza0w.jpg)

    &#xA;