Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (64)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • 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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (12307)

  • Unable to load FFProbe in laravel app

    1er août 2016, par Bullgod

    i have a problem when i upload a video with a form in my server. In the moment of upload, the aplication, must to convert the format of the video to mp4. In my notebook, this convertion work fine but when i try to convert a video in the server, i receive this error :

    ExecutableNotFoundException in FFProbeDriver.php line 50 : Unable to load FFProbe

    This is my form :

    {!! Form::open(['route' =>'upload.store', 'method'=>'POST', 'files'=> true ]) !!}

    <div class="form-group" style="display: none;">
       {!! Form::label('usuario_id', 'usuario_id:') !!}
       {!! Form::text('usuario_id', Auth::user()->id) !!}
    </div>
    <div class="form-group" style="display: none;">
       {!! Form::label('state', 'State:') !!}
       {!! Form::text('state', 0) !!}
    </div>
    <div class="form-group">
       {!! Form::label('asignatura_id', 'Asignatura:') !!}
       {!! Form::select('asignatura_id', $subject) !!}
    </div>
    <div class="form-group">
       {!! Form::label('name', 'Nombre:') !!}
       {!! Form::text('name', null, ['class'=> 'form-control', 'placeholder' => 'Ingresa el nombre de la pelicula']) !!}
    </div>
    <div class="form-group">
       {!! Form::label('language', 'Idioma:') !!}
       {!! Form::text('language', null, ['class'=> 'form-control', 'placeholder' => 'Ingresa la descripcion']) !!}
    </div><div class="form-group">
       {!! Form::label('creation_date', 'Fecha Creación:') !!}
       {!! Form::text('creation_date', null, ['class'=> 'form-control', 'placeholder' => 'Ingresa el nombre de la pelicula']) !!}
    </div>
    <div class="form-group">
       {!! Form::label('description', 'Descripcion:') !!}
       {!! Form::text('description', null, ['class'=> 'form-control', 'placeholder' => 'Ingresa la descripcion']) !!}
    </div>
    <div class="form-group">
       {!! Form::label('imageRef', 'Imagen:') !!}
       {!! Form::file('imageRef') !!}
    </div>

    <div class="form-group">
       {!! Form::label('url', 'Video:') !!}
       {!! Form::file('url') !!}
    </div>
       {!! Form::submit('Registrar',['class' =>'btn btn-primary']) !!}
       {!! Form::close() !!}

    The function in the model :

    public function setUrlAttribute($url){

           $this->attributes['url'] = 'old/'.Carbon::now()->second.$url->getClientOriginalName();
           $name = Carbon::now()->second.$url->getClientOriginalName();
           \Storage::disk('local')->put($name, \File::get($url));

           $file = pathinfo($name,PATHINFO_FILENAME);
           $extension = pathinfo($name,PATHINFO_EXTENSION);

           $ffmpeg = \FFMpeg\FFMpeg::create([
               'ffmpeg.binaries'  => '/usr/bin/ffmpeg.exe',
               'ffprobe.binaries' => '/usr/bin/ffprobe.exe',
               'timeout'          => 0, // The timeout for the underlying process
               'ffmpeg.threads'   => 12,   // The number of threads that FFMpeg should use

           ]);
           $video = $ffmpeg->open($url);
           $format = new FFMpeg\Format\Video\X264('libmp3lame', 'libx264');
           $format->on('progress', function ($video, $format, $percentage) {
               echo "$percentage % transcoded";
           });
           $format
           -> setKiloBitrate(1000)
           -> setAudioChannels(2)
           -> setAudioKiloBitrate(256);

           $video
           ->save($format, 'files/convert/'.$file.'.mp4');
           $this->attributes['url'] = $file.'.mp4';
       }

    if i convert the video in the console i receive this :

    # ffmpeg -i 67portrait.MOV -vcodec libx264 new.mp4
    FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
     built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
     libavutil     50.15. 1 / 50.15. 1
     libavcodec    52.72. 2 / 52.72. 2
     libavformat   52.64. 2 / 52.64. 2
     libavdevice   52. 2. 0 / 52. 2. 0
     libavfilter    1.19. 0 /  1.19. 0
     libswscale     0.11. 0 /  0.11. 0
     libpostproc   51. 2. 0 / 51. 2. 0

    Seems stream 1 codec frame rate differs from container frame rate: 1200.00 (1200/1) -> 29.97 (30000/1001)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '67portrait.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       date            : 2013-11-29T13:19:09+0100
       date-fra        : 2013-11-29T13:19:09+0100
     Duration: 00:00:02.08, start: 0.000000, bitrate: 926 kb/s
       Stream #0.0(und): Audio: aac, 44100 Hz, mono, s16, 60 kb/s
       Stream #0.1(und): Video: h264, yuv420p, 568x320, 863 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc
    [libx264 @ 0x24bab70]broken ffmpeg default settings detected
    [libx264 @ 0x24bab70]use an encoding preset (e.g. -vpre medium)
    [libx264 @ 0x24bab70]preset usage: -vpre <speed> -vpre <profile>
    [libx264 @ 0x24bab70]speed presets are listed in x264 --help
    [libx264 @ 0x24bab70]profile is optional; x264 defaults to high
    Output #0, mp4, to 'new.mp4':
       Stream #0.0(und): Video: libx264, yuv420p, 568x320, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
       Stream #0.1(und): Audio: libfaac, 44100 Hz, mono, s16, 64 kb/s
    Stream mapping:
     Stream #0.1 -> #0.0
     Stream #0.0 -> #0.1
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    </profile></speed>

    i have tried a lot of thinks to resolve this problem but steel happend.

  • Error:No such property : targetPlatform for class : com.android.build.gradle.managed.NdkConfig

    30 juillet 2016, par Alder

    I am trying to build FFMPEG into my JNI code with gradle in Android Studio. I have build FFMPEG as a .so file, in order to adapt different platform, I build it for different ABI(arm64-v8a, armeabi-v7a, mip, etc).Then I need to determine the ABI of the current build in the build.gradle file.

    Refer Experimental Plugin User Guide, my build.gradle look like this :

    apply plugin: 'com.android.model.native'    
    model{
       repositories {
           prebuilt(PrebuiltLibraries){
               ffmpeg{
                   headers.srcDir "src/main/jni/build/${targetPlatform.getName()}/include"
                   binaries.withType(SharedLibraryBinary) {
                       sharedLibraryFile = file("src/main/jni/build/${targetPlatform.getName()}/libvflibrary.so")
                   }
               }
           }
       }
       android {
           compileSdkVersion = 24
           buildToolsVersion = "23.0.3"

           defaultConfig {
               minSdkVersion.apiLevel = 15
               targetSdkVersion.apiLevel = 24
               versionCode = 1
               versionName = "1.0"
           }

           ndk{
               //platformVersion = 21
               moduleName = "library-jni"
               stl = 'gnustl_static'
               toolchain = "clang"
               abiFilters.addAll(['armeabi', 'armeabi-v7a', 'arm64-v8a', 'mips'])
               cppFlags.addAll(['-std=c++11', '-D__STDC_CONSTANT_MACROS'])
               ldLibs.addAll(['log', 'android', 'z', 'EGL', 'GLESv2'])
           }

           sources {
               main {
                   jni {
                       source{
                           srcDirs 'src/main/jni'
                       }
                       dependencies {
                           library 'ffmpeg' linkage 'shared'
                       }
                   }
               }
           }
       }
    }

    I am getting an error :

    Error:No such property : targetPlatform for class :
    com.android.build.gradle.managed.NdkConfig.

    Does anyone have an idea on how I can solve this, please ?

  • How run subprocess in Python 3 on windows for convert video ?

    31 août 2016, par Diego F. Ruiz S.

    I have a little problem, I have trying for a lot time converted a video with FFMPEG in python 3 like this :

    The model,

    class Video(models.Model):
      name = models.CharField(max_length=200, null=False)
      state = models.CharField(max_length=30, null=False)
      user_email = models.CharField(max_length=30, null=False)
      uploadDate = models.DateTimeField(null=False)
      message = models.CharField(max_length=200, null=False)
      original_video = models.FileField(upload_to='video', null=True)
      converted = models.BooleanField(default=False)

    And the code of converted.

    video = Video.objects.filter(id=param_id).get()
    pathConverted = 'C:\\Users\\diego\\Documents\\GitHub\\convertido.mp4'
    cmd = ['ffmpeg', '-i ', video.original_video.path, ' -b 1500k -vcodec ibx264 -g 30', pathConverted]
    print('Ejecutando... ', ' '.join(cmd))
    try:
       proc = subprocess.run(cmd, shell=True, check=True)
       proc.subprocess.wait()
    except subprocess.CalledProcessError as e:
       raise RuntimeError("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))

    The error is this.

    raise RuntimeError("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output)) RuntimeError: command '['ffmpeg', '-i ', 'C:\\Users\\diego\\Documents\\GitHub\\video1.avi', ' -b 1500k -vcodec libx264 -g 30', 'C:\\Users\\diego\\Documents\\GitHub\\convertido.mp4']' return with error (code 1): None

    And also I have tried this :

    video = Video.objects.filter(id=1).get()
    pathConverted = 'C:\\Users\\diego\\Documents\\GitHub\\convertido.mp4'
    cmd = ['ffmpeg', '-i ', video.original_video.path, ' -b 1500k -vcodec libx264 -g 30', pathConverted]
    print('Ejecutando... ', ' '.join(cmd))
    proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
    proc.subprocess.wait()

    In this case the error is :

    FileNotFoundError: [WinError 2] No such file or directory

    But when I copy the path and paste this in CMD on windows for try this converted the video. It works fine.

    Then, I am confused, I don’t understand what is the error.

    Somebody can help me please ?