Recherche avancée

Médias (91)

Autres articles (22)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (5995)

  • ffmpeg use gpu to encode mpeg4 to ts/m3u8 [closed]

    14 novembre 2024, par danielRICADO

    using ffmpeg I want to trim and transcode a mpeg4 from ts / m3u8

    


    std::string ffmpeg_command = "ffmpeg -hwaccel drm -i " + output_dir + input_file +
                         " -ss 00:00:00.00 -t 31 -c:v " + codec + " -b:v " + std::to_string(bitrate) +
                         " -vf scale=" + std::to_string(width) + "x" + std::to_string(height) +
                         " -hls_time " + std::to_string(30) + " -hls_list_size 0 -hls_segment_filename " +
                         ts_file_pattern + " -f hls " + m3u8_file;


    


    I wanted to choose between codecs based on the system, if gpu is avaiable I'd like to opt to use it, right now I just check if the codec is available

    


    bool is_h264_v4l2m2m_available() {
    std::string result = exec_command("ffmpeg -encoders 2>&1");
    return result.find("h264_v4l2m2m") != std::string::npos;
}


    


    if it is a I wanted to move that process over to the gpu, not just use libx264. Here is the error log. Studying hard on the solution but wold super apperciate any expert advice.

    


    other considerations are - runs in a docker container on a pi5, pibian on the host apline on in the container, container runs in privledged mode

    


    2024-11-14 15:18:41 [INFO]: assigned codec: h264_v4l2m2m
2024-11-14 15:18:41 ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
2024-11-14 15:18:41   built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309
2024-11-14 15:18:41   configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl
2024-11-14 15:18:41   libavutil      58. 29.100 / 58. 29.100
2024-11-14 15:18:41   libavcodec     60. 31.102 / 60. 31.102
2024-11-14 15:18:41   libavformat    60. 16.100 / 60. 16.100
2024-11-14 15:18:41   libavdevice    60.  3.100 / 60.  3.100
2024-11-14 15:18:41   libavfilter     9. 12.100 /  9. 12.100
2024-11-14 15:18:41   libswscale      7.  5.100 /  7.  5.100
2024-11-14 15:18:41   libswresample   4. 12.100 /  4. 12.100
2024-11-14 15:18:41   libpostproc    57.  3.100 / 57.  3.100
2024-11-14 15:18:42 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/app/client-data/camera-output/7ea3cbef-4da0-11ed-bdcc-baf70a43c072/1731550687270.mp4':
2024-11-14 15:18:42   Metadata:
2024-11-14 15:18:42     major_brand     : isom
2024-11-14 15:18:42     minor_version   : 512
2024-11-14 15:18:42     compatible_brands: isomiso2avc1mp41
2024-11-14 15:18:42     encoder         : Lavf60.16.100
2024-11-14 15:18:42   Duration: 00:00:31.33, start: 0.000000, bitrate: 678 kb/s
2024-11-14 15:18:42   Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1024x1024, 677 kb/s, 15 fps, 15 tbr, 15360 tbn (default)
2024-11-14 15:18:42     Metadata:
2024-11-14 15:18:42       handler_name    : VideoHandler
2024-11-14 15:18:42       vendor_id       : [0][0][0][0]
2024-11-14 15:18:42 [AVFormatContext @ 0x7f9254dcb4c0] Unable to choose an output format for '678000'; use a standard extension for the filename or specify the format manually.
2024-11-14 15:18:42 [out#0 @ 0x7f9254d70700] Error initializing the muxer for 678000: Invalid argument
2024-11-14 15:18:42 Error opening output file 678000.
2024-11-14 15:18:42 Error opening output files: Invalid argument
2024-11-14 15:18:42 [ERROR]: Failed to generate .ts file for: 1731550687270.mp4


    


  • How to add custom configure option with VCPKG when building FFMPEG ?

    1er novembre 2024, par NickWuzh

    Does anyone know how to enable x11grab format in FFMPEG with VCPKG ?

    


    I'm building FFMPEG in vcpkg manifest mode. Here is my vcpkg.json :

    


    {
  "name": "project",
  "version": "1.0.0",
  "dependencies": [
    {
      "name": "ffmpeg",
      "features": [
        "avcodec",
        "avdevice",
        "avfilter",
        "avformat",
        "bzip2",
        "ffmpeg",
        "lzma",
        "postproc",
        "swresample",
        "swscale",
        "x264",
        "zlib"
      ]
    },
    "iniparser",
    "jsoncpp",
    "spdlog"
  ]
}



    


    And I want to enable x11grab configuration in order to capture screen in Linux, but I found no feature was adapted.
Soon I found that —enable-libxcb was needed in configure and it was autodetect. So I build and install libxcb with source. And pkg-config can find it :

    


    $ pkg-config --modversion xcb
1.17.0


    


    But it doesn't work because in default it is —disable-autodetect in $VCPKG_ROOT/ports/ffmpeg/portfile.cmake :

    


    set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect")


    


    I try to modify $VCPKG_ROOT/ports/ffmpeg/portfile.cmake —enalbe-autodetect, but it doesn't work either. Here is the short message when appling vcpkg install --triplet x64-linux-release

    


    -- Using source at /usr/local/src/cpp/third-party/vcpkg/buildtrees/ffmpeg/src/n7.0.2-8cb3114be3.clean
-- Getting CMake variables for x64-linux-release
-- Building Options: --enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect --target-os=linux --enable-pthreads --cc=gcc --host_cc=gcc --cxx=g++ --nm=nm --ar='ar' --ranlib=ranlib --strip=strip --enable-gpl --enable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --enable-postproc --enable-swresample --enable-swscale --disable-alsa --disable-amf --disable-libaom --disable-libass --disable-avisynth --enable-bzlib --disable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libharfbuzz --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --enable-lzma --disable-libmp3lame --disable-libmodplug --disable-cuda --disable-nvenc --disable-nvdec  --disable-cuvid --disable-ffnvcodec --disable-opencl --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --disable-libopus --enable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libssh --disable-libtensorflow --disable-libtesseract --disable-libtheora --disable-libvorbis --disable-libvpx --disable-libwebp --enable-libx264 --disable-libx265 --disable-libxml2 --enable-zlib --disable-libsrt --disable-libmfx --enable-cross-compile --pkg-config="/bin/pkg-config" --pkg-config-flags=--static
-- Building Release Options: --enable-optimizations --extra-ldflags=-L"/usr/local/src/cpp/cmq/build/vcpkg_installed/x64-linux-release/lib"
-- Building ffmpeg for Release


    


    $ ffmpeg -devices
ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 14.2.0 (GCC)
  configuration: --prefix=/usr/local/src/cpp/third-party/vcpkg/packages/ffmpeg_x64-linux-release --enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect --target-os=linux --enable-pthreads --cc=gcc --host_cc=gcc --cxx=g++ --nm=nm --ar=ar --ranlib=ranlib --strip=strip --enable-gpl --enable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --enable-postproc --enable-swresample --enable-swscale --disable-alsa --disable-amf --disable-libaom --disable-libass --disable-avisynth --enable-bzlib --disable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libharfbuzz --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --enable-lzma --disable-libmp3lame --disable-libmodplug --disable-cuda --disable-nvenc --disable-nvdec --disable-cuvid --disable-ffnvcodec --disable-opencl --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --disable-libopus --disable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libssh --disable-libtensorflow --disable-libtesseract --disable-libtheora --disable-libvorbis --disable-libvpx --disable-libwebp --enable-libx264 --disable-libx265 --disable-libxml2 --enable-zlib --disable-libsrt --disable-libmfx --enable-cross-compile --pkg-config=/bin/pkg-config --pkg-config-flags=--static --enable-optimizations --extra-ldflags=-L/usr/local/src/cpp/cmq/vcpkg_installed/x64-linux-release/lib --arch=x86_64 --enable-asm --enable-x86asm
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Devices:
 D. = Demuxing supported
 .E = Muxing supported
 ---
 D  lavfi           Libavfilter virtual input device
 DE oss             OSS (Open Sound System) playback


    


  • How to combine 100 video clips with transition using FFMPEG ? [closed]

    17 octobre 2024, par Muhammad Lutfi Rahmawan

    I've been working on project which involves FFMPEG to process video. The goal is to produce a video from several clips and combine them with transition to each clips. We've succeeded to create video from 20 clips and 19 transitions are applied to merge each clips. But when it comes to a larger amount of clips, say 50, it becomes be failed.

    


    The first thing we do is split the original video into several clips based on user selection and this command is successful (log splitting). Then we combine the clips with transition using below command.

    


    Here is the sample command of FFMPEG which failed :

    


    ffmpeg -y -i /tmp/0.mp4 -i /tmp/1.mp4 -i /tmp/2.mp4 -i /tmp/3.mp4 -i /tmp/4.mp4 -i /tmp/5.mp4 -i /tmp/6.mp4 -i /tmp/7.mp4 -i /tmp/8.mp4 -i /tmp/9.mp4 -i /tmp/10.mp4 -i /tmp/11.mp4 -i /tmp/12.mp4 -i /tmp/13.mp4 -i /tmp/14.mp4 -i /tmp/15.mp4 -i /tmp/16.mp4 -i /tmp/17.mp4 -i /tmp/18.mp4 -i /tmp/19.mp4 -i /tmp/20.mp4 -i /tmp/21.mp4 -i /tmp/22.mp4 -i /tmp/23.mp4 -i /tmp/24.mp4 -i /tmp/25.mp4 -i /tmp/26.mp4 -i /tmp/27.mp4 -i /tmp/28.mp4 -i /tmp/29.mp4 -i /tmp/30.mp4 -i /tmp/31.mp4 -i /tmp/32.mp4 -i /tmp/33.mp4 -i /tmp/34.mp4 -i /tmp/35.mp4 -i /tmp/36.mp4 -i /tmp/37.mp4 -i /tmp/38.mp4 -i /tmp/39.mp4 -i /tmp/40.mp4 -i /tmp/41.mp4 -i /tmp/42.mp4 -i /tmp/43.mp4 -i /tmp/44.mp4 -i /tmp/45.mp4 -i /tmp/46.mp4 -i /tmp/47.mp4 -i /tmp/48.mp4 -i /tmp/49.mp4 -filter_complex "[0:v][1:v]xfade=transition=circlecrop:duration=0.5:offset=24.474[tv0];[0:a][1:a]acrossfade=d=0.5[ta0];[tv0][2:v]xfade=transition=circlecrop:duration=0.5:offset=31.674[tv1];[ta0][2:a]acrossfade=d=0.5[ta1];[tv1][3:v]xfade=transition=circlecrop:duration=0.5:offset=37.234[tv2];[ta1][3:a]acrossfade=d=0.5[ta2];[tv2][4:v]xfade=transition=circlecrop:duration=0.5:offset=55.348[tv3];[ta2][4:a]acrossfade=d=0.5[ta3];[tv3][5:v]xfade=transition=circlecrop:duration=0.5:offset=76.07[tv4];[ta3][5:a]acrossfade=d=0.5[ta4];[tv4][6:v]xfade=transition=circlecrop:duration=0.5:offset=82.622[tv5];[ta4][6:a]acrossfade=d=0.5[ta5];[tv5][7:v]xfade=transition=circlecrop:duration=0.5:offset=103.122[tv6];[ta5][7:a]acrossfade=d=0.5[ta6];[tv6][8:v]xfade=transition=circlecrop:duration=0.5:offset=114.502[tv7];[ta6][8:a]acrossfade=d=0.5[ta7];[tv7][9:v]xfade=transition=circlecrop:duration=0.5:offset=122.258[tv8];[ta7][9:a]acrossfade=d=0.5[ta8];[tv8][10:v]xfade=transition=circlecrop:duration=0.5:offset=130.094[tv9];[ta8][10:a]acrossfade=d=0.5[ta9];[tv9][11:v]xfade=transition=circlecrop:duration=0.5:offset=134.33[tv10];[ta9][11:a]acrossfade=d=0.5[ta10];[tv10][12:v]xfade=transition=circlecrop:duration=0.5:offset=141.85[tv11];[ta10][12:a]acrossfade=d=0.5[ta11];[tv11][13:v]xfade=transition=circlecrop:duration=0.5:offset=145.59[tv12];[ta11][13:a]acrossfade=d=0.5[ta12];[tv12][14:v]xfade=transition=circlecrop:duration=0.5:offset=154.314[tv13];[ta12][14:a]acrossfade=d=0.5[ta13];[tv13][15:v]xfade=transition=circlecrop:duration=0.5:offset=155.998[tv14];[ta13][15:a]acrossfade=d=0.5[ta14];[tv14][16:v]xfade=transition=circlecrop:duration=0.5:offset=164.924[tv15];[ta14][16:a]acrossfade=d=0.5[ta15];[tv15][17:v]xfade=transition=circlecrop:duration=0.5:offset=168.184[tv16];[ta15][17:a]acrossfade=d=0.5[ta16];[tv16][18:v]xfade=transition=circlecrop:duration=0.5:offset=174.796[tv17];[ta16][18:a]acrossfade=d=0.5[ta17];[tv17][19:v]xfade=transition=circlecrop:duration=0.5:offset=186.724[tv18];[ta17][19:a]acrossfade=d=0.5[ta18];[tv18][20:v]xfade=transition=circlecrop:duration=0.5:offset=191.23[tv19];[ta18][20:a]acrossfade=d=0.5[ta19];[tv19][21:v]xfade=transition=circlecrop:duration=0.5:offset=195.778[tv20];[ta19][21:a]acrossfade=d=0.5[ta20];[tv20][22:v]xfade=transition=circlecrop:duration=0.5:offset=198.118[tv21];[ta20][22:a]acrossfade=d=0.5[ta21];[tv21][23:v]xfade=transition=circlecrop:duration=0.5:offset=201.506[tv22];[ta21][23:a]acrossfade=d=0.5[ta22];[tv22][24:v]xfade=transition=circlecrop:duration=0.5:offset=204.422[tv23];[ta22][24:a]acrossfade=d=0.5[ta23];[tv23][25:v]xfade=transition=circlecrop:duration=0.5:offset=210.243[tv24];[ta23][25:a]acrossfade=d=0.5[ta24];[tv24][26:v]xfade=transition=circlecrop:duration=0.5:offset=215.417[tv25];[ta24][26:a]acrossfade=d=0.5[ta25];[tv25][27:v]xfade=transition=circlecrop:duration=0.5:offset=219.057[tv26];[ta25][27:a]acrossfade=d=0.5[ta26];[tv26][28:v]xfade=transition=circlecrop:duration=0.5:offset=221.277[tv27];[ta26][28:a]acrossfade=d=0.5[ta27];[tv27][29:v]xfade=transition=circlecrop:duration=0.5:offset=224.875[tv28];[ta27][29:a]acrossfade=d=0.5[ta28];[tv28][ta28][30:v][30:a][31:v][31:a][32:v][32:a][33:v][33:a][34:v][34:a][35:v][35:a][36:v][36:a][37:v][37:a][38:v][38:a][39:v][39:a][40:v][40:a][41:v][41:a][42:v][42:a][43:v][43:a][44:v][44:a][45:v][45:a][46:v][46:a][47:v][47:a][48:v][48:a][49:v][49:a]concat=n=21:v=1:a=1[v][a]" -map "[v]" -map "[a]" /tmp/export-clip-94989d271066ace00459-9ba57089-d833-4cef-beb7-3c847e9958af.mp4


    


    The error is as follows :

    


    ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers\n  built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)\n  configuration: --disable-debug --disable-doc --disable-ffplay --enable-alsa --enable-cuda-llvm --enable-cuvid --enable-ffprobe --enable-gpl --enable-libaom --enable-libass --enable-libdav1d --enable-libfdk_aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libkvazaar --enable-liblc3 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libplacebo --enable-librav1e --enable-librist --enable-libshaderc --enable-libsrt --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nonfree --enable-nvdec --enable-nvenc --enable-opencl --enable-openssl --enable-stripping --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan\n  libavutil      59. 39.100 / 59. 39.100\n  libavcodec     61. 19.100 / 61. 19.100\n  libavformat    61.  7.100 / 61.  7.100\n  libavdevice    61.  3.100 / 61.  3.100\n  libavfilter    10.  4.100 / 10.  4.100\n  libswscale      8.  3.100 /  8.  3.100\n  libswresample   5.  3.100 /  5.  3.100\n  libpostproc    58.  3.100 / 58.  3.100\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56102f0e5580] moov atom not found\n[in#0 @ 0x56102f0ed480] Error opening input: Invalid data found when processing input\nError opening input file /tmp/0.mp4.\nError opening input files: Invalid data found when processing input\n


    


    It stated that /tmp/0.mp4 has invalid data moov atom not found

    


    This only occurs when the number of clips > 20

    


    Additional info :

    


      

    • I can run without any error in my local environment using Windows 11 (FFMPEG version N-114902-g277f051ff6-20240421)
    • 


    • It fails on AWS Fargate environment using Ubuntu base image docker (FFMPEG version 7.1)
    • 


    


    I hope I can get a solutive answer based on my case at least I get what is wrong with my approach