Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (42)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • 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

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (7943)

  • rtp mpg stream using jrtplib occurred error "illegal timestamp unit"

    13 avril 2013, par socket

    I wanna code rtp video stream sender and use VLC to play it in the LAN. I just have a mpeg4 file "a.mpg". And in my opinion, jrtplib can pack the packed well, so I think I can use sendPacket() function directly to send the mpg file. code below :

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include <iostream>
    #include

    using namespace jrtplib;
    using namespace std;
    int main()
    {
    RTPSession s;
    RTPSessionParams sparam;
    s.SetTimestampUnit(160.0/104857.0);//~
    RTPUDPv4TransmissionParams tparam;
    tparam.SetPortbase(9000);
    int status=s.Create(sparam,&amp;tparam);
    if(status&lt;0)
    {
       cerr&lt;&lt;"error 1"&lt;/~
    s.SetDefaultMark(false);
    s.SetDefaultTimestampIncrement(160);//~~

    unsigned char buf[160];
    FILE*f=fopen("a.mpg","rb");
    while(!feof(f))
    {
       fread(buf,1,160,f);
       RTPTime delay(0.02);//~
       bool ret=false;
       status=s.SendPacket(buf,160);
       if(status&lt;0)
       {
           cerr&lt;&lt;"error 3"&lt;code></iostream>

    Then, I compile it :

    g++ jrtpsend.cpp -ljrtp -I /usr/local/include/jrtplib3

    After that, I run the program but error occurred :

    kl@kl-ubuntu:~/code/RTP$ ./a.out
    error 1
    Speficied an illegal timestamp unit for the the RTCP packet builder

    Actually, I didn't know timestamp exactly. When I use ffplay to play a.mpg showing that :

    Input #0, mpeg, from &#39;a.mpg&#39;:q=    0KB vq=    0KB sq=    0B f=0/0  
    Duration: 00:01:00.69, start: 0.529089, bitrate: 556 kb/s
    Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 640x480 [SAR 239:182 DAR 478:273],   104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16p, 128 kb/s

    2.46 A-V : -0.003 fd= 7 aq= 2KB vq= 33KB sq= 0B f=0/0

    So, I use the data 104857kb/s in the code (setTimestampUnit()), but I have no idea whether I use it correctly.
    All in all, please give me some suggestion how to run the program well or ...
    Best regards :-)

  • "File doesn't exist" - streamio FFMPEG on screenshot after create method

    3 mai 2013, par dodgerogers747

    I have videos being directly uploaded to S3 using Amazon's CORS configuration. Videos are uploaded via a dedicated S3 form, once they have been uploaded successfully the URL of the video is appended to the @video.file hidden_field via javascript and then the video saves.

    I can't get this after_save method to work which takes a screenshot of the video and saves it to S3 via carrierwave after the video has been saved as a rails object. ( It was previously working using a carrierwave video upload instance )

    It errors out withErrno::ENOENT - No such file or directory - the file &#39;http://bucket-name.s3.amazonaws.com/uploads/video/file/secure-random-hex/video_name.m4v&#39; does not exist: I have tried running this method as a class method to call it from the console but it always comes back with the same error, even though the video exists.

    My bucket is set to public, read and write. How come it doesn't think the file exists ?

    If anyone needs more code just shout, thanks in advance.

    application trace

    Started POST "/videos" for 127.0.0.1 at 2013-05-03 10:48:07 -0700
    Processing by VideosController#create as JS
     Parameters: {"utf8"=>"✓", "authenticity_token"=>"MAHxrVcmPDtVIMfDWZBwL0YnzaAaAe1PTGip5M4OVoY=", "video"=>{"user_id"=>"5", "file"=>"http://bucket-name.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v"}}
     User Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 5 LIMIT 1
      (0.1ms)  BEGIN
     SQL (20.5ms)  INSERT INTO `videos` (`created_at`, `file`, `question_id`, `screenshot`, `updated_at`, `user_id`) VALUES (&#39;2013-05-03 17:48:07&#39;, &#39;http://teebox-network.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v&#39;, NULL, NULL, &#39;2013-05-03 17:48:07&#39;, 5)
      (44.0ms)  ROLLBACK
    Completed 500 Internal Server Error in 71ms

    Errno::ENOENT - No such file or directory - the file &#39;http://teebox-network.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v&#39; does not exist:
     (gem) streamio-ffmpeg-0.9.0/lib/ffmpeg/movie.rb:10:in `initialize&#39;
     app/models/video.rb:25:in `new&#39;
     app/models/video.rb:25:in `take_screenshot&#39;

    video.rb

     attr_accessible :user_id, :question_id, :file, :screenshot
     belongs_to :question
     belongs_to :user

     default_scope order(&#39;created_at DESC&#39;)

     after_create :take_screenshot

     mount_uploader :screenshot, ImageUploader

     validates_presence_of :user_id, :file

     def take_screenshot
       FFMPEG.ffmpeg_binary = &#39;/opt/local/bin/ffmpeg&#39;
       movie = FFMPEG::Movie.new("#{self.file}")
       self.screenshot = movie.screenshot("#{Rails.root}/public/uploads/tmp/screenshots/#{File.basename(self.file)}.jpg", seek_time: 2 )
       self.save!
     end

    videos/_form.html.erb

    <form action="http://bucket-name.s3.amazonaws.com" data-remote="true" class="direct-upload" enctype="multipart/form-data" method="post">
     <input type="hidden" />
     <input type="hidden" value="ACCESS_KEY" />
     <input type="hidden" value="public-read" />
     <input type="hidden" />
     <input type="hidden" />
     <input type="hidden" value="201" />
     <input type="file" />
    </form>

    &lt;%= form_for @video, html: { multipart: true, id: "new_video" }, remote: true do |f| %>
           &lt;% if @video.errors.any? %>
       <div>
       <h2>&lt;%= pluralize(@video.errors.count, "error") %> prohibited this post from being saved:</h2>

     <ul>
       &lt;% @video.errors.full_messages.each do |msg| %>
           <li>&lt;%= msg %></li>
           &lt;% end %>
       </ul>
       </div>
    &lt;% end %>

       &lt;%= f.hidden_field :user_id, value: current_user.id %>
       &lt;%= f.hidden_field :file %><br />

       &lt;% end %>

    ImageUploader

    class ImageUploader &lt; CarrierWave::Uploader::Base

     include CarrierWave::RMagick

      include Sprockets::Helpers::RailsHelper
      include Sprockets::Helpers::IsolatedHelper

     storage :fog

     before :store, :remember_cache_id
     after :store, :delete_tmp_dir

       def cache_dir
         Rails.root.join(&#39;public/uploads/tmp/&#39;)
       end

       def remember_cache_id(new_file)
         @cache_id_was = cache_id
       end

       def delete_tmp_dir(new_file)
         if @cache_id_was.present? &amp;&amp; @cache_id_was =~ /\A[\d]{8}\-[\d]{4}\-[\d]+\-[\d]{4}\z/
           FileUtils.rm_rf(File.join(root, cache_dir, @cache_id_was))
         end
       end

     process resize_and_pad: [306, 150, &#39;#000&#39;]

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

     def extension_white_list
       %w(jpg)
       # %w(ogg ogv 3gp mp4 m4v webm mov)
     end
  • j2k/jpeg2000 : split data pointer in int & float.

    30 mai 2013, par Michael Niedermayer
    j2k/jpeg2000 : split data pointer in int & float.
    

    This fixes a TODO item and unifies both decoders structures
    It also fixes undefined behavior due to aliasing violations

    I choose 2 fields instead of a union because mistakely using the
    wrong type with a union will lead to hard to debug "wrong output"
    while with 2 fields mistakely using the wrong type will crash
    with a null pointer derefernce which is much easier to debug

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/j2k.c
    • [DH] libavcodec/j2k.h
    • [DH] libavcodec/j2kdec.c
    • [DH] libavcodec/j2kenc.c
    • [DH] libavcodec/jpeg2000.c
    • [DH] libavcodec/jpeg2000.h
    • [DH] libavcodec/jpeg2000dec.c