Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (50)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10230)

  • ffmpegmediaMetadataRetriever cannot be used for m3u8 format ?

    19 juillet 2017, par Nandz

    I want to get the frames from the video URL which is of m3u8 format. I couldn’t retrieve the frame at the specified time. When i tried with mp4 format, it worked. ( Am using android videoview)

    Here is my code.

    public class VideoViewAdapterClass extends RecyclerView.Adapter {

           private List<videomodelactivity> videoListModel;
           private Context context;
           public Bitmap bitmap;
          String videoPath = "https://xxxxxx.xxxxxx.xxxxx/HLS/xxxxxxxx/fruit_milkshake-master-playlist.m3u8";

           public VideoViewAdapterClass(List<videomodelactivity> videoList, Context context) {
               this.context = context;

               videoListModel = videoList;

           }

           @Override
           public VideoViewAdapterClass.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

               View itemLayoutView = LayoutInflater.from(parent.getContext()).inflate(
                       R.layout.customized_layout, null);

               ViewHolder viewHolder = new ViewHolder(itemLayoutView);
               return viewHolder;

           }

           @Override
           public void onBindViewHolder(final VideoViewAdapterClass.ViewHolder holder, int position) {


              final VideoModelActivity videoModel = videoListModel.get(position);
               holder.movieName.setText(videoModel.getMovieName());

               MediaMetadataRetriever mediaMetadataRetriever = null;

               try {
                   mediaMetadataRetriever = new MediaMetadataRetriever();
                   if (Build.VERSION.SDK_INT >= 14)

                       mediaMetadataRetriever.setDataSource(videoPath, new HashMap());
                   bitmap = mediaMetadataRetriever.getFrameAtTime(2000000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC);


               } catch (Exception e) {
                   e.printStackTrace();

               } finally {
                   if (mediaMetadataRetriever != null)
                       mediaMetadataRetriever.release();
               }

               holder.vidImg.setImageBitmap(bitmap);

                       holder.vidImg.setOnClickListener(new View.OnClickListener() {
                   @Override
                   public void onClick(View view) {

                       Intent intent = new Intent (context, VideoViewActivity.class);
                       intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                       context.startActivity(intent);

                   }
               });


           }

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

           public class ViewHolder extends RecyclerView.ViewHolder {

               ImageView vidImg;
               TextView movieName;
               public ViewHolder(View itemView) {
                   super(itemView);

                   vidImg = (ImageView) itemView.findViewById(R.id.imageVid);
                   movieName = (TextView) itemView.findViewById(R.id.movieName);
               }
           }
       }
    </videomodelactivity></videomodelactivity>
  • Unable to convert video to mp4 formate

    11 avril 2017, par Usman Saeed

    I have to convert video (any format) to mp4 format
    I am using this android library WritingMinds

    Here is my code

     ffmpeg = FFmpeg.getInstance(UploadVideoService.this);
               loadFFMpegBinary();

               String newVideoPath = Utils.makeAndGetFolderName(Constants.PHOTEX_VIDEO);
               File file = new File(newVideoPath + File.separator +
                       System.currentTimeMillis() + ".mp4");
               if (file.exists()) {
                   file.delete();
               }

               File fileOrignal = new File(videoFilePath);
               if (fileOrignal.exists()) {
                   try {
                       InputStream is =new FileInputStream(videoFilePath);
                       int size = is.available();
                       byte[] buffer = new byte[size];
                       is.read(buffer);
                       is.close();
                       FileOutputStream fos = new FileOutputStream(file);
                       fos.write(buffer);
                       fos.close();


                       String command = "-i " + fileOrignal.getAbsolutePath()
                               + " -c:v libx264 -c:a aac -movflags faststart " + file.getAbsolutePath();

                       execFFmpegBinary(new String[]{command});
                   } catch (Exception e) {
                       Log.d(TAG, "Exception ");
                       e.printStackTrace();
                   }

       private void loadFFMpegBinary() {
       try {
           ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
               @Override
               public void onFailure() {
                   // TODO: 11-Apr-17 Notification and toast
               }

               @Override
               public void onSuccess() {
                   super.onSuccess();




               }
           });
       } catch (FFmpegNotSupportedException e) {
           e.printStackTrace();
       }
    }

       private void execFFmpegBinary(final String[] command) {
       try {
           ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
               @Override
               public void onFailure(String s) {
                   Log.d(TAG, "onFailure " + s);
               }

               @Override
               public void onSuccess(String s) {
                   Log.d(TAG, "onSuccess " + s);
               }

               @Override
               public void onProgress(String s) {
                   Log.d(TAG, "onProgress " + s);
               }


               @Override
               public void onStart() {
                   Log.d(TAG, "onStart ");
               }

               @Override
               public void onFinish() {
                   Log.d(TAG, "onFinish ");

               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {
           e.printStackTrace();
           // do nothing for now
           Log.d(TAG, "FFmpegCommandAlreadyRunningException ");
       }
    }

    its give these error

                                                                                   libavutil      55. 17.103 / 55. 17.103
                                                                                   libavcodec     57. 24.102 / 57. 24.102
                                                                                   libavformat    57. 25.100 / 57. 25.100
                                                                                   libavdevice    57.  0.101 / 57.  0.101
                                                                                   libavfilter     6. 31.100 /  6. 31.100
                                                                                   libswscale      4.  0.100 /  4.  0.100
                                                                                   libswresample   2.  0.101 /  2.  0.101
                                                                                   libpostproc    54.  0.100 / 54.  0.100
                                                                                 Unrecognized option 'i /storage/emulated/0/Movies/mvd.avi -c:v libx264 -c:a aac -movflags faststart /storage/emulated/0/Photex/photexVideo/1491909522363.mp4'.
                                                                                 **Error splitting the argument list: Option not found**

    04-11 16:18:43.158 11529-11529/com.photex.urdu.textonphotos D/UploadVideoService : onFinish

    I am unable to understand how to solve this !

  • How to create a custom processor for audio files in Ruby on Rails(5) with Paperclip

    17 juillet 2017, par Thomas Roest

    So I’m trying to convert mp3 files into .flac with Paperclip custom processors and ffmpeg. The following code runs the ffmpeg command and creates a temporary flac file. However, it is not saved ? Currently only the original file is saved. What am I missing here ?

    class AudioFile &lt; ApplicationRecord
     has_attached_file :raw_audio, processors: [:custom], styles: { original: {}}

    the custom processor

    module Paperclip
    class Custom &lt; Processor

     def initialize(file, options = {}, attachment = nil)
       super
       @file = file
       @basename = File.basename(@file.path)
       @format = options[:format] || 'flac'
       @params = options[:params] || '-y -i'
     end

     def make
       source = @file
       output = Tempfile.new([@basename, ".#{@format}"])
       begin
         parameters = [@params, ':source',':dest'].join(' ')
         Paperclip.run('ffmpeg', parameters, :source => File.expand_path(source.path), :dest => File.expand_path(output.path), :sample_rate => @sample_rate, :bit_rate => @bit_rate)
       end
      output
     end

    end
    end