Recherche avancée

Médias (91)

Autres articles (69)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (5348)

  • Trying to get property of non-object while uploading to database

    26 novembre 2017, par Programmmereg

    I have a script when user can clip video, then that video uploads to public folder, and now I want to upload all video data to database. But i get error like in title. Here’s my code :

    Controller :

    public function clip($id)
       {
           $video = Video::where('id', $id)->first();

           $oldId = $video->id;
           $originalName = $video->original_name;
           $newName = str_random(50) . '.' . 'mp4';

           FFMpeg::fromDisk('public')
           ->open('/uploads/videos/' .$video->file_name)
           ->addFilter(function ($filters) {
           $filters->clip(FFMpeg\Coordinate\TimeCode::fromSeconds(5), FFMpeg\Coordinate\TimeCode::fromSeconds(2));
           })
           ->export()
           ->toDisk('public')
           ->inFormat(new \FFMpeg\Format\Video\X264)
           ->save('/uploads/videos/' . $newName);



           $data = ['user_id'=>Auth::user()->id,
               'file_name'=>$newName,
               'original_name'=> $originalName,
               'old_id' => $oldId,
           ];

            $video = Video::edit($data);
       }

    Model :

    public static function edit($request)
       {
           $video = new Video;
           $video->user_id = $request->user_id;
           $video->file_name = $request->file_name;
           $video->original_name = $request->original_name;
           $video->save();

           $old = $file = Video::where('id', $request->old_id)->delete();
           //$old_file = unlink($request->file('file'));

           return $video;
       }

    What should I edit ?

  • Paperclip AV Transcoder not working on remote server

    25 novembre 2017, par zreitano

    I am able to upload videos locally. The videos are processed using paperclip and all the meta data is saved correctly, as well. When I tried to upload a video using our remote server, I received the error :

    Av::UnableToDetect (Unable to detect any supported library)

    I have installed ffmpeg using LinuxBrew. It says everything is installed correctly (checking which brew and which ffmpeg, as well as checking if the gem is appropriately installed).

    When I have styling in my model for the video (which is what enables the meta information to be stored and to have control over how the video is uploaded) it doesn’t work remotely.

    has_attached_file :video, path: "/posts/:id/:style.:extension",
     :styles => {
       :medium => { :geometry => "493x877", :format => 'flv' },
       :thumb => { :geometry => "100x100#", :format => 'jpg', :time => 10 },
       # :mobile => {:geometry => "640X480", :format => 'mp4', :streaming => true}
     }, :processors => [:transcoder]

    However, when I remove this from my model and have :

    has_attached_file :video, path: "/posts/:id/:style.:extension"

    The video is uploaded to S3 (without the data or styling that I need).

    Any help would be greatly appreciated. I think AV is having trouble finding ffmpeg but I am not sure why or how to go about fixing it. Thanks in advance for any advice.

  • Detect rotation angle and rotate final video using ffmpeg version 2.8

    9 novembre 2017, par Hemant Kumar

    I used to work on ffmpeg 2.2 until now and was detecting rotation angle of video uploaded from android / iPhone mobiles and rotate the resulting video so that it run perfectly on a correct angle.

    But since I have updated the ffmpeg to version 2.8 I am getting this rotation problem. My queries are not rotating the videos as they were earlier.

    Here’r the commands I was using :

    To check rotation angle :

    ffprobe -of json -show_streams {$input} | grep rotate

    below is my final command to convert a video to mp4

    "ffmpeg -i {$input} -strict -2 -vcodec libx264 -preset slow -vb 500k -maxrate 500k -bufsize 1000k -vf 'scale=-1:480 ".fix_video_orientation($input)."' -threads 0 -ab 64k -s {$resolution}  -movflags faststart -metadata:s:v:0 rotate=0 {$output}";

    "fix_video_orientation" function is given below. It detect the angle of rotation of the initial video and output optimal option for rotating the final video.

    function fix_video_orientation($input){

    $return= ", transpose=1 ";

    $dd= exec("ffprobe -of json -show_streams  {$input}   | grep rotate");

    if(!empty($dd)){

    $dd=explode(":",$dd);
    $rotate=str_replace(",","",str_replace('"',"",$dd[1]));

    if($rotate=="90")return $return;

    else if ($rotate=="180") return ", transpose=2,transpose=2 ";

    else if($rotate == "270") return ", transpose=2 ";
    }

    Currently above script is supporting "flv","avi","mp4","mkv","mpg","wmv","asf","webm","mov","3gp","3gpp" extensions, also the script is supporting the resulting .mp4 file to play on all browsers and devices.

    Now the ffprobe command is not returning rotation angle and so a portrait video if uploaded from iphone is showing as landscape on the website.

    Output console of ffprobe command :

    ffprobe version N-77455-g4707497 Copyright (c) 2007-2015 the FFmpeg developers
    built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
    configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
    libavutil 55. 11.100 / 55. 11.100
    libavcodec 57. 20.100 / 57. 20.100
    libavformat 57. 20.100 / 57. 20.100
    libavdevice 57. 0.100 / 57. 0.100
    libavfilter 6. 21.101 / 6. 21.101
    libavresample 3. 0. 0 / 3. 0. 0
    libswscale 4. 0.100 / 4. 0.100
    libswresample 2. 0.101 / 2. 0.101
    libpostproc 54. 0.100 / 54. 0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/standard/PORTRAIT.m4v':
    Metadata:
    major_brand : qt

    minor_version : 0
    compatible_brands: qt

    creation_time : 2016-02-03 05:25:18
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: iPhone 4S
    com.apple.quicktime.software: 9.2.1
    com.apple.quicktime.creationdate: 2016-02-03T10:52:11+0530
    Duration: 00:00:03.34, start: 0.000000, bitrate: 7910 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
    Metadata:
    creation_time : 2016-02-03 05:25:18
    handler_name : Core Media Data Handler
    Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x1280 [SAR 1:1 DAR 9:16], 7832 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 50 tbc (default)
    Metadata:
    creation_time : 2016-02-03 05:25:18
    handler_name : Core Media Data Handler
    encoder : H.264
    Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
    creation_time : 2016-02-03 05:25:18
    handler_name : Core Media Data Handler
    Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
    creation_time : 2016-02-03 05:25:18
    handler_name : Core Media Data Handler
    Unsupported codec with id 0 for input stream 2
    Unsupported codec with id 0 for input stream 3

    If latest version of ffmpeg (2.8) is used to auto rotate the video, can you please suggest me what option I need to add or remove from my final command.