Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (64)

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (9313)

  • 【carrierwave+ffmpeg】can't upload the video with sound

    10 avril 2020, par ken akita

    I want to make "Fake Instagram" Rails application.
then I made the uploader and I can upload the video(mp4), but no sound.
I can listen to the sound on my desktop but can't on my application, like this image, speakers not working.
enter image description here

    



    Code is here. I guess something wrong with image_uploader.rb or show.html.erb.
Note that first I made the ImageUploader to upload image, then I want to add video posting system to upload video. Both uploading done, but video without sound.
Really thank you for your advise !

    



    *image_uploader.rb
require 'streamio-ffmpeg'

class ImageUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick
  process resize_to_fit: [230, 183]

  storage :file

  def store_dir
    "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
  end

  version :thumb do
    process resize_to_fit: [230, 183]
  end
  version :screenshot do
    process :screenshot
    def full_filename (for_file = model.logo.file)
      "screenshot.jpg"
    end
  end

  def screenshot
    tmpfile = File.join(File.dirname(current_path), "tmpfile")

    File.rename(current_path, tmpfile)

    movie = FFMPEG::Movie.new(tmpfile)
    movie.screenshot(current_path + ".jpg", {resolution: '230x183' }, preserve_aspect_ratio: :width)
    File.rename(current_path + ".jpg", current_path)

    File.delete(tmpfile)
  end

  def extension_whitelist
    %w(jpg jpeg gif png mp4)
  end
end


    



    *show.html.erb&#xA;<h1>Stroll</h1>&#xA;<p>&lt;%= notice %></p>&#xA;<p></p>&#xA;&lt;% if @stroll[:image] == nil %>&#xA;  &lt;%= image_tag"03summer_ver8-l.jpg", width:"230", height:"183" %>&#xA;&lt;% elsif @stroll.image.file.content_type.include?(&#x27;video/&#x27;) %>&#xA;  &lt;%= link_to @stroll.image_url.to_s do %>&#xA;  &lt;%= image_tag(@stroll.image_url(:screenshot).to_s, id: "image", :alt => "screenshot") %>&#xA;  &lt;% end %>&#xA;&lt;% else %>&#xA;  &lt;%= image_tag(@stroll.image.url) if @stroll.image &amp;&amp; @stroll.image.url %>&#xA;&lt;% end %>&#xA;<p>user &lt;%= @stroll.user.name %></p>&#xA;<p>『&lt;%= @stroll.title %>』</p>&#xA;<p>content: &lt;%= @stroll.content %></p>&#xA;<p>tag: &lt;%= @stroll.tag %></p>&#xA;<p>comment: </p>&#xA;<div>&#xA;  &lt;%= render partial: &#x27;comments/index&#x27;, locals: { comments: @comments, stroll: @stroll } %>&#xA;</div>&#xA;&lt;% if user_signed_in? &amp;&amp; @stroll.user_id != current_user.id %>&#xA;  &lt;%= render partial: &#x27;comments/form&#x27;, locals: { comment: @comment, stroll: @stroll } %>&#xA;&lt;% end %>&#xA;&lt;% if current_user %>&#xA;  &lt;% unless @stroll.user_id == current_user.id %>&#xA;    &lt;% if @favorite.present? %>&#xA;      &lt;%= link_to &#x27;cancel&#x27;, favorite_path(id: @favorite.id), method: :delete, class: &#x27;btn btn-info&#x27; %>&#xA;      &lt;% else %>&#xA;      &lt;%= link_to &#x27;Like!&#x27;, favorites_path(stroll_id: @stroll.id), method: :post, class: &#x27;btn btn-warning&#x27; %>&#xA;    &lt;% end %>&#xA;  &lt;% end %>&#xA;&lt;% end %>&#xA;&amp;emsp;&#xA;&lt;%= link_to "Index", strolls_path %>&#xA;

    &#xA;

  • GStreamer : How to set "stream-number" pad property of mpegtsmux element ? [closed]

    8 novembre 2024, par TishSerg

    Accroding to gst-inspect-1.0 mpegtsmux, mpegtsmux's sink pads have writable stream-number property :

    &#xA;

    ...&#xA;Pad Templates:&#xA;  SINK template: &#x27;sink_%d&#x27;&#xA;    Availability: On request&#xA;    Capabilities:&#xA;      ...&#xA;    Type: GstBaseTsMuxPad&#xA;    Pad Properties:&#xA;      ...&#xA;&#xA;      stream-number       : stream number&#xA;                            flags: readable, writable&#xA;                            Integer. Range: 0 - 31 Default: 0&#xA;

    &#xA;

    But when I try to set it, GStreamer says there's no such property. The following listing shows I can run multi-stream pipeline without setting that property, but when I add that property it doesn't work.

    &#xA;

    PS C:\gstreamer\1.0\msvc_x86_64\bin> ./gst-launch-1.0 mpegtsmux name=mux ! udpsink host=192.168.144.255 port=5600 sync=no `&#xA;>> videotestsrc is-live=true pattern=ball ! "video/x-raw, width=1920, height=1080, profile=main" ! x264enc ! mux.sink_300 `&#xA;>> videotestsrc is-live=true ! "video/x-raw, width=720, height=576" ! x264enc ! mux.sink_301&#xA;Use Windows high-resolution clock, precision: 1 ms&#xA;Setting pipeline to PAUSED ...&#xA;Pipeline is live and does not need PREROLL ...&#xA;Pipeline is PREROLLED ...&#xA;Setting pipeline to PLAYING ...&#xA;New clock: GstSystemClock&#xA;Redistribute latency...&#xA;Redistribute latency...&#xA;Redistribute latency...&#xA;handling interrupt.9.&#xA;Interrupt: Stopping pipeline ...&#xA;Execution ended after 0:00:03.773243400&#xA;Setting pipeline to NULL ...&#xA;Freeing pipeline ...&#xA;PS C:\gstreamer\1.0\msvc_x86_64\bin> ./gst-launch-1.0 mpegtsmux name=mux sink_300::stream-number=1 ! udpsink host=192.168.144.255 port=5600 sync=no `&#xA;>> videotestsrc is-live=true pattern=ball ! "video/x-raw, width=1920, height=1080, profile=main" ! x264enc ! mux.sink_300 `&#xA;>> videotestsrc is-live=true ! "video/x-raw, width=720, height=576" ! x264enc ! mux.sink_301&#xA;WARNING: erroneous pipeline: no property "sink_300::stream-number" in element "mpegtsmux"&#xA;PS C:\gstreamer\1.0\msvc_x86_64\bin> .\gst-launch-1.0.exe --version&#xA;gst-launch-1.0 version 1.24.8&#xA;GStreamer 1.24.8&#xA;Unknown package origin&#xA;PS C:\gstreamer\1.0\msvc_x86_64\bin> .\gst-launch-1.0.exe --version&#xA;gst-launch-1.0 version 1.24.9&#xA;GStreamer 1.24.9&#xA;Unknown package origin&#xA;PS C:\gstreamer\1.0\msvc_x86_64\bin> ./gst-launch-1.0 mpegtsmux name=mux sink_300::stream-number=1 ! udpsink host=192.168.144.255 port=5600 sync=no `&#xA;>> videotestsrc is-live=true pattern=ball ! "video/x-raw, width=1920, height=1080, profile=main" ! x264enc ! mux.sink_300 `&#xA;>> videotestsrc is-live=true ! "video/x-raw, width=720, height=576" ! x264enc ! mux.sink_301&#xA;WARNING: erroneous pipeline: no property "sink_300::stream-number" in element "mpegtsmux"&#xA;

    &#xA;

    I even updated GStreamer, but still no luck. I tried that because I found news saying there were updates regarding that property :

    &#xA;

      397 ### MPEG-TS improvements&#xA;  398 &#xA;  399 -   mpegtsdemux gained support for&#xA;  400     -   segment seeking for seamless non-flushing looping, and&#xA;  401     -   synchronous KLV&#xA;  402 -   mpegtsmux now&#xA;  403     -   allows attaching PCR to non-PES streams&#xA;  404     -   allows setting of the PES stream number for AAC audio and AVC video streams via a new “stream-number” property on the&#xA;  405         muxer sink pads. Currently, the PES stream number is hard-coded to zero for these stream types.&#xA;

    &#xA;

    The syntax seems correct (pad_name::pad_prop_name on the element). I ran out of ideas about what I'm doing wrong with that property.

    &#xA;

    Broader context :

    &#xA;

    I want to set that property because I want an exact sequence of streams I mixing.

    &#xA;

    When I feed mpegtsmux with two video streams and one audio stream (from capture devices) without specifying the stream numbers I get them muxed in a random sequence (checking it using ffprobe). Sometimes they are in the desired sequence, but sometimes they aren't. The worst case is when the audio stream is the first stream in the file, so video players get mad when trying to play such .ts file. I have to remux such files using -map key of ffmpeg. If I could set exact stream indices in mpegtsmux (not to be confused with stream PID) I could avoid analyzing actual stream layout and remuxing.

    &#xA;

    Example of the real layout of the streams (ffprobe output) :

    &#xA;

    Input #0, mpegts, from &#x27;████████████████████████████████████████&#x27;:&#xA;  Duration: 00:20:09.64, start: 3870.816656, bitrate: 6390 kb/s&#xA;  Program 1&#xA;  Stream #0:2[0x41]: Video: h264 (Baseline) (HDMV / 0x564D4448), yuvj420p(pc, bt709, progressive), 1920x1080, 30 fps, 30 tbr, 90k tbn&#xA;  Stream #0:1[0x4b]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp, 130 kb/s&#xA;  Program 2&#xA;  Stream #0:0[0x42]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(progressive), 720x576, 25 fps, 25 tbr, 90k tbn&#xA;

    &#xA;

    You can see 3 streams :

    &#xA;

      &#xA;
    • FullHD video with PID 0x41 (defined by me as mpegtsmux0.sink_65) has index 2 while I want it to be 0
    • &#xA;

    • PAL video with PID 0x42 (defined by me as mpegtsmux0.sink_66) has index 0 while I want it to be 1
    • &#xA;

    • Audio with PID 0x4b (defined by me as mpegtsmux0.sink_75) has index 1 while I want it to be 2
    • &#xA;

    &#xA;

  • Use the font-size of the element if the font-size of the parent is 0 and use 16 if both are 0 (applies when deltaMode is 1).

    10 juillet 2014, par brandonaaron
    Use the font-size of the element if the font-size of the parent is 0 and use 16 if both are 0 (applies when deltaMode is 1).