Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (56)

  • 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 ) (...)

  • 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

Sur d’autres sites (8934)

  • Evolution #3587 : Intégrer le plugin upload HTML5 dans SPIP

    26 août 2017, par b b

    En lien avec #3582 mais j’hésite à attacher le ticket ci-présent au ticket roadmap. À noter qu’il existe aussi le super plugin bigup présenté par marcimat lors de la dernière party à Toulouse cf https://gitlab.com/magraine/bigup

  • Overthinking My Search Engine Problem

    31 décembre 2013, par Multimedia Mike — General

    I wrote a search engine for my Game Music Appreciation website, because the site would have been significantly less valuable without it (and I would eventually realize that the search feature is probably the most valuable part of this endeavor). I came up with a search solution that was a bit sketchy, but worked… until it didn’t. I thought of a fix but still searched for more robust and modern solutions (where ‘modern’ is defined as something that doesn’t require compiling a C program into a static CGI script and hoping that it works on a server I can’t debug on).

    Finally, I realized that I was overthinking the problem– did you know that a bunch of relational database management systems (RDBMSs) support full text search (FTS) ? Okay, maybe you did, but I didn’t know this.

    Problem Statement
    My goal is to enable users to search the metadata (title, composer, copyright, other tags) attached to various games. To do this, I want to index a series of contrived documents that describe the metadata. 2 examples of these contrived documents, interesting because both of these games have very different titles depending on region, something the search engine needs to account for :

    system : Nintendo NES
    game : Snoopy’s Silly Sports Spectacular
    author : None ; copyright : 1988 Kemco ; dumped by : None
    additional tags : Donald Duck.nsf Donald Duck
    

    system : Super Nintendo
    game : Arcana
    author : Jun Ishikawa, Hirokazu Ando ; copyright : 1992 HAL Laboratory ; dumped by : Datschge
    additional tags : card.rsn.gamemusic Card Master Cardmaster

    The index needs to map these documents to various pieces of game music and the search solution needs to efficiently search these documents and find the various game music entries that match a user’s request.

    Now that I’ve been looking at it for long enough, I’m able to express the problem surprisingly succinctly. If I had understood that much originally, this probably would have been simpler.

    First Solution & Breakage
    My original solution was based on SWISH-E. The CGI script was a C program that statically linked the SWISH-E library into a binary that miraculously ran on my web provider. At least, it ran until it decided to stop working a month ago when I added a new feature unrelated to search. It was a very bizarre problem, the details of which would probably bore you to tears. But if you care, the details are all there in the Stack Overflow question I asked on the matter.

    While no one could think of a direct answer to the problem, I eventually thought of a roundabout fix. The problem seemed to pertain to the static linking. Since I couldn’t count on the relevant SWISH-E library to be on my host’s system, I uploaded the shared library to the same directory as the CGI script and used dlopen()/dlsym() to fetch the functions I needed. It worked again, but I didn’t know for how long.

    Searching For A Hosted Solution
    I know that anything is possible in this day and age ; while my web host is fairly limited, there are lots of solutions for things like this and you can deploy any technology you want, and for reasonable prices. I figured that there must be a hosted solution out there.

    I have long wanted a compelling reason to really dive into Amazon Web Services (AWS) and this sounded like a good opportunity. After all, my script works well enough ; if I could just find a simple Linux box out there where I could install the SWISH-E library and compile the CGI script, I should be good to go. AWS has a free tier and I started investigating this approach. But it seems like a rabbit hole with a lot of moving pieces necessary for such a simple task.

    I had heard that AWS had something in this area. Sure enough, it’s called CloudSearch. However, I’m somewhat discouraged by the fact that it would cost me around $75 per month to run the smallest type of search instance which is at the core of the service.

    Finally, I came to another platform called Heroku. It’s supposed to be super-scalable while having a free tier for hobbyists. I started investigating FTS on Heroku and found this article which recommends using the FTS capabilities of their standard hosted PostgreSQL solution. However, the free tier of Postgres hosting only allows for 10,000 rows of data. Right now, my database has about 5400 rows. I expect it to easily overflow the 10,000 limit as soon as I incorporate the C64 SID music corpus.

    However, this Postgres approach planted a seed.

    RDBMS Revelation
    I have 2 RDBMSs available on my hosting plan– MySQL and SQLite (the former is a separate service while SQLite is built into PHP). I quickly learned that both have FTS capabilities. Since I like using SQLite so much, I elected to leverage its FTS functionality. And it’s just this simple :

    CREATE VIRTUAL TABLE gamemusic_metadata_fts USING fts3
    ( content TEXT, game_id INT, title TEXT ) ;
    

    SELECT id, title FROM gamemusic_metadata_fts WHERE content MATCH "arcana" ;
    479|Arcana

    The ‘content’ column gets the metadata pseudo-documents. The SQL gets wrapped up in a little PHP so that it queries this small database and turns the result into JSON. The script is then ready as a drop-in replacement for the previous script.

  • FFMPEG filter is not implementing

    31 août 2017, par Alok Kumar Verma

    I’m using FFMPEG for applying and saving the file to the specified path. Since I’m new to FFMPEG so I’ve followed this link to import the FFMPEG libraries inside my project.

    FFMPEG libraries are working fine inside my project. Now I’ve followed FFMPEG Commands link for applying filters using commands. For now i’m using vintage filter command to check whether it is working or not

    I’ve followed FFMPEG Project in Android link to apply the filters and save it to my storage path.

    I’m using a file from my storage path to apply filter for the same and saving them inside the specified path. The problem is that the command is implementing(doubtful) but no file is getting saved with the filters, nor I get any exception or any error in my logcat. I"m very doubtful whether what is being left to get the desired result.

    This is my code where I’m using the FFMPEG for applying filters and saving them in the specified path.

    FilterAcitivity.java

    public class FilterActivity extends AppCompatActivity {

    private ArrayList<string> videoReceiveddata = null;

    private EPlayerView ePlayerView;

    private StringBuilder stringBuilder;

    private DataSource.Factory dataSourceFactory;
    private ExtractorsFactory extractorsFactory;

    private Button play,stop,noneFilter,faded,noir,instant;

    private FFmpeg fFmpeg;

    private int choice = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_filter);

       Bundle videoExtras = getIntent().getExtras();

       videoReceiveddata = videoExtras.getStringArrayList("sendData");
       Log.e("RECEIVED_VIDEO====", videoReceiveddata.toString());

       stringBuilder = new StringBuilder();
       for(String path : videoReceiveddata){
           stringBuilder.append(path);
       }

       //laoding the ffmpeg binary files
       loadFFMEPGBinary();


       BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
       TrackSelection.Factory videoTrackSelectionFactory =
               new AdaptiveTrackSelection.Factory(bandwidthMeter);
       TrackSelector trackSelector =
               new DefaultTrackSelector(videoTrackSelectionFactory);
       // Measures bandwidth during playback. Can be null if not required.
       DefaultBandwidthMeter defaultBandwidthMeter = new DefaultBandwidthMeter();
       // Produces DataSource instances through which media data is loaded.
       dataSourceFactory = new DefaultDataSourceFactory(getApplicationContext(),
               Util.getUserAgent(getApplicationContext(), "TestApp"), defaultBandwidthMeter);
       // Produces Extractor instances for parsing the media data.
       extractorsFactory = new DefaultExtractorsFactory();
       // This is the MediaSource representing the media to be played.
       MediaSource videoSource = new ExtractorMediaSource(Uri.parse(stringBuilder.toString()),
               dataSourceFactory, extractorsFactory, null, null);


       // 2. Create the player
       final SimpleExoPlayer player =
               ExoPlayerFactory.newSimpleInstance(getApplicationContext(), trackSelector);
       player.prepare(videoSource);

       ePlayerView = (EPlayerView) findViewById(R.id.ePlayer);
       ePlayerView.setSimpleExoPlayer(player);
       ePlayerView.onResume();



       play = (Button) findViewById(R.id.playButton);
       stop = (Button) findViewById(R.id.stopButton);
       faded = (Button) findViewById(R.id.fadedFilter);
       noneFilter = (Button) findViewById(R.id.noFilter);
       noir = (Button) findViewById(R.id.noirFilter);
       instant = (Button) findViewById(R.id.instantFilter);

       play.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View view) {
               MediaSource videoSource = new ExtractorMediaSource(Uri.parse(stringBuilder.toString()),
                       dataSourceFactory, extractorsFactory, null, null);
               player.prepare(videoSource);
               player.setPlayWhenReady(true);
           }
       });

       stop.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View view) {
               player.stop();
           }
       });

       noneFilter.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View view) {
               choice = 1;
               ePlayerView.setGlFilter(new GlFilter());
           }
       });

       faded.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View view) {
               choice = 2;
               ePlayerView.setGlFilter(new GlSepiaFilter());
               Log.e("Filter Applied",ePlayerView.toString());
               Log.e("Filter Applied====",stringBuilder.toString());

           }
       });
    }

    //loading binary of ffmpeg
    private void loadFFMEPGBinary() {
       try {
           if (fFmpeg == null) {
               Log.e("TEST=====", "ffmpeg : null");
               fFmpeg = FFmpeg.getInstance(this);
           }

           fFmpeg.loadBinary(new LoadBinaryResponseHandler() {
               @Override
               public void onFailure() {
                   showUnsupportedExceptionDialog();
               }

               @Override
               public void onSuccess() {
                   Log.d("TESTAPP====", "ffmpef : coorect loaded");
               }
           });
       } catch (FFmpegNotSupportedException e) {
           showUnsupportedExceptionDialog();
       } catch (Exception e) {
           Log.d("TESTAPP=====", "Exception not supported" + e);
       }
    }

    private void showUnsupportedExceptionDialog() {
       new AlertDialog.Builder(FilterActivity.this)
               .setIcon(android.R.drawable.ic_dialog_alert)
               .setTitle("Not Supported")
               .setMessage("Device Not Supported")
               .setCancelable(false)
               .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                   @Override
                   public void onClick(DialogInterface dialog, int which) {
                       FilterActivity.this.finish();
                   }
               })
               .create()
               .show();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
       MenuInflater menuInflater = getMenuInflater();
       menuInflater.inflate(R.menu.filter_menu,menu);
       return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

       switch (item.getItemId()) {
           case R.id.save:
               if(choice == 1){
                   addThatFilter();
               }else if(choice == 2){
                   Toast.makeText(getApplicationContext(),"No filter",
                           Toast.LENGTH_SHORT).show();
               }
           default:
               return super.onOptionsItemSelected(item);
       }
    }

    private void addThatFilter() {

       String savingPath = Environment.getExternalStorageDirectory().getAbsolutePath().toString()
               + "/FilterVideo.mp4";

       String complexCommand = "ffmpeg -y -i"+ stringBuilder.toString() +"-strict experimental -vf " +
               "curves=vintage -s 640x480 -r 30 -aspect 4:3 -ab 48000 -ac 2 -ar 22050 -b 2097k -vcodec " +
               savingPath;

       execFFMPEGBinary(complexCommand);
    }

    private void execFFMPEGBinary( final String complexCommand) {

       try{

           fFmpeg.execute(new String[]{complexCommand}, new ExecuteBinaryResponseHandler(){

               @Override
               public void onFailure(String message) {
                   Log.e("Failed with output", message);
               }

               @Override
               public void onSuccess(String message) {
                   Toast.makeText(getApplicationContext(),"Success!",Toast.LENGTH_SHORT)
                           .show();
               }
           });
       }catch (FFmpegCommandAlreadyRunningException e){
           //do nothing
       }
    } }
    </string>