Recherche avancée

Médias (91)

Autres articles (67)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (6259)

  • ffmpeg conversion from MOV to mp4 - how to conserve creation date

    13 juin 2020, par jacobacci

    Windows 10 1909, latest updates.

    



    I am helping a friend move his photos and videos from one Apple ID to another.
I have downloaded all items to my PC using iCloud for PC. I then proceeded to re-upload all the photos to the new Apple ID.
2'000 of the videos are MOV, which I cannot upload to iCloud. I seem to need to convert them to mp4 in order to upload them.

    



    I have converted all of the MOVs to mp4 using the following batch

    



    FOR /F "tokens=*" %%G IN ('dir /b *.MOV') DO ffmpeg -i "%%G" -f mp4 -vcodec copy -acodec mp3 "%%~nG.mp4"


    



    This worked fine and I managed to upload the (now) mp4's to iCloud. Unfortunately all the mp4's now carry yesterday's date as creation date. In iCloud (and on the iPad) all the videos are now displayed with a creation date of 12.6.2020 and it is impossible to find a particular video. Also the context to the photos is lost.

    



    Question :

    



      

    • Is there any way to (batch) convert 2'000 MOV to mp4 while preserving the creation date ?
    • 


    • alternatively : is there any way to upload the original MOV files to iCloud ?
    • 


    


  • Error when converting mp4 video to HLS using stream as input in node js using ffmpeg

    6 janvier 2023, par Sankalp Kataria

    I am trying to convert an MP4 file to HLS using ffmpeg.
Code :

    



    var stream = createReadStream(filePath);
ffmpeg(stream)
    .on('stderr', function(stderrLine) {
        console.log('Stderr output: ' + stderrLine);
    })
    .on('end', function() {
        console.log('done processing input stream');
    })
    .on('error', function(err) {
        console.log('an error happened: ' + err.message);
    })
    .save(join(__basedir, "public", `file.m3u8`));


    



    OutPut :

    



    Stderr output: ffmpeg version git-2020-05-22-38490cb Copyright (c) 2000-2020 the FFmpeg developers
Stderr output:   built with gcc 9.3.1 (GCC) 20200513
Stderr output:   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
Stderr output:   libavutil      56. 46.100 / 56. 46.100
Stderr output:   libavcodec     58. 86.101 / 58. 86.101
Stderr output:   libavformat    58. 43.100 / 58. 43.100
Stderr output:   libavdevice    58.  9.103 / 58.  9.103
Stderr output:   libavfilter     7. 82.100 /  7. 82.100
Stderr output:   libswscale      5.  6.101 /  5.  6.101
Stderr output:   libswresample   3.  6.100 /  3.  6.100
Stderr output:   libpostproc    55.  6.100 / 55.  6.100
Stderr output: [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b68c53cb00] overread end of atom 'stsd' by 34 bytes
Stderr output: [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b68c53cb00] stream 0, offset 0x30: partial file
Stderr output: [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b68c53cb00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080, 2528 kb/s): unspecified pixel format
Stderr output: Consider increasing the value for the 'analyzeduration' and 'probesize' options
Stderr output: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
Stderr output:   Metadata:
Stderr output:     major_brand     : isom
Stderr output:     minor_version   : 512
Stderr output:     compatible_brands: isomiso2avc1mp41
Stderr output:     encoder         : Lavf56.25.101
Stderr output:   Duration: 00:03:00.97, start: 0.000000, bitrate: N/A
Stderr output:     Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 2528 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 48k tbc (default)
Stderr output:     Metadata:
Stderr output:       handler_name    : VideoHandler
Stderr output:     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Stderr output:     Metadata:
Stderr output:       handler_name    : SoundHandler
Stderr output: Stream mapping:
Stderr output:   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stderr output:   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Stderr output: [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b68c53cb00] stream 0, offset 0x30: partial file
Stderr output: pipe:0: Invalid data found when processing input
Stderr output: Cannot determine format of input stream 0:0 after EOF
Stderr output: Error marking filters as finished
Stderr output: Conversion failed!
Stderr output:
an error happened: ffmpeg exited with code 1: pipe:0: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!


    



    I've also tried with moveflag option
.outputOptions("-movflags isml+frag_keyframe") also with -movflags faststart

    



    I've read through
How do you use Node.js to stream an MP4 file with ffmpeg ?

    



    But i didn't quite understand what and how to do it.

    


  • FFMPEG HTTP to RTP then RTP to HTTP with OPUS

    20 juin 2020, par Brad Hambleton

    I'm taking a HTTP output to FFMPEG and copying the audio (no video) to an RTP :
ffmpeg -i http://192.168.0.40:20110 -c:a copy -f rtp rtp ://192.168.87.40:20210 ?pkt_size=1328 -sdp_file opus.sdp

    


    At the other end receiving the RTP and pushing it back to HTTP :
ffmpeg -re -protocol_whitelist rtp,file,udp -i opus.sdp -c:a copy -listen 1 -method GET -f opus http://192.168.87.40:20220

    


    2 Problems :

    


      

    1. Currently the encoding process doesn't optimize packets.
92 1.004672 192.168.0.40 192.168.0.40 UDP 392 52954 → 20210 Len=332
93 1.004727 192.168.0.40 192.168.0.40 UDP 392 52954 → 20210 Len=332
94 1.004789 192.168.0.40 192.168.0.40 UDP 392 52954 → 20210 Len=332
95 1.004855 192.168.0.40 192.168.0.40 UDP 392 52954 → 20210 Len=332
96 1.004908 192.168.0.40 192.168.0.40 UDP 392 52954 → 20210 Len=332
    2. 


    


    Each packet length is 332, which leaves a lot of wasted space. I'd like to get close to 1500 (Stack 4 together I get 1328 which is close enough)
Is there a command in the FFMPEG/RTP that will optimize packets ?
I added ?pkt_size=1328 to the RTP however that only sets max, not preferred.

    


      

    1. I get the following error when I try to HTTP to RTP via copy :
C :\Decode>ffmpeg -re -protocol_whitelist rtp,file,udp -i opus.sdp -c:a copy -listen 1 -method GET -f opus http://192.168.0.40:20220
ffmpeg version git-2020-05-23-26b4509 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200523
configuration : —enable-gpl —enable-version3 —enable-sdl2 —enable-fontconfig —enable-gnutls —enable-iconv —enable-libass —enable-libdav1d —enable-libbluray —enable-libfreetype —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libsrt —enable-libtheora —enable-libtwolame —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxml2 —enable-libzimg —enable-lzma —enable-zlib —enable-gmp —enable-libvidstab —enable-libvmaf —enable-libvorbis —enable-libvo-amrwbenc —enable-libmysofa —enable-libspeex —enable-libxvid —enable-libaom —disable-w32threads —enable-libmfx —enable-ffnvcodec —enable-cuda-llvm —enable-cuvid —enable-d3d11va —enable-nvenc —enable-nvdec —enable-dxva2 —enable-avisynth —enable-libopenmpt —enable-amf
libavutil 56. 48.100 / 56. 48.100
libavcodec 58. 87.101 / 58. 87.101
libavformat 58. 43.100 / 58. 43.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 83.100 / 7. 83.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, sdp, from 'opus.sdp' :
Metadata :
title : No Name
Duration : N/A, start : 0.000000, bitrate : N/A
Stream #0:0 : Audio : opus, 48000 Hz, stereo, fltp
[opus @ 00000221a9a4d280] No extradata present
Could not write header for output file #0 (incorrect codec parameters ?) : Invalid data found when processing input
Stream mapping :
Stream #0:0 -> #0:0 (copy)
Last message repeated 1 times
    2. 


    


    Tried a variety of additions to the RTP to HTTP CLI to get it to work, but still nothing.

    


    -flags -global_header -reconnect_streamed 1 -headers "X-Forwarded-For : 13.14.15.66"

    


    Is there a specific OPUS or HTTP header that can be added to get it to work. Decoding and Encoding does work for RTP to HTTP, the idea isn't to decode/encode at either point, just to copy the audio, change the container..

    


    Cheers