Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (61)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (3873)

  • Why audio element currentTime on ffmpeg encoded mp3 file in Chrome browser does not work

    26 juillet 2013, par Peter

    I have an HTML5 audio element :

    <audio preload="auto">
       <source src="./Sound/recording.mp3" type="audio/mpeg">
    </source></audio>

    and I need to be able to play last 4 seconds from mp3 recording. My javaScript is :

    audio.currentTime = audio.duration-4;
    audio.play();

    Works ok in IE10 and Firefox, but Chrome starts playing from a wrong place. The difference between reported audio.currentTime and actual playback position is about 20s. The recording.mp3 is created with ffmpeg :

    ffmpeg -i recording.wav -ab 32k recording.mp3

    It works, when I strip the ID3v2 header from the recording.mp3 (deleting the first couple bytes in the file before the audio data).

    It also works when I compress to ogg. Can somebody point me to the right direction (ffmpeg switches, audio element attributes or whatever) to get it work also in chrome ?

    Thanks in advance

    EDIT :
    the ffmpeg output :

    ffmpeg version N-53528-g160ea26 Copyright (c) 2000-2013 the FFmpeg developers
     built on May 27 2013 15:20:09 with gcc 4.7.3 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
    amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
    enable-libxvid --enable-zlib
     libavutil      52. 34.100 / 52. 34.100
     libavcodec     55. 12.100 / 55. 12.100
     libavformat    55.  7.100 / 55.  7.100
     libavdevice    55.  1.101 / 55.  1.101
     libavfilter     3. 72.100 /  3. 72.100
     libswscale      2.  3.100 /  2.  3.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  3.100 / 52.  3.100
    [wav @ 0433e840] max_analyze_duration 5000000 reached at 5015510 microseconds
    Guessed Channel Layout for  Input Stream #0.0 : mono
    Input #0, wav, from &#39;recording.wav&#39;:
     Duration: 02:30:07.86, bitrate: 176 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 11025 Hz, mono, s16, 176 kb/s
    Output #0, mp3, to &#39;recording.mp3&#39;:
     Metadata:
       TSSE            : Lavf55.7.100
       Stream #0:0: Audio: mp3 (libmp3lame), 11025 Hz, mono, s16p, 32 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (pcm_s16le -> libmp3lame)
    Press [q] to stop, [?] for help
    size=   35188kB time=02:30:07.86 bitrate=  32.0kbits/s
    video:0kB audio:35187kB subtitle:0 global headers:0kB muxing overhead 0.000672%
  • 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

    &#xA;

    Server code

    &#xA;

    // Execute the ffmpeg command to burn the subtitles into the video&#xA;const ffmpeg = spawn("ffmpeg", [&#xA;  "-i",&#xA;  "pipe:0",&#xA;  "-vf",&#xA;  `subtitles=${subtitlePath}:force_style=&#x27;Alignment=10,OutlineColour=&amp;H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=10&#x27;`,&#xA;  "-c:a",&#xA;  "copy",&#xA;  "-progress", "pipe:1",&#xA;  outputPath,&#xA;]);&#xA;&#xA;// Pipe the videoResponse array buffer to FFmpeg&#xA;ffmpeg.stdin.write(videoResponse.data);&#xA;ffmpeg.stdin.end();&#xA;&#xA;// Send the output file as a response once the process is complete&#xA;ffmpeg.on("close", () => {&#xA;  fs.readFile(outputPath, (err, data) => {&#xA;    if (err) {&#xA;      console.error(err);&#xA;    } else {&#xA;      console.log(outputPath)&#xA;    }&#xA;  });&#xA;});&#xA;

    &#xA;

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

    &#xA;

    &#xA;

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

    &#xA;

    &#xA;

    &#xA;

    Invalid argument

    &#xA;

    &#xA;

    &#xA;

    Error initializing complex filters.

    &#xA;

    &#xA;

    This is what I come up with so far

    &#xA;

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

    &#xA;

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

    &#xA;

     LOG  init firebase : videocap-71b4a&#xA; LOG  Running "videocap" with {"rootTag":11,"initialProps":{}}&#xA; LOG  Loading ffmpeg-kit-react-native.&#xA; LOG  Loaded ffmpeg-kit-react-native-ios-https-x86_64-5.1.0.&#xA; LOG  Error creating video with subtitles [TypeError: undefined is not a function]&#xA; LOG  ffmpeg version n5.1.2&#xA; LOG   Copyright (c) 2000-2022 the FFmpeg developers&#xA; LOG  &#xA; LOG    built with Apple clang version 14.0.0 (clang-1400.0.29.102)&#xA; 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&#x2B;&#x2B; --as=&#x27;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&#x27; --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=&#x27;-mios-simulator-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --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&#xA; LOG    libavutil      57. 28.100 / 57. 28.100&#xA; LOG    libavcodec     59. 37.100 / 59. 37.100&#xA; LOG    libavformat    59. 27.100 / 59. 27.100&#xA; LOG    libavdevice    59.  7.100 / 59.  7.100&#xA; LOG    libavfilter     8. 44.100 /  8. 44.100&#xA; LOG    libswscale      6.  7.100 /  6.  7.100&#xA; LOG    libswresample   4.  7.100 /  4.  7.100&#xA; LOG  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/Users/master/Documents/Code/videocap-mobile/media.mp4&#x27;:&#xA; LOG    Metadata:&#xA; LOG      major_brand     :&#xA; LOG  isom&#xA; LOG  &#xA; LOG      minor_version   :&#xA; LOG  512&#xA; LOG  &#xA; LOG      compatible_brands:&#xA; LOG  isomiso2avc1mp41&#xA; LOG  &#xA; LOG      encoder         :&#xA; LOG  Lavf58.76.100&#xA; LOG  &#xA; LOG    Duration:&#xA; LOG  00:00:11.82&#xA; LOG  , start:&#xA; LOG  0.000000&#xA; LOG  , bitrate:&#xA; LOG  813 kb/s&#xA; LOG  &#xA; LOG    Stream #0:0&#xA; LOG  [0x1]&#xA; LOG  (und)&#xA; LOG  : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive), 480x608, 682 kb/s&#xA; LOG  , SAR 32757:32326 DAR 491355:614194&#xA; LOG  ,&#xA; LOG  24.15 fps,&#xA; LOG  24 tbr,&#xA; LOG  1000k tbn&#xA; LOG   (default)&#xA; LOG  &#xA; LOG      Metadata:&#xA; LOG        handler_name    :&#xA; LOG  VideoHandler&#xA; LOG  &#xA; LOG        vendor_id       :&#xA; LOG  [0][0][0][0]&#xA; LOG  &#xA; LOG    Stream #0:1&#xA; LOG  [0x2]&#xA; LOG  (und)&#xA; LOG  : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s&#xA; LOG   (default)&#xA; LOG  &#xA; LOG      Metadata:&#xA; LOG        handler_name    :&#xA; LOG  SoundHandler&#xA; LOG  &#xA; LOG        vendor_id       :&#xA; LOG  [0][0][0][0]&#xA; LOG  &#xA; LOG  /Users/master/Documents/Code/videocap-mobile/transcription.srt: Immediate exit requested&#xA; LOG  Exiting normally, received signal 2.&#xA;

    &#xA;

    Please help

    &#xA;

  • FFmpeg unable to save file on Android : Output file #0 does not contain any stream

    16 mai 2022, par John M.

    I'm having difficulty when saving a RTSP stream into internal storage using ffmpeg-kit -i rtsp://192.168.100.60:554/stream1 -c:v copy -c:a copy -t 5 /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4. The command is called using FFmpegKit.executeAsync(command, ...). There're issues with the circular_buffer_size option, but I read that the warnings could be ignored. The command runs fine on desktop using ffmpeg. Please find below the log.

    &#xA;

    Any advice would be appreciated.

    &#xA;

    ffmpeg started on 2022-05-16 at 15:27:54&#xA;Report written to "/data/user/0/com.arthenica.ffmpegkit.test/cache/ffreport.txt"&#xA;Log level: 48&#xA;Command line:&#xA;ffmpeg-kit -i rtsp://192.168.100.60:554/stream1 -c:v copy -c:a copy -t 5 /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4&#xA;ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)&#xA;  configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/storage/light/projects/ffmpeg-kit/prebuilt/android-x86-lts/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --target-os=android --disable-neon --disable-asm --disable-inline-asm --ar=i686-linux-android-ar --cc=i686-linux-android16-clang --cxx=i686-linux-android16-clang&#x2B;&#x2B; --ranlib=i686-linux-android-ranlib --strip=i686-linux-android-strip --nm=i686-linux-android-nm --extra-libs=&#x27;-L/storage/light/projects/ffmpeg-kit/prebuilt/android-x86-lts/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-test --disable-programs --disable-postproc --  libavutil      57. 13.100 / 57. 13.100&#xA;  libavcodec     59. 15.102 / 59. 15.102&#xA;  libavformat    59. 10.100 / 59. 10.100&#xA;  libavdevice    59.  1.100 / 59.  1.100&#xA;  libavfilter     8. 21.100 /  8. 21.100&#xA;  libswscale      6.  1.102 /  6.  1.102&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;rtsp://192.168.100.60:554/stream1&#x27;.&#xA;Reading option &#x27;-c:v&#x27; ... matched as option &#x27;c&#x27; (codec name) with argument &#x27;copy&#x27;.&#xA;Reading option &#x27;-c:a&#x27; ... matched as option &#x27;c&#x27; (codec name) with argument &#x27;copy&#x27;.&#xA;Reading option &#x27;-t&#x27; ... matched as option &#x27;t&#x27; (record or transcode "duration" seconds of audio/video) with argument &#x27;5&#x27;.&#xA;Reading option &#x27;/data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url rtsp://192.168.100.60:554/stream1.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: rtsp://192.168.100.60:554/stream1.&#xA;[tcp @ 0xa21d3a80] No default whitelist set&#xA;[tcp @ 0xa21d3a80] Original list of addresses:&#xA;[tcp @ 0xa21d3a80] Address 192.168.100.60 port 554&#xA;[tcp @ 0xa21d3a80] Interleaved list of addresses:&#xA;[tcp @ 0xa21d3a80] Address 192.168.100.60 port 554&#xA;[tcp @ 0xa21d3a80] Starting connection attempt to 192.168.100.60 port 554&#xA;[tcp @ 0xa21d3a80] Successfully connected to 192.168.100.60 port 554&#xA;[rtsp @ 0xb25b5a00] SDP:&#xA;v=0&#xA;o=- 14665860 31787219 1 IN IP4 192.168.100.60&#xA;s=Session streamed by "MERCURY RTSP Server"&#xA;t=0 0&#xA;a=smart_encoder:virtualIFrame=1&#xA;m=video 0 RTP/AVP 96&#xA;c=IN IP4 0.0.0.0&#xA;b=AS:4096&#xA;a=range:npt=0-&#xA;a=control:track1&#xA;a=rtpmap:96 H264/90000&#xA;a=fmtp:96 packetization-mode=1; profile-level-id=4D4020; sprop-parameter-sets=Z01AIJWgFAF34maIAAADAAgAAAMBlCA=,aO48gA==&#xA;&#xA;Failed to parse interval end specification &#x27;&#x27;&#xA;[rtsp @ 0xb25b5a00] video codec set to: h264&#xA;[rtsp @ 0xb25b5a00] RTP Packetization Mode: 1&#xA;[rtsp @ 0xb25b5a00] RTP Profile IDC: 4d Profile IOP: 40 Level: 20&#xA;[rtsp @ 0xb25b5a00] Extradata set to 0xb25abdf0 (size: 35)&#xA;[rtp @ 0xb25abe60] No default whitelist set&#xA;[udp @ 0xb25abed0] No default whitelist set&#xA;[udp @ 0xb25abed0] &#x27;circular_buffer_size&#x27; option was set but it is not supported on this build (pthread support is required)&#xA;[udp @ 0xb25abed0] end receive buffer size reported is 524288&#xA;[udp @ 0xb25abf40] No default whitelist set&#xA;[udp @ 0xb25abf40] &#x27;circular_buffer_size&#x27; option was set but it is not supported on this build (pthread support is required)&#xA;[udp @ 0xb25abf40] end receive buffer size reported is 524288&#xA;[rtsp @ 0xb25b5a00] setting jitter buffer size to 500&#xA;[rtsp @ 0xb25b5a00] hello state=0&#xA;Failed to parse interval end specification &#x27;&#x27;&#xA;[h264 @ 0x907e5b00] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0x907e5b00] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;[h264 @ 0x907e5b00] nal_unit_type: 7(SPS), nal_ref_idc: 3&#xA;[h264 @ 0x907e5b00] nal_unit_type: 8(PPS), nal_ref_idc: 3&#xA;[rtsp @ 0xb25b5a00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;Input #0, rtsp, from &#x27;rtsp://192.168.100.60:554/stream1&#x27;:&#xA;  Metadata:&#xA;    title           : Session streamed by "MERCURY RTSP Server"&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0, 0, 1/90000: Video: h264, none, 90k tbr, 90k tbn&#xA;Successfully opened the file.&#xA;Parsing a group of options: output url /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4.&#xA;Applying option c:v (codec name) with argument copy.&#xA;Applying option c:a (codec name) with argument copy.&#xA;Applying option t (record or transcode "duration" seconds of audio/video) with argument 5.&#xA;Successfully parsed a group of options.&#xA;Opening an output file: /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4.&#xA;Output #0, mp4, to &#x27;/data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4&#x27;:&#xA;Output file #0 does not contain any stream&#xA;

    &#xA;