Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (76)

  • 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 ;

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (13216)

  • Failed to convert web-saved .wemb audio to .wav by using php "shell_exec" and javascript

    30 mai 2022, par Anirbasgnaw

    I'm working on an online experimenter which could record participants' audio from the browser. The audio data I get has an extension of .wemb, so I plan to use ffmpeg to convert it to .wav while I save the data.

    


    I tried to use PHP's shell_exec but nothing happens when I run the scripts. Then I found that my echo and print_r also did not work. I'm new to PHP and javascript, so I''m really confused now.

    


    Below are the relevant codes, I really appreciate it if you could help !

    


    write_data.php :

    


    <?php
  $post_data = json_decode(file_get_contents('php://input'), true); 
  // the directory "data" must be writable by the server
  $name = "../".$post_data['filename'];
  $data = $post_data['filedata'];
   // write the file to disk
  file_put_contents($name, $data);
  
  $INPUT = trim($name) . ".webm";
  $OUTPUT = trim($name) . ".wav";
  echo "start converting...";

  // check if ffmprg is available
  $ffmpeg = trim(shell_exec('which ffmpeg'));
  print_r($ffmpeg);
  // call ffmpeg
  shell_exec("ffmpeg -i '$INPUT' -ac 1 -f wav '$OUTPUT' 2>&1 ");
?>


    


    javascript :

    


      saveData: function(fileName,format){
    // save  as json by default
    if (!format){ format = 'json';}
    // add extension to filename
    fileName = `${fileName}.${format}`
    // create saveData object using fetch
    let saveData = [];
    if (format == 'json') {
        saveData = {
          type: 'call-function',
          async: true,
          func: async function(done) {
            let data = jsPsych.data.get().json();
            const response = await fetch("../write_data.php", {
              method: "POST",
              headers: {
                "content-type": "application/json"
              },
              body: JSON.stringify({ filename: fileName, filedata: data })
            });
            if (response.ok) {
              const responseBody = await response.text();
              done(responseBody);
            }
          }
        }
    } else {
        saveData = {
          type: 'call-function',
          async: true,
          func: async function(done) {
            let data = jsPsych.data.get().csv();
            const response = await fetch("../write_data.php", {
              method: "POST",
              headers: {
                "content-type": "application/json"
              },
              body: JSON.stringify({ filename: fileName, filedata: data })
            });
            if (response.ok) {
              const responseBody = await response.text();
              done(responseBody);
            }
          }
        }
    }
    return saveData;
  },


    


  • ffmpeg error "Could not write header for output file #0 (incorrect codec parameters ?) : Operation not permitted Error initializing output stream 0:0"

    27 juillet 2022, par DevSharma

    I am running FFmpeg in my app and specifically in "Android 11" I am getting this error from several users

    


    I have researched a lot but no solution found.

    


    I thought there is something wrong with the codec parameter that is being passed since it is saying "incorrect codec parameters" but most of the parameters looks good.

    


    also verified if all the required file permission are granted and those are good too

    


    now I m unable to find the problem,

    


    please help, thanks

    


    Command:&#xA;/data/app/~~hyrHVcslcfdQcguX0rauRA==/<apppackage>-QbDCul7FXU4tVniSDeP1Sg==/lib/arm64/libffmpeg.so -i /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Video/VID-20220414-WA0010.mp4 -c:v libx264 -crf 23 -map 0:V -map 0:a? -map 0:s? -c:s mov_text -segment_time 26 -g 26 -sc_threshold 0 -force_key_frames expr:gte(t,n_forced*26) -reset_timestamps 1 -f segment -preset ultrafast /storage/emulated/0/Movies/splitVideoFolder/split_video%03d.mp4&#xA;&#xA;Error:&#xA;ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)&#xA;  configuration: --cross-prefix=aarch64-linux-android- --sysroot=/Users/admin/AndroidStudioProjects/android-ndk-r21d/toolchains/llvm/prebuilt/darwin-x86_64/sysroot --prefix=/Users/admin/AndroidStudioProjects/Tanner/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/local/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android21-clang --cxx=aarch64-linux-android21-clang&#x2B;&#x2B; --extra-libs=&#x27;-L/Users/admin/AndroidStudioProjects/Tanner/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat&#x27; --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-shared --disable-ffplay --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --enable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libass --enable-iconv --enable-libx264 --enable-gpl --disable-sdl2 --enable-zlib --enable-mediacodec&#xA;  libavutil      56. 55.100 / 56. 55.100&#xA;  libavcodec     58. 96.100 / 58. 96.100&#xA;  libavformat    58. 48.100 / 58. 48.100&#xA;  libavdevice    58. 11.101 / 58. 11.101&#xA;  libavfilter     7. 87.100 /  7. 87.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Video/VID-20220414-WA0010.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: mp42isom&#xA;  Duration: 00:01:30.53, start: 0.000000, bitrate: 671 kb/s&#xA;    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/smpte170m), 576x1024 [SAR 1:1 DAR 9:16], 539 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)&#xA;    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0xb400007727c64800] using SAR=1/1&#xA;[libx264 @ 0xb400007727c64800] using cpu capabilities: ARMv8 NEON&#xA;[libx264 @ 0xb400007727c64800] profile Constrained Baseline, level 3.1, 4:2:0, 8-bit&#xA;[libx264 @ 0xb400007727c64800] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=26 keyint_min=2 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0&#xA;[segment @ 0xb400007727c28800] Opening &#x27;/storage/emulated/0/Movies/splitVideoFolder/split_video000.mp4&#x27; for writing&#xA;[segment @ 0xb400007727c28800] Failed to open segment &#x27;/storage/emulated/0/Movies/splitVideoFolder/split_video000.mp4&#x27;&#xA;Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted&#xA;Error initializing output stream 0:0 --&#xA;[aac @ 0xb400007727c65700] Qavg: 18220.703&#xA;[aac @ 0xb400007727c65700] 2 frames left in the queue on closing&#xA;Conversion failed!&#xA;</apppackage>

    &#xA;

  • What does "Error in the pull function" mean while executing ffmpeg command ?

    8 avril 2022, par Alex Rypun

    I'm trying to generate a video from multiple video sources (https urls).

    &#xA;

    If I use say 8 video sources it works as expected. But if I need say 30 sources, it starts to work as expected, but at some moment a lot of errors appear.

    &#xA;

    enter image description here

    &#xA;

    I believe the main one is Error in the pull function..

    &#xA;

    Such a video-source appears in the output file but not a full requested part (e.g., I set trim=0:5, but ffmpeg generates only 3 seconds).

    &#xA;

    I tried different videos, different cropped parts, loaded sources to aws s3, but can't identify a "bad case", it's reproduced with different options.

    &#xA;

    My command looks like this :

    &#xA;

    ffmpeg -y&#xA;-i "https://player.vimeo.com/external/399541658.hd.mp4?s=5432956383527af00bb74b41c120bbb84ff3ac5e&amp;profile_id=175&amp;oauth2_token_id=57447761"&#xA;...&#xA;-i "https://player.vimeo.com/external/464966383.hd.mp4?s=648aa8277259c499f1d05d6330f9922932c080a6&amp;profile_id=175&amp;oauth2_token_id=57447761"&#xA;-i "https://test.com/development/videos/dc3c32cf9a194db1bb52/sources/5q5e3j2h57.mp3"&#xA;-filter_complex "[0:v]trim=0:5.64,setpts=PTS-STARTPTS,scale=1920x1080,setdar=16/9[v0];[1:v]trim=0:8,setpts=PTS-STARTPTS,scale=1920x1080,setdar=16/9,loop=0:32767[v1]; ... [10:v]trim=0:13,setpts=PTS-STARTPTS,scale=1920x1080,setdar=16/9[v10];[v0] ... [v10] concat=n=11:v=1 [video];[11:a] atrim=0:99.29 [audio]"&#xA;-vsync 2 -map [video] -map [audio] output.mp4&#xA;

    &#xA;

    When I downloaded all sources to my local machine and tried to use them in the ffmpeg command it worked fine without errors.

    &#xA;

    Also, I figured out that it depends on the CPU. When I restricted my CPU the errors appeared earlier. And some commands might produce errors with a restricted CPU but finished successfully with no CPU restriction.

    &#xA;

    As I understand, for some reason, ffmpeg fails to receive a particular part of a file data, but I believe it should retry to receive lost packages (it's https).

    &#xA;

    And I don't understand, how it could be related to CPU or sources quantity.

    &#xA;

    By not understanding the core of evil, I can think about 2 ways (both ugly) :

    &#xA;

      &#xA;
    1. to download all sources and generate the final video from local files ;
    2. &#xA;

    3. to chunk sources, generate intermediate outputs for each chunk (and save locally), and concatenate them into the final one.
    4. &#xA;

    &#xA;

    Any better suggestions or at least where to seek ?

    &#xA;