Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (95)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (10738)

  • Android : Select from images extracted with FFMPEG

    21 juillet 2017, par Tix

    I’m currently able to extract images(frames) from a video, and display all the extracted images using the code below, how do i make it so that the displayed images could be selected by user and passed as a bitmap to another activity ?

    FFMPEG Compiled using

    compile ’com.writingminds:FFmpegAndroid:0.3.2’

    Complex Command used to get the frames/images

    String[] complexCommand = "-y", "-i", yourRealPath, "-an", "-framerate", "60", "-vf", "select=’gte(n,45)’", "-vsync", "0", dest.getAbsolutePath() ;

    Main Activity

           /**
            * Command for extracting images from video
            */
           private void extractImagesVideo(int startMs, int endMs) {
               File moviesDir = Environment.getExternalStoragePublicDirectory(
                       Environment.DIRECTORY_PICTURES
               );

               String filePrefix = "extract_picture";
               String fileExtn = ".jpg";
               String yourRealPath = getPath(MainActivity.this, selectedVideoUri);

               File dir = new File(moviesDir, "VideoEditor");
               int fileNo = 0;
               while (dir.exists()) {
                   fileNo++;
                   dir = new File(moviesDir, "VideoEditor" + fileNo);

               }
               dir.mkdir();
               filePath = dir.getAbsolutePath();
               File dest = new File(dir, filePrefix + "%03d" + fileExtn);


               Log.d(TAG, "startTrim: src: " + yourRealPath);
               Log.d(TAG, "startTrim: dest: " + dest.getAbsolutePath());

               String[] complexCommand = {"-y", "-i", yourRealPath, "-an", "-r", "1/2", "-ss", "" + startMs / 1000, "-t", "" + (endMs - startMs) / 1000, dest.getAbsolutePath()};

               execFFmpegBinary(complexCommand);

           }

        /**
            * Executing ffmpeg binary
            */
           private void execFFmpegBinary(final String[] command) {
               try {
                   ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
                       @Override
                       public void onFailure(String s) {
                           Log.d(TAG, "FAILED with output : " + s);
                       }

                       @Override
                       public void onSuccess(String s) {
                           Log.d(TAG, "SUCCESS with output : " + s);
                           if (choice == 1 || choice == 2 || choice == 5 || choice == 6 || choice == 7) {
                               Intent intent = new Intent(MainActivity.this, PreviewActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           } else if (choice == 3) {
                               Intent intent = new Intent(MainActivity.this, PreviewImageActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           } else if (choice == 4) {
                               Intent intent = new Intent(MainActivity.this, AudioPreviewActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           } else if (choice == 8) {
                               choice = 9;
                               reverseVideoCommand();
                           } else if (Arrays.equals(command, lastReverseCommand)) {
                               choice = 10;
                               concatVideoCommand();
                           } else if (choice == 10) {
                               File moviesDir = Environment.getExternalStoragePublicDirectory(
                                       Environment.DIRECTORY_MOVIES
                               );
                               File destDir = new File(moviesDir, ".VideoPartsReverse");
                               File dir = new File(moviesDir, ".VideoSplit");
                               if (dir.exists())
                                   deleteDir(dir);
                               if (destDir.exists())
                                   deleteDir(destDir);
                               choice = 11;
                               Intent intent = new Intent(MainActivity.this, PreviewActivity.class);
                               intent.putExtra(FILEPATH, filePath);
                               startActivity(intent);
                           }
                       }

    PreviewImageActivity

       public class PreviewImageActivity extends AppCompatActivity {

           private static final String FILEPATH = "filepath";
               @Override
               protected void onCreate(@Nullable Bundle savedInstanceState) {
                   super.onCreate(savedInstanceState);
                   setContentView(R.layout.activity_gallery);
                   getSupportActionBar().setDisplayHomeAsUpEnabled(true);
                   getSupportActionBar().setDisplayShowHomeEnabled(true);
                   TextView tvInstruction=(TextView)findViewById(R.id.tvInstruction) ;

                   GridLayoutManager lLayoutlLayout = new GridLayoutManager(PreviewImageActivity.this, 4);
                   RecyclerView rView = (RecyclerView)findViewById(R.id.recycler_view);
                   rView.setHasFixedSize(true);
                   rView.setLayoutManager(lLayoutlLayout);
                   String filePath = getIntent().getStringExtra(FILEPATH);
                   ArrayList<string> f = new ArrayList<string>();



      File dir = new File(filePath);
               tvInstruction.setText("Images stored at path "+filePath);
               File[] listFile;

                   listFile = dir.listFiles();



               for(File e:listFile)
               {
                   f.add(e.getAbsolutePath());
               }

               PreviewImageAdapter rcAdapter = new PreviewImageAdapter( f);
               rView.setAdapter(rcAdapter);


           }
       @Override
       public boolean onOptionsItemSelected(MenuItem item) {
           // handle arrow click here
           if (item.getItemId() == android.R.id.home) {
               finish(); // close this activity and return to preview activity (if there is any)
           }

           return super.onOptionsItemSelected(item);
       }
    }
    </string></string>

    PreviewImageAdapter

    public class PreviewImageAdapter extends RecyclerView.Adapter {

       private ArrayList<string> paths;

       public PreviewImageAdapter( ArrayList<string> paths) {
           this.paths = paths;
       }

       @Override
       public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
           View itemView = LayoutInflater.from(parent.getContext())
                   .inflate(R.layout.item_gallery, parent, false);

           return new MyViewHolder(itemView);
       }

       @Override
       public void onBindViewHolder(MyViewHolder holder, int position) {
           Bitmap bmp = BitmapFactory.decodeFile(paths.get(position));
           holder.ivPhoto.setImageBitmap(bmp);
       }

       @Override
       public int getItemCount() {
           return paths.size();
       }

       public class MyViewHolder extends RecyclerView.ViewHolder {
           private ImageView ivPhoto;

           public MyViewHolder(View itemView) {
               super(itemView);

               ivPhoto = (ImageView) itemView.findViewById(R.id.ivPhoto);
           }
       }

    }
    </string></string>
  • Video Failed to transcode with FFmpeg with Rails app in my localhost

    25 avril 2017, par Takor

    I ve tried to upload videos using Carrierwave-video & FFmpeg. I’ve installed FFmpeg and there is no problem with installation. I have made configurations from ’ http://blog.41studio.com/upload-videos-using-carrierwave-ffmpeg/ ’ .But when I tried to upload video (.mov file), I have an error.

    Error

    Video Failed to transcode with FFmpeg. Check ffmpeg install and verify video is not corrupt or cut short. Original error: Failed encoding.Errors: encoded file is invalid. Full output: ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 7.0.0 (clang-700.1.76) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfaac --enable-nonfree --enable-vda libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/tanerkoroglu/Desktop/Wishpere2/public/uploads/tmp/1449435556-7186-2107/IMG_1756.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2015-10-17 12:19:27 Duration: 00:01:04.24, start: 0.000000, bitrate: 17176 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17082 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler encoder : H.264 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 85 kb/s (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler Please use -q:a or -q:v, -qscale is ambiguous [Parsed_movie_0 @ 0x7feb6bf00100] Failed to avformat_open_input '/Users/tanerkoroglu/Desktop/Wishpere2/app/assets/images/logo.png' [AVFilterGraph @ 0x7feb6bc09240] Error initializing filter 'movie' with args '/Users/tanerkoroglu/Desktop/Wishpere2/app/assets/images/logo.png' Error opening filters!

    video_uploader.rb

    class VideoUploader &lt; CarrierWave::Uploader::Base  
       include CarrierWave::Video
       process :encode
        def encode
          encode_video(:mp4, watermark: {path: File.join(Rails.root, "app/assets/images/logo.png")})
        end

      version :mp4 do
        def full_filename(for_file)
           super.chomp(File.extname(super)) + '.mp4'
        end
      end
    end

    Gemfile

    gem 'carrierwave',             '0.10.0'
    gem 'carrierwave-video'
    gem 'streamio-ffmpeg'
  • ffmpeg v4l2 taking 100% cpu usage

    16 novembre 2022, par didentifier

    I am on Fedora 37, version is irrelevant as I had same issue on Fedora 36.

    &#xA;

    I am using the following command to send video from my usb video card to v4l2loopback and the CPU usage goes to 100% and I can't do much more on my computer (i5-8600k, nvidia 2060 rtx, 16GB ram).

    &#xA;

    ffmpeg -nostdin -threads 1 -f video4linux2 -video_size 1920x1080 -input_format mjpeg -i /dev/video1 -f v4l2 -preset fast -c:v copy /dev/video0

    &#xA;

    previously the command was like that and the rest of the arguments was added to see if it makes any difference, it seems it doesn't change much

    &#xA;

    ffmpeg -f video4linux2 -video_size 1920x1080 -input_format mjpeg -i /dev/video1 -f v4l2 -c copy /dev/video0

    &#xA;

    To be honest I don't know much about ffmpeg or video in general, I was using the same command a few months ago on the same hardware with almost 0 impact to my performance, I could play games and watch videos at the same time while now I get 15 FPS in my games while I am using ffmpeg. Did anything change in ffmpeg ? Any improvements to my ffmpeg command ? Shouldn't ffmpeg not encode anything if I am using pixelformat and frame rate supported by my usb video card and if that is true shouldn't be super light ?

    &#xA;