Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (71)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (9310)

  • libavcodec/sanm : clear codec47 diff buffers with specific color

    8 novembre 2024, par Manuel Lauss
    libavcodec/sanm : clear codec47 diff buffers with specific color
    

    The codec47 header provides colors to use to clear the
    2 difference buffers. This fixes artifacts (black hair, faces) in
    Curse of Monkey Island "CURSERNG.SAN" video.

    Signed-off-by : Manuel Lauss <manuel.lauss@gmail.com>
    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DH] libavcodec/sanm.c
  • OSError : [Errno 9] Bad file descriptor when downloading using pytube and playing with discord.py

    15 septembre 2022, par Trevor Mathisen

    When using pytube to download a YouTube video and discord.py to play it, I am getting a OSError : [Errno 9] Bad file descriptor error. I've had this working at one point and can't seem to figure out what I changed which broke it.

    &#xA;

    Full traceback :

    &#xA;

    2022-09-15 20:20:44 INFO       discord.voice_client The voice handshake is being terminated for Channel ID 902294184994693224 (Guild ID 902294184994693220)&#xA;2022-09-15T20:20:44.010142763Z 2022-09-15 20:20:44 INFO     discord.voice_client Disconnecting from voice normally, close code 1000.&#xA;2022-09-15T20:20:44.058592513Z 2022-09-15 20:20:44 ERROR    discord.player Exception in voice thread Thread-5&#xA;2022-09-15T20:20:44.058623864Z Traceback (most recent call last):&#xA;2022-09-15T20:20:44.058629130Z   File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 698, in run&#xA;2022-09-15T20:20:44.058632003Z     self._do_run()&#xA;2022-09-15T20:20:44.058634500Z   File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 691, in _do_run&#xA;2022-09-15T20:20:44.058637013Z     play_audio(data, encode=not self.source.is_opus())&#xA;2022-09-15T20:20:44.058639334Z   File "/usr/local/lib/python3.10/dist-packages/discord/voice_client.py", line 683, in send_audio_packet&#xA;2022-09-15T20:20:44.058648759Z     self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))&#xA;2022-09-15T20:20:44.058653057Z OSError: [Errno 9] Bad file descriptor&#xA;2022-09-15T20:20:44.058673762Z 2022-09-15 20:20:44 INFO     discord.player ffmpeg process 12 has not terminated. Waiting to terminate...&#xA;2022-09-15T20:20:44.062083854Z 2022-09-15 20:20:44 INFO     discord.player ffmpeg process 12 should have terminated with a return code of -9.&#xA;

    &#xA;

    Dockerfile :

    &#xA;

    ENV MEDIA_DIR=&#x27;/media/&#x27;&#xA;RUN mkdir -p /media&#xA;

    &#xA;

    Download function (check_path returns True, showing the file is there) :

    &#xA;

    def download_videos(stream, filename):&#xA;    print(f&#x27;downloading {filename}&#x27;)&#xA;    filepath = stream.download(output_path=config_db.environ_path, filename=f&#x27;{filename}.mp4&#x27;)&#xA;    print(f&#x27;completed download of {filepath}&#x27;)&#xA;    check_path = Path(filepath)&#xA;    if check_path.is_file():&#xA;        print(check_path)&#xA;    return filepath&#xA;

    &#xA;

    Play function :

    &#xA;

    async def play(voice_channel, message, control = None):&#xA;    vc = get_vc()&#xA;    if not vc:&#xA;        vc = await voice_channel.connect()&#xA;    next_yt = YouTube(next_song)&#xA;    next_file = sub(r&#x27;\W&#x2B;&#x27;, &#x27;&#x27;, next_yt.title.replace(&#x27; &#x27;, &#x27;_&#x27;).replace(&#x27;__&#x27;, &#x27;_&#x27;)).lower()&#xA;    next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension=&#x27;mp4&#x27;)[0], next_file)&#xA;&#xA;    await message.channel.send(f&#x27;Done getting ready, I\&#x27;ll be there in a moment.&#x27;)&#xA;&#xA;while next_song:&#xA;    while vc.is_playing():&#xA;        await asynciosleep(0.5)&#xA;        continue&#xA;&#xA;    try:&#xA;        vc.play(FFmpegPCMAudio(next_song_path))&#xA;        print(f&#x27;Playing {next_song_path} with latency of {vc.average_latency}&#x27;)&#xA;        vc.source = PCMVolumeTransformer(vc.source, volume=0.15)&#xA;    except Exception as e:&#xA;        print(e)&#xA;        await vc.disconnect()&#xA;        next_song = None&#xA;        return&#xA;    next_song = sounds_db.get_next_song()&#xA;    next_yt = YouTube(next_song) if next_song else None&#xA;    next_file = sub(r&#x27;\W&#x2B;&#x27;, &#x27;&#x27;, next_yt.title.replace(&#x27; &#x27;, &#x27;_&#x27;).replace(&#x27;__&#x27;, &#x27;_&#x27;)).lower() if next_song else None&#xA;    next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension=&#x27;mp4&#x27;)[0], next_file) if next_song else None&#xA;

    &#xA;

    I've mounted the /media/ dir during docker -v and can see the file is getting downloaded and when I copy the file to my local machine I can play it in an audio player.

    &#xA;

    The program can access the SQLite database right next to the files in question just fine.

    &#xA;

    I've deployed the container locally and to two different VPS's with the same file structure with the same behavior. I'm ripping my hair out.

    &#xA;

  • FFMPEG issue with concat video made from single image

    12 mai 2023, par Jacob

    I am pulling my hair out right now. I am developing a video editing program. When I export two videos, concat works great. However, when I create a video from a single image (title screen) and try to concat that video with a regular video, only the title screen is exported. And no errors.

    &#xA;

    Below is the code for creating the title screen :

    &#xA;

    parameters = "-loop 1 -i " &#x2B; &#x27;"&#x27; &#x2B; video.VideoThumbPath &#x2B; &#x27;"&#x27; &#x2B; " -c:v libx264 -t " &#x2B; video.TitleDuration.ToString() &#x2B; " -pix_fmt yuv420p " &#x2B; vidPath &#x2B; @"\v" &#x2B; outputFile.ToString() &#x2B; ".MP4";&#xA;

    &#xA;

    Below is the code for exporting a regular non title screen video :

    &#xA;

    parameters = "-y -i " &#x2B; &#x27;"&#x27; &#x2B; frames[0].VideoPath &#x2B; &#x27;"&#x27; &#x2B; " -filter_complex " &#x2B; &#x27;"&#x27; &#x2B; @"[0:v]trim=" &#x2B; frames[0].TimeCode.TotalSeconds &#x2B; @":" &#x2B; frames[1].TimeCode.TotalSeconds &#x2B;&#xA;                           @", setpts=PTS-STARTPTS[trimedv0];[trimedv0]yadif," &#x2B; orientation &#x2B; @"setsar=1/1, eq=contrast=1:brightness=" &#x2B; video.Brightness &#x2B; &#x27;"&#x27; &#x2B; " -sn -an -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 " &#x2B;&#xA;                           @"-pix_fmt yuv420p -f mpegts " &#x2B; vidPath &#x2B; @"\v" &#x2B; outputFile.ToString() &#x2B; ".MP4";&#xA;

    &#xA;

    Below is the code to concat both videos :

    &#xA;

    parameters = "-probesize 100M -analyzeduration 100M -i concat:" &#x2B; &#x27;"&#x27; &#x2B; concatString &#x2B; &#x27;"&#x27; &#x2B; @" -c:v copy " &#x2B; &#x27;"&#x27; &#x2B; ExportOptions.CompleteDestinationPath &#x2B; &#x27;"&#x27;;&#xA;

    &#xA;

    Like I said, using this code for two MP4 video that were not made from a single image, it works great. If I create a MP4 from a single image with a duration of 5 seconds and concat it with a normal MP4, only the title screen is exported.

    &#xA;

    Below is the output from FFMPEG. It shows the concat string with 2 videos but only concats the first one.

    &#xA;

    09:59:32:366    ffmpeg version N-110043-gadb5f7b41f-20230318 Copyright (c) 2000-2023 the FFmpeg developers&#xA;

    &#xA;

    09:59:32:366 built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)&#xA;09:59:32:366 configuration : —prefix=/ffbuild/prefix —pkg-config-flags=—static —pkg-config=pkg-config —cross-prefix=x86_64-w64-mingw32- —arch=x86_64 —target-os=mingw32 —enable-gpl —enable-version3 —disable-debug —disable-w32threads —enable-pthreads —enable-iconv —enable-libxml2 —enable-zlib —enable-libfreetype —enable-libfribidi —enable-gmp —enable-lzma —enable-fontconfig —enable-libvorbis —enable-opencl —disable-libpulse —enable-libvmaf —disable-libxcb —disable-xlib —enable-amf —enable-libaom —enable-libaribb24 —enable-avisynth —enable-chromaprint —enable-libdav1d —enable-libdavs2 —disable-libfdk-aac —enable-ffnvcodec —enable-cuda-llvm —enable-frei0r —enable-libgme —enable-libkvazaar —enable-libass —enable-libbluray —enable-libjxl —enable-libmp3lame —enable-libopus —enable-librist —enable-libssh —enable-libtheora —enable-libvpx —enable-libwebp —enable-lv2 —disable-libmfx —enable-libvpl —enable-openal —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenh264 —enable-libopenjpeg —enable-libopenmpt —enable-librav1e —enable-librubberband —enable-schannel —enable-sdl2 —enable-libsoxr —enable-libsrt —enable-libsvtav1 —enable-libtwolame —enable-libuavs3d —disable-libdrm —disable-vaapi —enable-libvidstab —enable-vulkan —enable-libshaderc —enable-libplacebo —enable-libx264 —enable-libx265 —enable-libxavs2 —enable-libxvid —enable-libzimg —enable-libzvbi —extra-cflags=-DLIBTWOLAME_STATIC —extra-cxxflags= —extra-ldflags=-pthread —extra-ldexeflags= —extra-libs=-lgomp —extra-version=20230318&#xA;09:59:32:366 libavutil 58. 4.100 / 58. 4.100&#xA;09:59:32:366 libavcodec 60. 6.101 / 60. 6.101&#xA;09:59:32:366 libavformat 60. 4.100 / 60. 4.100&#xA;09:59:32:366 libavdevice 60. 2.100 / 60. 2.100&#xA;09:59:32:366 libavfilter 9. 4.100 / 9. 4.100&#xA;09:59:32:366 libswscale 7. 2.100 / 7. 2.100&#xA;09:59:32:366 libswresample 4. 11.100 / 4. 11.100&#xA;09:59:32:366 libpostproc 57. 2.100 / 57. 2.100&#xA;09:59:32:366 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C :\Users\JDINES\AppData\Roaming\FCS\VidBin\v1000.MP4|C :\Users\JDINES\AppData\Roaming\FCS\VidBin\v1001.MP4' :&#xA;09:59:32:366 Metadata :&#xA;09:59:32:366 major_brand : isom&#xA;09:59:32:366 minor_version : 512&#xA;09:59:32:366 compatible_brands : isomiso2avc1mp41&#xA;09:59:32:366 encoder : Lavf60.4.100&#xA;09:59:32:366 Duration : 00:00:05.00, start : 0.000000, bitrate : 64102 kb/s&#xA;09:59:32:366 Stream #0:00x1 : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 18 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;09:59:32:366 Metadata :&#xA;09:59:32:366 handler_name : VideoHandler&#xA;09:59:32:366 vendor_id : [0][0][0][0]&#xA;09:59:32:366 encoder : Lavc60.6.101 libx264&#xA;09:59:32:366 Output #0, mp4, to 'C :\Users\JDINES\Desktop\EXPORT TEST\qwe.MP4' :&#xA;09:59:32:366 Metadata :&#xA;09:59:32:366 major_brand : isom&#xA;09:59:32:366 minor_version : 512&#xA;09:59:32:366 compatible_brands : isomiso2avc1mp41&#xA;09:59:32:366 encoder : Lavf60.4.100&#xA;09:59:32:366 Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 18 kb/s, 30 fps, 30 tbr, 15360 tbn (default)&#xA;09:59:32:366 Metadata :&#xA;09:59:32:366 handler_name : VideoHandler&#xA;09:59:32:366 vendor_id : [0][0][0][0]&#xA;09:59:32:366 encoder : Lavc60.6.101 libx264&#xA;09:59:32:366 Stream mapping :&#xA;09:59:32:366 Stream #0:0 -> #0:0 (copy)&#xA;09:59:32:366 Press [q] to stop, [?] for help&#xA;09:59:32:366 frame= 0 fps=0.0 q=-1.0 size= 0kB time=-00:00:00.06 bitrate= -0.0kbits/s speed=N/A
    &#xA;frame= 150 fps=0.0 q=-1.0 Lsize= 14kB time=00:00:04.90 bitrate= 23.4kbits/s speed=2e+03x
    &#xA;09:59:32:366 video:11kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 23.005581%

    &#xA;

    Any help would be much appreciated !

    &#xA;

    I figured this out finally !!!

    &#xA;

    The below code fixed it :

    &#xA;

    parameters = "-loop 1 -i " &#x2B; &#x27;"&#x27; &#x2B; video.VideoThumbPath &#x2B; &#x27;"&#x27; &#x2B; " -sn -an -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 " &#x2B;&#xA;                           @"-t 5 -pix_fmt yuv420p -f mpegts " &#x2B; vidPath &#x2B; @"\v" &#x2B; outputFile.ToString() &#x2B; ".MP4";&#xA;

    &#xA;