Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (93)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

Sur d’autres sites (7376)

  • A cast to int has gone wrong. android

    24 février 2021, par Tanveerbyn

    im having an issue while video mixing with audio. everytime when I try to make it.
That always give me an error which is

    


    


    Java.lang.RuntimeException : A cast to int has gone wrong. Please contact the mp4parser discussion group.

    


    


    Im using googlecode mp4 parser : implementation  com.googlecode.mp4parser:isoparser:1.1.22 and also tried that but no success implementation 'org.mp4parser:isoparser:1.9.41'

    


    Also on forum there's no proper answer on that question.

    


    here's my code

    


     public Track CropAudio(String videopath, Track fullAudio) {
    try {

        IsoFile isoFile = new IsoFile(videopath);

        double lengthInSeconds = (double)
                isoFile.getMovieBox().getMovieHeaderBox().getDuration() /
                isoFile.getMovieBox().getMovieHeaderBox().getTimescale();


        Track audioTrack = (Track) fullAudio;


        double startTime1 = 0;
        double endTime1 = lengthInSeconds;


        long currentSample = 0;
        double currentTime = 0;
        double lastTime = -1;
        long startSample1 = -1;
        long endSample1 = -1;


        for (int i = 0; i < audioTrack.getSampleDurations().length; i++) {
            long delta = audioTrack.getSampleDurations()[i];


            if (currentTime > lastTime && currentTime <= startTime1) {
                // current sample is still before the new starttime
                startSample1 = currentSample;
            }
            if (currentTime > lastTime && currentTime <= endTime1) {
                // current sample is after the new start time and still before the new endtime
                endSample1 = currentSample;
            }

            lastTime = currentTime;
            currentTime += (double) delta / (double) audioTrack.getTrackMetaData().getTimescale();
            currentSample++;
        }

        CroppedTrack cropperAacTrack = new CroppedTrack(fullAudio, startSample1, endSample1);

        return cropperAacTrack;

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

    return fullAudio;
}


public Runnable runnable = new Runnable() {
    @Override
    public void run() {

        try {


            Movie m = MovieCreator.build(video);


            List nuTracks = new ArrayList<>();

            for (Track t : m.getTracks()) {
                if (!"soun".equals(t.getHandler())) {
                    nuTracks.add(t);
                }
            }

            Track nuAudio = new AACTrackImpl(new FileDataSourceImpl(audio));
            Track crop_track = CropAudio(video, nuAudio);
            nuTracks.add(crop_track);
            m.setTracks(nuTracks);


            Container mp4file = new DefaultMp4Builder().build(m);
            FileChannel fc = new FileOutputStream(new File(output)).getChannel();
            mp4file.writeContainer(fc);
            fc.close();

            try {
                Variables.closeProgressDialog();
            } catch (Exception e) {
                Log.d(Variables.tag, e.toString());
            } finally {
                Go_To_preview_Activity();
            }

        } catch (Exception e) {
            Variables.closeProgressDialog();
           // Toast.makeText(context, "Something went wrong"+ e.toString(), Toast.LENGTH_SHORT).show();
            //Go_To_preview_Activity();
            e.printStackTrace();
            Log.d(Variables.tag, e.toString());

        }

    }

};


    


  • using ffmpeg.exe and java to get images from video

    28 juin 2013, par user2190639

    I'm trying to make a java function that given in input a video it generates a sets of images by seconds, so far this is what I've got :

    public static void decodeAndCaptureFrames(String inputfilename, String outputfolder, int width, int height, double seconds) throws InputFormatException, EncoderException

    double duration = getVideoLenght(inputfilename) ;
    int index = 0 ;

       Runtime runtime = Runtime.getRuntime();
       for(double s = 0; s < duration; s+= seconds)
       {
           String outString = outputfolder + File.separator + index + ".png";
           String cmd = "ffmpeg.exe -i "+ inputfilename +" -f image2 -t 0.001 -ss "+ s +" -s "+ width +"x"+ height +" "+outString;

           try {
               Process p = runtime.exec(cmd);
               p.waitFor()
           } catch (IOException e) {
               System.out.println("problema nell'esecuzione del runtime.exec");
               e.printStackTrace();
           } catch (InterruptedException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }

           System.out.println(cmd);
           index++;
       }  
    }

    However the code is really slow and it only converts the first two images even if I get the print of the further images.
    Since I'm using this external exe, can somebody tell me if I'm doing something wrong with the runtime and the process ?
    thanks.

  • h264 error while decoding

    23 février 2015, par Ozan Emre Yapıcı

    I wanna get frames from my ip camera but same errors occured. I read some web page about that error but i couldnt solve the problem. I am using visual C++ 2010

    Code :

    cv::VideoCapture capture("rtsp://192.168.0.18:554/ucast/11");

     if (!capture.isOpened()) return 1;

     double width = capture.get(CV_CAP_PROP_FRAME_WIDTH);  
     double height = capture.get(CV_CAP_PROP_FRAME_HEIGHT);

     cv::namedWindow("showRTSP", CV_WINDOW_AUTOSIZE);

     while (true) {

       cv::Mat frame;
       if (!capture.read(frame)) break;
       cv::imshow("showRTSP", frame);
       if (cv::waitKey(30) == 27) break;
     }

    Errors : [h264 @ 00000000030afaa0] error while decoding MB 59 10

    thanks...