Recherche avancée

Médias (1)

Mot : - Tags -/intégration

Autres articles (65)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (11294)

  • How to use ffmpeg to copy streams and preserve format and metadata ?

    24 septembre 2023, par dzeek

    I have two files with multiple streams in each.

    



    Output.mp4 has 2 streams : video and audio (streams 0,1)

    



    Input.mp4 has 3 streams : video, audio and data (streams 0,1,2)

    



    I need to add stream 2 from Input.mp4 to Output.mp4 yielding Final.mov.

    



    I tried using this command but it does seem to preserve the format and metadata for the stream that is added :

    



    ffmpeg -y -i Output.mp4 -i Input.mp4 -c copy -map 0:0 -map 0:1 -map 1:2 Final.mov


    



    The output from ffmpeg seems to show that it is working but the format and metadata for the streams in the Final.mov is not correct.

    



    I would appreciate any help with how to change the command to make it work.

    



    Thank you !

    



    Here is the command output :

    



    ffmpeg -y -i Output.mp4 -i Input.mp4 -c copy -map 0:0 -map 0:1 -map 1:2 Final.mov

ffmpeg version N-84679-gd65b595 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 51.100 / 55. 51.100
  libavcodec     57. 86.103 / 57. 86.103
  libavformat    57. 67.100 / 57. 67.100
  libavdevice    57.  3.101 / 57.  3.101
  libavfilter     6. 78.100 /  6. 78.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Output.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2018-04-15T21:57:13.000000Z
  Duration: 00:24:25.05, start: 0.000000, bitrate: 3571 kb/s
    Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 7680x3840 [SAR 1:1 DAR 2:1], 3252 kb/s, 1 fps, 1 tbr, 100k tbn, 2.15 tbc (default)
    Metadata:
      creation_time   : 2018-04-15T21:57:13.000000Z
      handler_name    : Alias Data Handler
      encoder         : HEVC Coding
    Side data:
      stereo3d: 2D
      spherical: equirectangular (0.000000/0.000000/0.000000)
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      creation_time   : 2018-04-15T21:57:13.000000Z
      handler_name    : Alias Data Handler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    creation_time   : 2018-04-12T12:02:32.000000Z
    make            : Insta360
    model           : Insta360 Pro
    encoder         : Lavf57.71.100
    description     : {"info":{"gyro_stabilized":false,"initial_view_changed":false}}
  Duration: 00:24:25.00, start: -0.004233, bitrate: 6394 kb/s
    Stream #1:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv), 7680x3840, 6196 kb/s, 1 fps, 1 tbr, 360k tbn, 5 tbc (default)
    Metadata:
      creation_time   : 2018-04-12T12:02:32.000000Z
      handler_name    : VideoHandler
    Side data:
      stereo3d: 2D
      spherical: equirectangular (0.000000/0.000000/0.000000)
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 4.0, fltp, 129 kb/s (default)
    Metadata:
      creation_time   : 2018-04-12T12:02:32.000000Z
      handler_name    : SoundHandler
    Stream #1:2(und): Data: none (camm / 0x6D6D6163), 36 kb/s
    Metadata:
      creation_time   : 2018-04-12T12:02:32.000000Z
      handler_name    : CameraMetadataMotionHandler
Output #0, mov, to 'Final.mov':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    encoder         : Lavf57.67.100
    Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 7680x3840 [SAR 1:1 DAR 2:1], q=2-31, 3252 kb/s, 1 fps, 1 tbr, 100k tbn, 100k tbc (default)
    Metadata:
      creation_time   : 2018-04-15T21:57:13.000000Z
      handler_name    : Alias Data Handler
      encoder         : HEVC Coding
    Side data:
      stereo3d: 2D
      spherical: equirectangular (0.000000/0.000000/0.000000)
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      creation_time   : 2018-04-15T21:57:13.000000Z
      handler_name    : Alias Data Handler
    Stream #0:2(und): Data: none (camm / 0x6D6D6163), 36 kb/s
    Metadata:
      creation_time   : 2018-04-12T12:02:32.000000Z
      handler_name    : CameraMetadataMotionHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
[mov @ 0000000004894f00] Unknown hldr_type for camm / 0x6D6D6163, writing dummy valuesd= 629x
frame= 1465 fps=625 q=-1.0 Lsize=  650825kB time=00:24:24.98 bitrate=3639.3kbits/s speed= 625x
video:581593kB audio:56757kB subtitle:0kB other streams:6602kB global headers:0kB muxing overhead: 0.910633%


    



    Here are the streams in the Final.mp4 file :

    



    ffmpeg -i Final.mov

ffmpeg version N-84679-gd65b595 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 51.100 / 55. 51.100
  libavcodec     57. 86.103 / 57. 86.103
  libavformat    57. 67.100 / 57. 67.100
  libavdevice    57.  3.101 / 57.  3.101
  libavfilter     6. 78.100 /  6. 78.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002726860] overread end of atom 'stsd' by 2974416 bytes
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Final.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf57.67.100
  Duration: 00:24:25.00, start: 0.000000, bitrate: 3639 kb/s
    Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 7680x3840 [SAR 1:1 DAR 2:1], 3252 kb/s, 1 fps, 1 tbr, 100k tbn, 2.15 tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : HEVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      handler_name    : DataHandler
    Stream #0:2(eng): Data: none (stts / 0x73747473), 36 kb/s
    Metadata:
      handler_name    : DataHandler


    


  • ffplay subscription to rtmp stream fails on first try

    2 janvier 2018, par ehouse

    I have an Electron application that does some video streaming through ffmpeg. It works fine on Windows, but I am having a small problem with it on Mac. I stream the desktop with ffmpeg, and try to subscribe to the rtmp stream. I know the rtmp stream is live because I can successfully grab a frame from it.

    The problem is, when I subscribe with ffplay, it does not work, the output looks like this :
    2018/01/01 20:57:25:618 [web]     nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

    When I subscribe again (while the previous process is still ongoing), it works : 2018/01/01 20:57:25:828 [web]  340.93 M-V:  0.001 fd=   0 aq=    0KB vq=  131KB sq=    0B f=0/0

    The only difference in output to the command line is this :

    Input #0, live_flv, from 'rtmp:{stream-url-here}':=0/0  
    2018/01/01 20:57:15:427 [web]   Metadata:
    2018/01/01 20:57:15:427 [web]     Server          : NGINX RTMP
    (github.com/sergey-dryabzhinsky/nginx-rtmp-module)
    2018/01/01 20:57:15:427 [web]     displayWidth    : 1024
    2018/01/01 20:57:15:428 [web]     displayHeight   : 640
    2018/01/01 20:57:15:429 [web]     fps             : 20
    2018/01/01 20:57:15:429 [web]     profile         :
    2018/01/01 20:57:15:430 [web]     level           :
    2018/01/01 20:57:15:430 [web]   Duration: 00:00:00.00, start:
    316.500000, bitrate: N/A
    2018/01/01 20:57:15:430 [web]     Stream #0:0: Video: h264 (Constrained
    Baseline), yuv420p(progressive), 1024x640, 20 fps, 20 tbr, 1k tbn, 40
    tbc

    I am trying to figure out why it only works on the second time subscribing, and this is the difference, which I assumes signals the it successfully received the streams info, but I am trying to figure out why it only works the second time.

    Thanks !!

  • Using ffmpeg to generate dash manifest and it cannot be played by dash.js

    18 mars 2019, par Punkhead

    I’m using ffmpeg to encode incoming stream via rtmp protocol, the code as following :

    ffmpeg -re -i rtmp://localhost:1935${StreamPath} -use_timeline 1 /
    -use_template 1 -window_size 10 -min_seg_duration 5000 -f dash out.mpd

    The manifest looks like this :

    <?xml version="1.0" encoding="utf-8"?>
    <mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT1M36.4S" minbuffertime="PT8.3S">
       <programinformation>
       </programinformation>
       <period start="PT0.0S">
           <adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true" framerate="30/1">
           <representation mimetype="video/mp4" codecs="avc1.640028" width="1920" height="1080" framerate="30/1">
               <segmenttemplate timescale="15360" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="4">
                   <segmenttimeline>
                       <s t="384000" d="128000"></s>
                       <s d="71680"></s>
                       <s d="128000" r="4"></s>
                       <s d="56832"></s>
                       <s d="128000"></s>
                       <s d="72704"></s>
                   </segmenttimeline>
               </segmenttemplate>
           </representation>
       </adaptationset>
       <adaptationset contenttype="audio" segmentalignment="true" bitstreamswitching="true">
           <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audiosamplingrate="44100">
               <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
               <segmenttemplate timescale="44100" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="4">
                   <segmenttimeline>
                       <s t="1099755" d="367616"></s>
                       <s d="205824"></s>
                       <s d="367616" r="4"></s>
                       <s d="162816"></s>
                       <s d="367616"></s>
                       <s d="207872"></s>
                   </segmenttimeline>
               </segmenttemplate>
           </representation>
       </adaptationset>
    </period>
    </mpd>

    When I try to play it on dash.js player, a error occured :

    [112] Parsing complete: ( xml2json: 3.50ms, objectiron: 1.76ms, total: 0.00526s) Debug.js:127
    [116] SegmentTimeline detected using calculated Live Edge Time Debug.js:127
    [118] MediaSource attached to element.  Waiting on open... Debug.js:127
    [119] Manifest has been refreshed at Tue Jan 02 2018 01:57:35 GMT+0800 [1514829455.1] Debug.js:127
    [155] MediaSource is open! Debug.js:127
    [156] Duration successfully set to: 96.4 Debug.js:127
    [157] Added 0 inline events Debug.js:127
    [158] video codec: video/mp4;codecs="avc1.640028" Stream.js:225
    Uncaught TypeError: Cannot read property 'type' of null
       at z (Stream.js:225)
       at C (Stream.js:285)
       at D (Stream.js:373)
       at E (Stream.js:398)
       at Object.d [as activate] (Stream.js:107)
       at y (StreamController.js:363)
       at MediaSource.c (StreamController.js:342)

    then it fails to playback...

    Is it because I didn’t set the parameters right on ffmpeg or this is a bug in dash.js ?

    I really stuck here !