Recherche avancée

Médias (91)

Autres articles (28)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • 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 (5443)

  • FFmpeg Drawtext - Fontconfig error : Cannot load default config file : No such file : (null)

    29 mars 2023, par James

    I get the message : Fontconfig error : Cannot load default config file : No such file : (null).
No output is created.

    


    I have installed FFmpeg full version and written this test script to add text onto an image which I drag and drop onto the BAT file.

    


    I searched this database for solutions and found none. The script should produce an output file test.png, The image should have red text on it which reads Hello.

    


    I tried to escape the path to the Font both ways without success :

    


    `set "FONT='c\:\\windows\\fonts\\arial.ttf'" :: Font


    


    `

    


    .. and

    


    `set "FONT='c\:\/windows\/fonts\/arial.ttf'" :: Font`


    


    My full script :

    


    `set "FONT='c\:\/windows\/fonts\/arial.ttf'" :: Font
set "TEXT=Hello" :: Text (no space characters allowed, see next example)
set "COLOR=red" :: Text color
set "SIZE=20" :: Font size
set "POS_X=(w-tw)/2" :: X position of text, use (w-tw)/2 for centering
set "POS_Y=(h-th)/2" :: Y position of text, use (h-th)/2 for centering


ffmpeg -i %1 -vf     drawtext='fontfile=%FONT%:text=%TEXT%:fontcolor=%COLOR%:fontsize=%SIZE%:x=%POS_X%:y=%POS_Y%' -  frames 1 -y test.png


pause`


    


    The complete result :
 C :\Users\canjm\Desktop\Image Correction 360\Archive
Testing\Utilities\Align Photo>set
    
"FONT='c :/windows/fonts/arial.ttf'" : : Font

    


    C:\Users\canjm\Desktop\Image Correction 360\Archive Testing\Utilities\Align Photo>set  "TEXT=Hello" :: Text (no space characters allowed, see next example)

C:\Users\canjm\Desktop\Image Correction 360\Archive Testing\Utilities\Align Photo>set "COLOR=red" :: Text color
C:\Users\canjm\Desktop\Image Correction 360\Archive Testing\Utilities\Align Photo>set "SIZE=20" :: Font size
C:\Users\canjm\Desktop\Image Correction 360\Archive Testing\Utilities\Align Photo>set "POS_X=(w-tw)/2" :: X position of text, use (w-tw)/2 for centering

C:\Users\canjm\Desktop\Image Correction 360\Archive Testing\Utilities\Align Photo>set "POS_Y=(h-th)/2" :: Y position of text, use (h-th)/2 for centering

C:\Users\canjm\Desktop\Image Correction 360\Archive Testing\Utilities\Align Photo>ffmpeg -i "C:\Users\canjm\Desktop\Image Correction 360\Archive Testing\Utilities\Align Photo\Eqr_360_9999.JPG" -vf drawtext='fontfile='c\:\/windows\/fonts\/arial.ttf':text=Hello:fontcolor=red:fontsize=20:x=(w-tw)/2:y=(h-th)/2' -frames 1 -y test.png


    


    ffmpeg version 2023-03-27-git-f7abe92bd7-full_build-
www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration : —enable-gpl —enable-version3 —enable-static
—disable-w32threads —disable-autodetect —enable-
fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —
enable-gmp —enable-bzlib —enable-lzma —enable-libsnappy —
enable-zlib —enable-librist —enable-libsrt —enable-libssh
—enable-libzmq —enable-avisynth —enable-libbluray —
enable-libcaca —enable-sdl2 —enable-libaribb24 —enable-
libdav1d —enable-libdavs2 —enable-libuavs3d —enable-
libzvbi —enable-librav1e —enable-libsvtav1 —enable-libwebp
—enable-libx264 —enable-libx265 —enable-libxavs2 —enable-
libxvid —enable-libaom —enable-libjxl —enable-libopenjpeg
—enable-libvpx —enable-mediafoundation —enable-libass —
enable-frei0r —enable-libfreetype —enable-libfribidi —
enable-liblensfun —enable-libvidstab —enable-libvmaf —
enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid
—enable-ffnvcodec —enable- nvdec —enable-nvenc —enable-
d3d11va —enable-dxva2 —enable-libvpl —enable-libshaderc —
enable-vulkan —enable-libplacebo - -enable-opencl —enable-
libcdio —enable-libgme —enable-libmodplug —enable-
libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —
enable-libshine —enable-libtheora —enable-libtwolame —
enable-libvo-amrwbenc —enable-libilbc —enable-libgsm —
enable-libopencore-amrnb —enable-libopus —enable-libspeex -
-enable-libvorbis —enable-ladspa —enable-libbs2b —enable-
libflite —enable-libmysofa -tab —enable-libvmaf —enable-
libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —
enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-
d3d11va —enable-dxva2 —enable-libvpl —enable-libshaderc —
enable-vulkan —enable-libplacebo —enable-opencl —enable-
libcdio —enable-libgme —enable-libmodplug —enable-
libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —
enable-libshine —enable-libtheora —enable-libtwolame —
enable-libvo-amrwbenc —enable-libilbc —enable-libgsm —
enable-libopencore-amrnb —enable-libopus —enable-libspeex -
-enable-libvorbis —enable-ladspa —enable-libbs2b —enable-
libflite —enable-libmysofa —enable-librubberband —enable-
libsoxr —enable-chromaprint libavutil 58. 5.100 / 58.
    
5.100 libavcodec 60. 7.100 / 60. 7.100 libavformat
    
60. 4.100 / 60. 4.100 libavdevice 60. 2.100 / 60.
    
2.100 libavfilter 9. 5.100 / 9. 5.100-enable-
librubberband —enable-libsoxr — enable-chromaprint
libavutil 58. 5.100 / 58. 5.100
libavcodec 60. 7.100 / 60. 7.100 Duration : 00:00:00.04,
start : 0.000000, bitrate : 95429 kb/s
Stream #0:0 : Video : mjpeg (Baseline), yuvj444p(pc,
bt470bg/unknown/unknown), 5792x2896, 25 fps, 25 tbr, 25 tbn
Stream mapping :
Stream #0:0 -> #0:0 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
Fontconfig error : Cannot load default config file : No such
file : (null)

    


    C:\Users\canjm\Desktop\Image Correction 360\Archive 
Testing\Utilities\Align Photo>pause
Press any key to continue . . .``


    


  • Discord Voice Bot cannot play the audio file

    7 avril 2023, par Jakub Nawrocki

    I tried to write a bot that will join the voice channel and play a audio at 20:00.

    


    Currently the bot joins the channel, but immediately after that it disconnects without making a single sound with this message :

    


    2023-04-07 17:58:01 INFO     discord.player ffmpeg process 18258 has not terminated. Waiting to terminate... 2023-04-07 17:58:01 INFO     discord.player ffmpeg process 18258 should have terminated with a return code of -9. 2023-04-07 17:58:01 INFO     discord.voice_client The voice handshake is being terminated for Channel ID 1093533451778523241 (Guild ID 1093533451778523237) 2023-04-07 17:58:01 INFO     discord.voice_client Disconnecting from voice normally, close code 1000. Audio file loaded:  Audio could not be played:

    


    Code :

    


    import discord
import asyncio
import datetime

TOKEN = 'TOKEN HERE' 
CHANNEL_ID = CHANNEL ID HERE

client = discord.Client(intents=discord.Intents.all())

async def play_sound(voice_client):
    try:
        source = discord.FFmpegPCMAudio('audio.mp3')
        print(f"Audio file loaded: {source}")
        voice_client.play(source)
        while voice_client.is_playing():
            await asyncio.sleep(1)
    except Exception as e:
        print(f"Audio could not be played: {e}")

@client.event
async def on_ready():
    print('Bot is ready')
    now = datetime.datetime.now()
    target_time = datetime.time(hour=20, minute=00)
    if now.time() >= target_time:
        print(f"Current time: {now.time()}. Bot did not join channel.")
        return
    else:
        print(f"Current time: {now.time()}. Bot has joined at {target_time}.")
        await asyncio.sleep((datetime.datetime.combine(datetime.date.today(), target_time) - now).total_seconds())
        channel = client.get_channel(CHANNEL_ID)
        if channel is not None:
            try:
                voice_client = await channel.connect()
                print(f'{client.user} joined voice chat.')
                await asyncio.sleep(1)
                await play_sound(voice_client)
                await voice_client.disconnect()
                print(f'{client.user} left voice chat.')
            except Exception as e:

                print(f"Error during joining channel : {e}")
        else:
            print(f"Did not find a channel of ID {CHANNEL_ID}.")

client.run(TOKEN)


    


    Any ideas ?

    


    ffmpeg has been installed properly.

    


  • Why is audio bitrate value of ffprobe output higher ?

    9 mars 2023, par 19xlr95

    When I check audio bitrate of my video via OS file details, media players or ffprobe -i my_video.mp4, I get the bitrate is 128 kbps. And I want to get more detailed meta information of the video by ffprobe -loglevel 0 -print_format json -show_format -show_streams my_video.mp4. However audio bitrate value of the output is 128615 bps.

    


    I thought it should be 128000 not 128615. Or 128 x 1024 = 131072. I wonder why it is not one of the values that I assumed. Also how can I safely say that this 128615 bps is 128 kbps ?

    


    Below is the detailed meta information for my video.

    


    {
    "streams": [
        {
            "index": 0,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_tag_string": "mp4a",
            "codec_tag": "0x6134706d",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "initial_padding": 0,
            "id": "0x1",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/48000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 965760,
            "duration": "20.120000",
            "bit_rate": "128615",
            "nb_frames": "946",
            "extradata_size": 2,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "creation_time": "2023-02-20T09:00:58.000000Z",
                "language": "deu",
                "handler_name": "Core Media Audio",
                "vendor_id": "[0][0][0][0]"
            }
        },
        {
            "index": 1,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "High",
            "codec_type": "video",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 1080,
            "height": 1920,
            "coded_width": 1080,
            "coded_height": 1920,
            "closed_captions": 0,
            "film_grain": 0,
            "has_b_frames": 0,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "9:16",
            "pix_fmt": "yuv420p",
            "level": 42,
            "color_range": "tv",
            "color_space": "bt709",
            "color_transfer": "bt709",
            "color_primaries": "bt709",
            "chroma_location": "left",
            "field_order": "progressive",
            "refs": 1,
            "is_avc": "true",
            "nal_length_size": "4",
            "id": "0x2",
            "r_frame_rate": "50/1",
            "avg_frame_rate": "50/1",
            "time_base": "1/50000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 1006000,
            "duration": "20.120000",
            "bit_rate": "20958903",
            "bits_per_raw_sample": "8",
            "nb_frames": "1006",
            "extradata_size": 35,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "creation_time": "2023-02-20T09:00:58.000000Z",
                "language": "und",
                "handler_name": "Core Media Video",
                "vendor_id": "[0][0][0][0]"
            }
        }
    ],
    "format": {
        "filename": "my_video.mp4",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.000000",
        "duration": "20.120000",
        "size": "53309460",
        "bit_rate": "21196604",
        "probe_score": 100,
        "tags": {
            "major_brand": "mp42",
            "minor_version": "1",
            "compatible_brands": "isommp41mp42",
            "creation_time": "2023-02-20T09:00:58.000000Z"
        }
    }
}


    


    I checked 1 kbps is 1000 bps and assumed 128 kbps of the audio bitrate should be 128000 bps. But it is 128615 bps when I run ffprobe.