Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (52)

  • 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

  • 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

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (10155)

  • CMake on Ubuntu, Requested 'libavdevice' >= 56.4.100 but version of libavdevice is 53.2.0

    5 mars 2019, par user1830386

    I am trying to get into plug in writing for Gazebo but keep running into an error when compiling my programs.

    Requested 'libavdevice >= 56.4.100' but version of libavdevice is 53.2.0
    CMake Error at /usr/share/cmake-
    3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
    Could NOT find AVDEVICE (missing: AVDEVICE_FOUND) (Required is at least
    version "56.4.100")

    but when I do ffmpeg -version I get :

    libavdevice    57. 10.100 / 57. 10.100

    Yet CMake seems to think I’m on version 53. Trying to update ffmpeg or libavdevice-dev returns that I am on the latest version.

    Here is my make file :

    cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

    find_package(gazebo REQUIRED)
    include_directories(${GAZEBO_INCLUDE_DIRS})
    link_directories(${GAZEBO_LIBRARY_DIRS})
    list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")

    add_library(model_control SHARED model_control.cc)
    target_link_libraries(model_control ${GAZEBO_LIBRARIES})

    list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")

    and the cc file :

    #include <functional>
    #include <gazebo></gazebo>gazebo.hh>
    #include <gazebo></gazebo>physics/physics.hh>
    #include <gazebo></gazebo>common/common.hh>
    #include <ignition></ignition>math/Vector3.hh>

    namespace gazebo
    {
     class ModelPush : public ModelPlugin
     {
       public: void Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/)
       {
         // Store the pointer to the model
         this->model = _parent;

         // Listen to the update event. This event is broadcast every
         // simulation iteration.
         this->updateConnection = event::Events::ConnectWorldUpdateBegin(
             std::bind(&amp;ModelPush::OnUpdate, this));
       }

       // Called by the world update start event
       public: void OnUpdate()
       {
         // Apply a small linear velocity to the model.
         this->model->SetLinearVel(ignition::math::Vector3d(.3, 0, 0));
       }

       // Pointer to the model
       private: physics::ModelPtr model;

       // Pointer to the update event connection
       private: event::ConnectionPtr updateConnection;
     };

     // Register this plugin with the simulator
     GZ_REGISTER_MODEL_PLUGIN(ModelPush)
    }
    </functional>

    Thanks !

  • Allowing downloads of partial video files from Django

    18 janvier 2019, par DataVis

    I have a Django app that allows users to make/save ’clips’ of video files, that is keep timestamps of start and end times of video files to save in playlists. I would like users to be able to download clips (and playlists as well) they have saved.

    I have done quite a bit of research on the topic and have gotten ffmpeg working from my terminal to save partial clips (though I’ve struggled to figure out pathnames for using subprocess.call with ffmpeg), and I have also gotten moviepy working via the terminal to save partial clips.

    I’m struggling to figure out how to incorporate this into my Django app so that users can click a link and subsequently begin a download of a specific clip (or playlist). I believe I will want to use celery to avoid tying up the server but I’m not even to the point where I can offload a task as I can’t figure out how to :

    1. ’Clip’ the original, longer video file to make it shorter (do I need to make a local copy of a new file first ?).
    2. Send a response as a download to the user.

    Here is my models.py :

    class Match(models.Model):
       game_id = models.IntegerField(primary_key=True,
           validators=[MinValueValidator(1)],db_column="game_id")
       wide = models.FileField(upload_to='games/2018/',blank=True,null=True)

    class Playlist(models.Model):
           name = models.CharField(default='',null=True,blank=True,max_length=200)
           created_by = models.ForeignKey(User,related_name="playlists",on_delete=models.CASCADE)
           created =   models.DateTimeField(editable=False)
           modified =  models.DateTimeField()


           def save(self, *args, **kwargs):
               ''' On save, update timestamps '''
               if not self.id:
                   entries = Playlist.objects.order_by('-id')
                   try:
                       self.id = entries[0].id + 1
                   except IndexError:
                       # we don't have any PlaylistEntries yet, so we just start @ 0
                       self.id = 0
                   self.created = timezone.now()
               self.modified = timezone.now()

               return super(Playlist, self).save(*args, **kwargs)


       class Clip(models.Model):
           name =  models.CharField(default='',null=True,blank=True,max_length=200)
           game_id = models.ForeignKey(Match,related_name="clips",on_delete=models.CASCADE,
               db_column="game_id",null=True,blank=True)
           clipstart = models.IntegerField(null=True,blank=True)
           clipend = models.IntegerField(null=True,blank=True)
           playlist = models.ForeignKey(Playlist,related_name="clips",on_delete=models.CASCADE,
               db_column="playlist",null=True,blank=True)
           created_by = models.ForeignKey(User,related_name="clips",on_delete=models.CASCADE)
           created =   models.DateTimeField(editable=False)
           modified =  models.DateTimeField()
           duration = models.IntegerField(null=True,blank=True)

           def save(self, *args, **kwargs):
               ''' On save, update timestamps '''
               if not self.id:
                   entries = Clip.objects.order_by('-id')
                   try:
                       self.id = entries[0].id + 1
                   except IndexError:
                       # we don't have any PlaylistEntries yet, so we just start @ 0
                       self.id = 0
                   self.created = timezone.now()
               self.modified = timezone.now()
               self.duration = int(self.clipend) - int(self.clipstart)
               return super(Clip, self).save(*args, **kwargs)

    And views.py where I’m struggling (I’m not sure if I’m working with FileField properly etc) :

    from moviepy.editor import *
    def ClipDownload(request,pk,*args,**kwargs):

       this_clip = models.Clip.objects.filter(pk=pk)
       file_name = this_clip[0].game_id.wide

       p = VideoFileClip(file_name,audio=False).subclip(this_clip.clipstart,this_clip.clipend)

       response = HttpResponse(p, content_type='application/force-download')
       response['Content-Disposition'] = 'attachment; filename=%s' % this_clip.name
       response['Content-Length'] = os.path.getsize(file_name)
       return response

    The current code is not working, I’m getting the proper Clip but I’m not able to make a subclip of the FileField as I’m getting an attribute error :

    AttributeError: 'FieldFile' object has no attribute 'endswith'

    I would be very appreciative if someone can point me in the right direction to get the file downloading so I can move on to trying to incorporate it into celery ?

  • I have a problem withInvalid file index 1 in filtergraph description

    17 avril 2019, par Davide

    This is my code :

    ffmpeg -i wireframe-spendo.mov palette.png -filter_complex fps=25,scale=800:600:flags=lanczos[x],[x][1:v]paletteuse wireframe-spendo.gif

    but after then :

    ffmpeg -i wireframe-spendo.mov palette.png -filter_complex fps=25,scale=800:600:flags=lanczos[x],[x][1:v]paletteuse wireframe-spendo.gif
    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'wireframe-spendo.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       creation_time   : 2019-04-17T09:38:24.000000Z
       com.apple.quicktime.make: Apple
       com.apple.quicktime.model: iMac12,2
       com.apple.quicktime.software: Mac OS X 10.13.6 (17G6029)
       com.apple.quicktime.creationdate: 2019-04-17T11:37:00+0200
     Duration: 00:00:16.42, start: 0.000000, bitrate: 3170 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1476x1074 [SAR 1:1 DAR 246:179], 3163 kb/s, 60 fps, 60 tbr, 6k tbn, 12k tbc (default)
       Metadata:
         creation_time   : 2019-04-17T09:38:24.000000Z
         handler_name    : Core Media Video
         encoder         : H.264

    output terminal says :

    Invalid file index 1 in filtergraph description fps=25,scale=800:600:flags=lanczos[x],[x][1:v]paletteuse.