Recherche avancée

Médias (91)

Autres articles (77)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4124)

  • HTML5 video player some mp4 files not playing chrome

    1er juillet 2020, par Marc

    So I'm trying to build a personnal streaming platform and I've done my best to follow the recommandations I've found everywhere for better compatibility/quality when streaming.

    



    So I'm systematically encoding my video to video codec h264 with mp4 container with ffmpeg using this command :

    



    ffmpeg -i input -vcodec libx264 -maxrate 8000k -bufsize 1000K -minrate 10k -crf 24 -ab 192k -movflags faststart output.mp4


    



    However, I occasionaly fall on some reluctant mp4 that will play fine on Edge and Firefox but won't on Chrome. Loading seems to be processed fine as I can see the total duration in the controls, but it will never play and will not leave any error in the console.

    



    Here's a Mediainfo export of such reluctant file :

    



    Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 1.04 GiB
Duration                                 : 1 h 21 min
Overall bit rate                         : 1 832 kb/s
Writing application                      : Lavf57.56.101

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 h 21 min
Bit rate                                 : 1 634 kb/s
Width                                    : 1 912 pixels
Height                                   : 1 032 pixels
Display aspect ratio                     : 1.85:1
Frame rate mode                          : Constant
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.035
Stream size                              : 953 MiB (89%)
Writing library                          : x264 core 148 r2748 97eaef2
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=9 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=24.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=8000 / vbv_bufsize=1000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language                                 : French
Menus                                    : 3
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 1 h 21 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 112 MiB (11%)
Language                                 : French
Default                                  : Yes
Alternate group                          : 1
Menus                                    : 3

Menu #1
ID                                       : 3
Codec ID                                 : text
Duration                                 : 1 h 21 min
Language                                 : English
Bit rate mode                            : CBR
Menu For                                 : 1,2
00:00:00.000                             : Chapitre 01
00:08:39.000                             : Chapitre 02
00:15:10.000                             : Chapitre 03
00:24:47.000                             : Chapitre 04
00:33:39.000                             : Chapitre 05
00:43:38.000                             : Chapitre 06
00:50:51.000                             : Chapitre 07
00:59:13.000                             : Chapitre 08
01:08:01.000                             : Chapitre 09
01:14:06.000                             : Chapitre 10
Bit rate mode                            : Constant

Menu #2
00:00:00.000                             : Chapitre 01
00:08:39.000                             : Chapitre 02
00:15:10.000                             : Chapitre 03
00:24:47.000                             : Chapitre 04
00:33:39.000                             : Chapitre 05
00:43:38.000                             : Chapitre 06
00:50:51.000                             : Chapitre 07
00:59:13.000                             : Chapitre 08
01:08:01.000                             : Chapitre 09
01:14:06.000                             : Chapitre 10


    



    Thanks in advance for any valuable tip you could provide

    


  • Extracting Thumbnail URL from Video URL

    29 août 2023, par Deepak Sangle

    So, I have a video URL in an Amazon S3 bucket. I must extract the thumbnail image (preview image) from the video URL. The catch is that I do not have the luxury to download or upload the complete video since it takes time. My approach is something like this.
I first created a blob object containing the first few seconds of that video using something like this.

    


      const chunkSize = 1024*1024; // 1MB
  const start = 0;
  const end = chunkSize - 1;
  const rangeHeader = `bytes=${start}-${end}`;
  
  const VideoResponse = await axios.get(url, { 
    responseType: 'arraybuffer',
    headers: { Range: rangeHeader }
  });

  const chunkData = VideoResponse.data; 
  
  const videoBlob = new Blob([chunkData], { type: 'video/mp4' });
  const videoUrl = URL.createObjectURL(videoBlob);
  console.log({chunkData, videoBlob, videoUrl});


    


    Console gives me something like this

    


    {&#xA;  chunkData: <buffer 00="00" 1c="1c" 66="66" 74="74" 79="79" 70="70" 6d="6d" 34="34" 32="32" 69="69" 73="73" 6f="6f" 61="61" 76="76" 63="63" 31="31" 02="02" bd="bd" ab="ab" 6c="6c" 68="68" 64="64" c7="c7" 1048526="1048526" more="more" bytes="bytes">,&#xA;  videoBlob: Blob { size: 1048576, type: &#x27;video/mp4&#x27; },&#xA;  videoUrl: &#x27;blob:nodedata:764fce87-792f-47e8-bc3e-15921ee5787f&#x27;&#xA;}&#xA;</buffer>

    &#xA;

    Now, there are many options after this. I am trying to download this blob object by converting it into a file. After I successfully convert it into an mp4 file, I can easily take a screenshot of it using fluent-ffmpeg package. However, I couldn't convert it into a file. If I try to do something like this

    &#xA;

      const BlobResponse = await axios({&#xA;    method: &#x27;GET&#x27;,&#xA;    url: videoUrl,&#xA;    responseType: &#x27;stream&#x27;&#xA;  });&#xA;&#xA;  const file = fs.createWriteStream(`video.mp4`);&#xA;  BlobResponse.data.pipe(file);&#xA;  &#xA;  file.on("error", (error) => {&#xA;    console.log(`There was an error writing the file. Details: $ {error}`);&#xA;  });&#xA;&#xA;  file.on(&#x27;finish&#x27;, () => {&#xA;    file.close();&#xA;    console.log("File downloaded successfully");&#xA;  });&#xA;

    &#xA;

    But it throws me the error AxiosError: Unsupported protocol blob:

    &#xA;

    I also tried to directly convert the blob object to a jpeg object but to no avail.

    &#xA;

    I have searched complete StackOverflow, and I have not found a single solution working so please let me know why those are not working or if there is any new solution to do this.

    &#xA;

  • Running ffmpeg in Docker environment on AWS EC2 [duplicate]

    5 mai 2024, par must

    I want to use FFMPEG inside my Java application.&#xA;I want to instal ffmpeg in environment where this app is running.

    &#xA;

    My current Dockerfile :

    &#xA;

    # Stage 1: Build the application&#xA;FROM maven:3.8.4-openjdk-17 AS build&#xA;WORKDIR /app&#xA;COPY pom.xml .&#xA;COPY src ./src&#xA;RUN mvn clean install -Dmaven.test.skip=true&#xA;&#xA;# Stage 2: Run the application&#xA;FROM openjdk:17&#xA;WORKDIR /app&#xA;COPY --from=build /app/target/application.jar ./app.jar&#xA;EXPOSE 8080&#xA;CMD ["java", "-jar", "-Dspring.profiles.active=pr", "app.jar"]&#xA;

    &#xA;

    I simply built a docker image by running docker buildx build --platform linux/amd64 -t repo/app:1.0 .

    &#xA;

    Then in AWS Console I run docker run and pull built image.

    &#xA;

    Everyone writes about adding

    &#xA;

    RUN apt-get -y update &amp;&amp; apt-get -y upgrade &amp;&amp; apt-get install -y --no-install-recommends ffmpeg&#xA;

    &#xA;

    but I cannot do it as I'm building image on MacOS and I do no have apt-get command.

    &#xA;

    When I was trying to pull some image form DockerHub FFMPEG could not be found.

    &#xA;

    I tried this one : https://hub.docker.com/r/jrottenberg/ffmpeg

    &#xA;

    and declared DockerFile as :

    &#xA;

    # Stage 1: Build the application&#xA;FROM maven:3.8.4-openjdk-17 AS build&#xA;WORKDIR /app&#xA;COPY pom.xml .&#xA;COPY src ./src&#xA;RUN mvn clean install -Dmaven.test.skip=true&#xA;&#xA;# Stage 2: Install ffmpeg&#xA;FROM jrottenberg/ffmpeg:latest AS ffmpeg&#xA;&#xA;# Stage 3: Run the application&#xA;FROM openjdk:17&#xA;WORKDIR /app&#xA;COPY --from=build /app/target/application.jar ./app.jar&#xA;COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg&#xA;&#xA;EXPOSE 8080&#xA;CMD ["java", "-jar", "-Dspring.profiles.active=pr", "app.jar"]&#xA;

    &#xA;

    but still it did not work. I get :

    &#xA;

    ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory&#xA;

    &#xA;

    I'm using Amazon Linux on EC2.

    &#xA;

    Can someone get me on the right track ?

    &#xA;