Recherche avancée

Médias (91)

Autres articles (75)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (12497)

  • FFmpeg c api create encoder for AV_CODEC_ID_H264 crash on Windows

    30 avril 2023, par Guanyuming He

    I'm using ffmpeg (version 5.1.2) to clip a mp4 video per frame so I need to decode and encode it. However, when I'm creating the encoder for its video stream, the program always crashes at the call to avio_open2(), after H264 gives this error message :

    


    [h264_mf @ 0000025C1EBC1900] could not set output type (80004005)


    


    enter image description here

    


    The configuration (time_base, pix_fmt, width, height) of the codec context of the encoder is copied from the decoder, and I checked if the pixel format is supported by finding if it's in codec->pix_fmts.

    


    I find that the problem does not involve all my other pieces of code, because this minimal program can duplicate the same problem :

    


    extern "C"&#xA;{&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;}&#xA;&#xA;int main()&#xA;{&#xA;    auto codec = avcodec_find_encoder(AV_CODEC_ID_H264);&#xA;    auto codec_ctx = avcodec_alloc_context3(codec);&#xA;&#xA;    codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;    codec_ctx->width = 2560;&#xA;    codec_ctx->height = 1440;&#xA;    codec_ctx->time_base.num = 1; codec_ctx->time_base.den = 180000;&#xA;&#xA;    avcodec_open2(codec_ctx, codec, NULL);&#xA;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    Then I suspect if it's a bug of ffmpeg. My environment is Windows 11 64-bit, Visual Studio 2022. The ffmpeg library is obtained from vcpkg, as shown in the following image :

    &#xA;

    enter image description here

    &#xA;

  • Flutter FFmpeg | Concat Multiple Videos From TXT File And Save As A Video

    7 mai 2023, par Muhammad Hassan

    I have a text file with all path of video files that I want to concat using&#xA;https://pub.dev/packages/ffmpeg_kit_flutter in my flutter app.

    &#xA;

    For this purpose, I write a file my_file.txt with the below data...

    &#xA;

    /data/user/0/com.example.video_merger/cache/75f72300-1203-4e2c-93cf-65777152f1d16524788775537818173.mp4&#xA;/data/user/0/com.example.video_merger/cache/318d5ea7-3e0c-4453-903b-06966aa86f348487775694692938421.mp4&#xA;

    &#xA;

    Now I am using the below code to merge all the upper videos.

    &#xA;

    String outputPath = "/data/user/0/com.example.video_merger/app_flutter/output.mp4";&#xA;String commandToExecute = &#x27;-f concat -i $rawDocumentPath/my_file.txt -c copy $outputPath&#x27;;&#xA;FFmpegKit.execute(commandToExecute).then((session) async {&#xA;  final returnCode = await session.getReturnCode();&#xA;  print("FFmpeg Process Exited With ReturnCode = $returnCode");&#xA;  GallerySaver.saveVideo(outputPath).then((_) {&#xA;    print("Merged Video Saved");&#xA;  });&#xA;  if (ReturnCode.isSuccess(returnCode)) {&#xA;    // SUCCESS&#xA;  } else if (ReturnCode.isCancel(returnCode)) {&#xA;    // CANCEL&#xA;  } else {&#xA;    // ERROR&#xA;  }&#xA;});&#xA;

    &#xA;

    But it is giving me error as shown below...

    &#xA;

    FFmpeg Process Exited With ReturnCode = 1 &#xA;E/GallerySaver(31493): /data/user/0/com.example.video_merger/app_flutter/output.mp4: open failed: ENOENT (No such file or directory)&#xA;

    &#xA;

    But when I use the below ffmpeg command directly without reading from text file works fine and save my video.

    &#xA;

    String commandToExecute = &#x27;-y -i ${_storedVideoOne!.path} -i ${_storedVideoTwo!.path} -r 24000/1001 -filter_complex \&#x27;[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[out]\&#x27; -map \&#x27;[out]\&#x27; $outputPath&#x27;;&#xA;

    &#xA;

    Now my question is that I will have dynamic number of videos to concat so I want to use text file where I will write all paths then will make merged video from them. So what is the error in my ffmpeg command...???

    &#xA;

    Log Report :

    &#xA;

    I used the log reporting as follows to get the below output of errors...

    &#xA;

        FFmpegKit.executeAsync(&#xA;      commandToExecute2,&#xA;          (session) async {&#xA;            final returnCode = await session.getReturnCode();&#xA;            print("FFmpeg Process Exited With ReturnCode = $returnCode");&#xA;            GallerySaver.saveVideo(outputPath).then((_) async {&#xA;              print("Merged Video Saved");&#xA;            });&#xA;            if (ReturnCode.isSuccess(returnCode)) {&#xA;              // SUCCESS&#xA;            } else if (ReturnCode.isCancel(returnCode)) {&#xA;              // CANCEL&#xA;            } else {&#xA;              // ERROR&#xA;            }&#xA;          },&#xA;          (log) {&#xA;        print("XXXXXXXXXXXX fFmpeg XXXXXXXXXX ${log.getMessage()}");&#xA;      },&#xA;    );&#xA;

    &#xA;

    And here is the Log Output...

    &#xA;

    I/flutter ( 5432): Text On File: /data/user/0/com.example.video_merger/cache/75f72300-1203-4e2c-93cf-65777152f1d16524788775537818173.mp4&#xA;I/flutter ( 5432): /data/user/0/com.example.video_merger/cache/318d5ea7-3e0c-4453-903b-06966aa86f348487775694692938421.mp4&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX ffmpeg version n5.1.2&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX Copyright (c) 2000-2022 the FFmpeg developers&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang&#x2B;&#x2B; --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs=&#x27;-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-t&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  libavutil      57. 28.100 / 57. 28.100&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  libavcodec     59. 37.100 / 59. 37.100&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  libavformat    59. 27.100 / 59. 27.100&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  libavdevice    59.  7.100 / 59.  7.100&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  libavfilter     8. 44.100 /  8. 44.100&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  libswscale      6.  7.100 /  6.  7.100&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX  libswresample   4.  7.100 /  4.  7.100&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX [concat @ 0xb400007d62447910] Line 1: unknown keyword &#x27;/data/user/0/com.example.video_merger/cache/75f72300-1203-4e2c-93cf-65777152f1d16524788775537818173.mp4&#x27;&#xA;I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX /data/user/0/com.example.video_merger/app_flutter/my_file.txt: Invalid data found when processing input&#xA;I/flutter ( 5432): FFmpeg Process Exited With ReturnCode = 1&#xA;

    &#xA;

  • ffmpeg : cannot copy data stream

    31 mars 2023, par darkshine — , , ,

    I've got the video file captured by DJI drone. The file contains the video stream and two data streams of unknown format. I would like to convert the video from to and also save the both data streams. Unfortunately, I cannot force to copy the data streams from input to the output.

    &#xA;

    Here is the mp4 file :

    &#xA;

    ffprobe DJI_0019.MP4

    &#xA;

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5631004c2730] stream 0, timescale not set&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;DJI_0019.MP4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    creation_time   : replaced_timestamp&#xA;    encoder         : DJIMavic3&#xA;  Duration: 00:01:05.66, start: 0.000000, bitrate: 128915 kb/s&#xA;  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160, 127648 kb/s, 29.41 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : replaced_timestamp&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1(und): Data: none (djmd / 0x646D6A64), 13 kb/s&#xA;    Metadata:&#xA;      creation_time   : replaced_timestamp&#xA;      handler_name    : DJI meta&#xA;  Stream #0:2(und): Data: none (dbgi / 0x69676264), 1190 kb/s&#xA;    Metadata:&#xA;      creation_time   : replaced_timestamp&#xA;      handler_name    : DJI dbgi&#xA;  Stream #0:3: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc (attached pic)&#xA;Unsupported codec with id 0 for input stream 1&#xA;Unsupported codec with id 0 for input stream 2&#xA;

    &#xA;

    I tried the command below :

    &#xA;

    ffmpeg -i DJI_0019.MP4 -map 0 -c:v libx265 -crf 25 -c:d copy -copy_unknown DJI_0019.v2.MP4

    &#xA;

    The command fails with the following error. The output file is empty.

    &#xA;

    [mp4 @ 0x556d0180ced0] Could not find tag for codec none in stream #1, codec not currently supported in container&#xA;Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument&#xA;Error initializing output stream 0:0 --&#xA;

    &#xA;

    Note that for "-c:d" option I tried different suggested values, none of them succeeded :

    &#xA;

    copy&#xA;none&#xA;bin&#xA;bin_data&#xA;data&#xA;null&#xA;file&#xA;

    &#xA;

    In the meantime an attempt to save the data streams to separate files succeeds for the both of them with the commands :

    &#xA;

    ffmpeg -i DJI_0019.MP4 -map 0:d:0 -c copy -copy_unknown -f data DJI_0019.data0.bin

    &#xA;

    ffmpeg -i DJI_0019.MP4 -map 0:d:1 -c copy -copy_unknown -f data DJI_0019.data1.bin

    &#xA;

    How to force to copy the data streams from input to output ?

    &#xA;

    This is the ffmpeg's info :

    &#xA;

    ffmpeg version 4.4.3 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 11.3.0 (Gentoo 11.3.0 p5)&#xA;  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 &#xA;--docdir=/usr/share/doc/ffmpeg-4.4.3/html --mandir=/usr/share/man --enable-shared &#xA;--cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g&#x2B;&#x2B; --ar=x86_64-pc-linux-gnu-ar &#xA;--nm=x86_64-pc-linux-gnu-nm --strip=x86_64-pc-linux-gnu-strip &#xA;--ranlib=x86_64-pc-linux-gnu-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config &#xA;--optflags=&#x27;-O2 -pipe -march=native&#x27; --disable-static --enable-avfilter --enable-avresample &#xA;--disable-stripping --disable-optimizations --disable-libcelt --disable-indev=oss &#xA;--disable-indev=jack --disable-indev=sndio --disable-outdev=oss --disable-outdev=sndio &#xA;--enable-nonfree --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt &#xA;--enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv &#xA;--disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl &#xA;--enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --disable-vaapi &#xA;--disable-vdpau --disable-vulkan --enable-xlib --enable-libxcb --enable-libxcb-shm &#xA;--enable-libxcb-xfixes --enable-zlib --enable-libcdio --disable-libiec61883 &#xA;--disable-libdc1394 --enable-libcaca --disable-openal --disable-opengl --enable-libv4l2 &#xA;--disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb &#xA;--disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --enable-libfdk-aac &#xA;--disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm &#xA;--disable-libaribb24 --disable-mmal --disable-libmodplug --disable-libopus &#xA;--disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt &#xA;--disable-librsvg --disable-ffnvcodec --disable-libvorbis --disable-libvpx --disable-libzvbi &#xA;--disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm &#xA;--disable-libflite --disable-frei0r --disable-libvmaf --disable-libfribidi &#xA;--disable-fontconfig --disable-ladspa --enable-libass --disable-libtesseract &#xA;--disable-lv2 --disable-libfreetype --disable-libvidstab --disable-librubberband &#xA;--disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-amf &#xA;--disable-libvo-amrwbenc --disable-libkvazaar --disable-libaom --enable-libmp3lame &#xA;--disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libsvtav1 &#xA;--disable-libtheora --disable-libtwolame --disable-libwebp --enable-libx264 --enable-libx265 &#xA;--enable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon &#xA;--disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 &#xA;--disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow &#xA;--disable-amd3dnowext --disable-aesni --disable-avx --disable-avx2 --disable-fma3 &#xA;--disable-fma4 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop &#xA;--cpu=host --disable-doc --disable-htmlpages --enable-manpages&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;

    &#xA;