Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (54)

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (10259)

  • Burning subtitles into video using ffmpeg overlay on react native

    25 avril 2023, par Youssef

    I have managed to complete this task on node server but it's too slow I don't want to upgrade my instance so I decided to do the conversion on the front end, my app is on react native can please somebody help me convert the code and keep the same args and options

    


    Server code

    


    // Execute the ffmpeg command to burn the subtitles into the video
const ffmpeg = spawn("ffmpeg", [
  "-i",
  "pipe:0",
  "-vf",
  `subtitles=${subtitlePath}:force_style='Alignment=10,OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=10'`,
  "-c:a",
  "copy",
  "-progress", "pipe:1",
  outputPath,
]);

// Pipe the videoResponse array buffer to FFmpeg
ffmpeg.stdin.write(videoResponse.data);
ffmpeg.stdin.end();

// Send the output file as a response once the process is complete
ffmpeg.on("close", () => {
  fs.readFile(outputPath, (err, data) => {
    if (err) {
      console.error(err);
    } else {
      console.log(outputPath)
    }
  });
});


    


    My try on react native but failed for several issues including, main ones are :

    


    


    No such filter : 'subtitles' Failed to inject frame into filter

    


    


    


    Invalid argument

    


    


    


    Error initializing complex filters.

    


    


    This is what I come up with so far

    


      componentDidMount() {
    FFmpegKit.executeAsync(`-i ${inputFilePath} -i ${subtitleFilePath} -filter_complex "[0:v][1:s]overlay=10:main_h-overlay_h-10" -c:a copy ${outputFilePath}`)
    .then((session) => {
      FFmpegKit.cancel();
  
      const returnCode = session.getReturnCode();
  
      if (ReturnCode.isSuccess(returnCode)) {
        console.log('Video with subtitles was created successfully!');
      } else {
        console.log('Error creating video with subtitles');
      }
    })
    .catch((error) => {
      console.log('Error creating video with subtitles', error);
    });
  }


    


    If you want to see the logs you can find them below

    


     LOG  init firebase : videocap-71b4a
 LOG  Running "videocap" with {"rootTag":11,"initialProps":{}}
 LOG  Loading ffmpeg-kit-react-native.
 LOG  Loaded ffmpeg-kit-react-native-ios-https-x86_64-5.1.0.
 LOG  Error creating video with subtitles [TypeError: undefined is not a function]
 LOG  ffmpeg version n5.1.2
 LOG   Copyright (c) 2000-2022 the FFmpeg developers
 LOG  
 LOG    built with Apple clang version 14.0.0 (clang-1400.0.29.102)
 LOG    configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode-v13.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-x86_64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --disable-neon --disable-asm --ar=/Applications/Xcode-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='clang -arch x86_64 -target x86_64-apple-ios12.1-simulator -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DFFMPEG_KIT_BUILD_DATE=20220929 -isysroot /Applications/Xcode-v13.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode-v13.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.sdk/usr/include' --ranlib=/Applications/Xcode-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags='-mios-simulator-version-min=12.1' --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir='@rpath' --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl
 LOG    libavutil      57. 28.100 / 57. 28.100
 LOG    libavcodec     59. 37.100 / 59. 37.100
 LOG    libavformat    59. 27.100 / 59. 27.100
 LOG    libavdevice    59.  7.100 / 59.  7.100
 LOG    libavfilter     8. 44.100 /  8. 44.100
 LOG    libswscale      6.  7.100 /  6.  7.100
 LOG    libswresample   4.  7.100 /  4.  7.100
 LOG  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/master/Documents/Code/videocap-mobile/media.mp4':
 LOG    Metadata:
 LOG      major_brand     :
 LOG  isom
 LOG  
 LOG      minor_version   :
 LOG  512
 LOG  
 LOG      compatible_brands:
 LOG  isomiso2avc1mp41
 LOG  
 LOG      encoder         :
 LOG  Lavf58.76.100
 LOG  
 LOG    Duration:
 LOG  00:00:11.82
 LOG  , start:
 LOG  0.000000
 LOG  , bitrate:
 LOG  813 kb/s
 LOG  
 LOG    Stream #0:0
 LOG  [0x1]
 LOG  (und)
 LOG  : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive), 480x608, 682 kb/s
 LOG  , SAR 32757:32326 DAR 491355:614194
 LOG  ,
 LOG  24.15 fps,
 LOG  24 tbr,
 LOG  1000k tbn
 LOG   (default)
 LOG  
 LOG      Metadata:
 LOG        handler_name    :
 LOG  VideoHandler
 LOG  
 LOG        vendor_id       :
 LOG  [0][0][0][0]
 LOG  
 LOG    Stream #0:1
 LOG  [0x2]
 LOG  (und)
 LOG  : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s
 LOG   (default)
 LOG  
 LOG      Metadata:
 LOG        handler_name    :
 LOG  SoundHandler
 LOG  
 LOG        vendor_id       :
 LOG  [0][0][0][0]
 LOG  
 LOG  /Users/master/Documents/Code/videocap-mobile/transcription.srt: Immediate exit requested
 LOG  Exiting normally, received signal 2.


    


    Please help

    


  • Gstreamer missing Decoder meta/x-gst-fourcc-mebx

    27 juin 2024, par ZZak

    I'm currently working with GStreamer in a Linux environment and encountered an issue after upgrading from GStreamer 1.18 to 1.22. While trying to process a video file, I received the following error message :

    


    [hevc @ 0x7f26101eba00] Skipping NAL unit 62 
[hevc @ 0x7f26100fcd40] Skipping NAL unit 62 
[hevc @ 0x7f2610113e00] Skipping NAL unit 62 
missing-plugin, type=(string)decoder, detail=(GstCaps)meta/x-gst-fourcc-mebx, name=(string)"meta/x-gst-fourcc-mebx\ decoder";



    


    Also discoverer gives
Missing plugins (gstreamer|1.0|gst-discoverer-1.0|meta/x-gst-fourcc-mebx decoder|decoder-meta/x-gst-fourcc-mebx)

    


    Source video is with .MOV video(made by iPhone) with I420_10LE format and not corrupted.
Also it's data (streams) :

    


     Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 1920x1080, 8455 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 600 tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2022-02-12T07:53:40.000000Z
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]
      encoder         : HEVC
    Side data:
      DOVI configuration record: version: 1.0, profile: 8, level: 4, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 4
      displaymatrix: rotation of -90.00 degrees
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 181 kb/s (default)
    Metadata:
      creation_time   : 2022-02-12T07:53:40.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
  Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : 2022-02-12T07:53:40.000000Z
      handler_name    : Core Media Metadata
  Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : 2022-02-12T07:53:40.000000Z
      handler_name    : Core Media Metadata
  Stream #0:4(und): Data: none (mebx / 0x7862656D), 34 kb/s (default)
    Metadata:
      creation_time   : 2022-02-12T07:53:40.000000Z



    


    This suggests that a GStreamer plugin with a decoder for the MIME type meta/x-gst-fourcc-mebx is missing from my environment. I didn't face this issue with version 1.18, but it started occurring after the upgrade to 1.22.
I've tried searching for information about this specific decoder, but I haven't been able to find any relevant details.
Could you please provide any insights or guidance on how to handle this MIME type, or which plugin should be installed to provide the necessary decoder ? If this decoder is part of a proprietary plugin or requires a specific setup, any information on how to proceed would be greatly appreciated.
Thank you for your time and help !

    


  • ffmpeg doesn't work when the script is launched by cron - No protocol specified, Cannot open display :0.0

    14 janvier 2024, par a k

    ffmpeg in my script doesn't work when the script is launched by cron of the root

    


    Error : No protocol specified, Cannot open display :0.0

    


    OS : Ubuntu 20.04

    


    #!/bin/bash
log=/var/log/log2/log2.txt

echo ______________ $(date) >> "$log"
echo "$""DISPLAY" "=      "  "$DISPLAY" >> "$log" ;
echo whoami '         ' $(whoami) >> "$log" 
echo pwd '            ' $(pwd) >> "$log" 
echo "$""USER" "=" '        ' "$USER" >> "$log"
echo PATH '           ' "$PATH" >> "$log"
echo which ffmpeg '   ' $(which ffmpeg)>> "$log" 
echo whereis ffmpeg ' ' $(whereis ffmpeg) >> "$log" 
echo "\nls -l /bin/* | grep ffmpeg" '        ' >> "$log"
ls -l /usr/bin/* | grep ffmpeg >> "$log"
echo "ls -l /var/log | grep log2" ' '>> "$log"
ls -l /var/log | grep log2 >> "$log"

ffmpeg -y -f x11grab -s 1366x768 -i :0.0 -r 25 /var/log/log2/test.mp4 -loglevel error 2>>"$log" &

echo "pid ffmpeg ""$""!"" = " "$!" >> "$log" 
sleep 5
kill "$!"
echo exit >> "$log"
exit


    


    When Cron (Cron of the root) launches the script, ffmpeg shows the error "No protocol specified, Cannot open display :0.0"

    


    /var/log/log2/log2.txt :

    


    ______________ ven. 05 mai 2023 04:10:01 CEST
$DISPLAY =       
whoami           root
pwd              /root
$USER =          
PATH             /usr/bin:/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 04:09 log2
pid ffmpeg $! =  74590
No protocol specified
[x11grab @ 0x56244aa06740] Cannot open display :0.0, error 1.
:0.0: Input/output error
exit


    


    When I launch the script manually as a not-root user (with sudo), everything work correctly :

    


    ______________ ven. 05 mai 2023 04:10:47 CEST
$DISPLAY =       :0
whoami           root
pwd              /home/an
$USER =          root
PATH             /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 04:09 log2
pid ffmpeg $! =  74618
exit


    


    When I launch the script manually as the root, everything works correctly :

    


    ______________ ven. 05 mai 2023 04:11:27 CEST
$DISPLAY =       :0
whoami           root
pwd              /root
$USER =          root
PATH             /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 04:11 log2
pid ffmpeg $! =  74683
exit


    


    When crontab of an ordinary user launches the script, it works correctly :

    


    $DISPLAY =       
whoami           an
pwd              /home/an
$USER =          
PATH             /usr/bin:/bin
which ffmpeg     /usr/bin/ffmpeg
whereis ffmpeg   ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg  
-rwxr-xr-x 1 root   root      284976 mai   18  2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2  
drwxrwxrwx  2 root              root               4096 mai    5 05:05 log2
pid ffmpeg $! =  77601
exit


    


    I have tried to put into the script :

    


    export DISPLAY=":0"

    


    export DISPLAY=":0.0"

    


    export DISPLAY=":1"