Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

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

Autres articles (59)

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

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

Sur d’autres sites (6102)

  • Revision 34501 : Premier jet de la categorie statistique

    16 janvier 2010, par eric@… — Log

    Premier jet de la categorie statistique

  • Revision 31957 : légère amélioration ... Un peu de documentation dans le code également

    7 octobre 2009, par kent1@… — Log

    légère amélioration ...
    Un peu de documentation dans le code également

  • Stream h264 to javafx possibly using javacv/ffmpeg

    4 octobre 2018, par cagney

    I’m really stuck on getting a video stream to play on a java fx project.

    — Short version :

    I’m streaming h264/avcc flavor video from an android phone to a desktop computer. However javafx doesn’t have an easy solution for displaying stream. I’m attempting to use javacv / ffmpeg in an attempt to make this work. However I am getting errors from ffmpeg.

    1) Is there a better way to display streaming video on javafx ?

    2) Do you have a sample project or good tutorial for javacv ffmpegframegrabber ?

    3) I think I may be missing some small detail in mycode but Im not sure what i would be.

    — Longer Version :

    1) On the android end Im getting video using mediarecorder. In order to get the sps/pps info I record and save a small movie to the device and then parse the sps and pps data.

    2) Next, on the android, I split up the nalus to meet MTU req and send them over a udp connection to my desktop

    3)On my desktop I reassmble the nalus( or trash them if they loose data) and feed those to an input stream that I gave to the framegreabber constructor.

    — The Code and Logs :

    The errors are long and numerous depending on the flavor I feed it. Here are two separate examples which are usually repeated at great length

    [h264 @ 0000020225907a40] non-existing PPS 0 referenced
    [h264 @ 0000020225907a40] decode_slice_header error
    [h264 @ 0000020225907a40] no frame!

    [h264 @ 00000163d8637a40] illegal aspect ratio
    [h264 @ 00000163d8637a40] pps_id 3412 out of range
    [AVBSFContext @ 00000163e28a0e00] Invalid NAL unit 0, skipping.

     !! One big caveat that I am aware off is that I have not implemented timestamps
    which I created on the android device when feeding ffmpeg. I think it should still show distorted images without this though

    Because I have spent all day guessing and trying I have several "flavors" of data I have shoved through. I am only showing the first section of each nal which I believe if correct would at least show a garbage image as long as my sps and pps are right

    sps: 67 80 80 1E E9 01 68 22 FD C0 36 85 09 A8
    pps: 68 06 06 E2

    Below is annex B style.
    These were each prefixed with either 00 00 01 and 00 00 00 01

    Debug transfer 65 B8 40 0B E5 B8 7B 80 5B 85
    Debug transfer 41 E2 20 7A 74 34 3B D6 BE FA
    Debug transfer 41 E4 40 2F 01 E0 0C 06 EE 91
    Debug transfer 41 E6 60 3E A1 20 5A 02 3C 6D
    Debug transfer 41 E8 80 13 B0 B9 82 C3 03 F4
    Debug transfer 41 EC C0 1B A3 0C 28 F1 B0 C8
    Debug transfer 41 EE E0 1F CE 07 30 EE 05 06
    Debug transfer 41 F1 00 08 ED 80 9C 20 09 73
    Debug transfer 41 F3 20 09 E9 00 86 60 21 C3
    VideoDecoderaddPacket type: 24
    Debug transfer 67 80 80 1E E9 01 68 22 FD C0
    Debug transfer 68 06 06 E2
    Debug transfer 65 B8 20 00 9F 80 78 00 12 8A
    Debug transfer 41 E2 20 09 F0 1E 40 7B 0C E0
    Debug transfer 41 E4 40 09 F0 29 30 D6 00 AE
    Debug transfer 41 E6 60 09 F1 48 31 80 99 40
    [h264 @ 000001c771617a40] non-existing PPS 0 referenced

    Here I tried Avcc style. You can see the first line is the combination of the sps pps followed by idr and then repeated non idr

    Debug transfer 18 00 0E 67 80 80 1E E9 01 68
    Debug transfer 00 02 4A 8F 65 B8 20 00 9F C5
    Debug transfer 00 02 2F DA 41 E2 20 09 E8 0F
    Debug transfer 00 02 2C 34 41 E4 40 09 F4 20
    Debug transfer 00 02 4D 92 41 E6 60 09 FC 2B
    Debug transfer 00 02 47 02 41 E8 80 09 F0 72
    Debug transfer 00 02 52 50 41 EA A0 09 EC 0F
    Debug transfer 00 02 58 8A 41 EC C0 09 FC 6F
    Debug transfer 00 02 55 F9 41 EE E0 09 FC 6E
    Debug transfer 00 02 4D 79 41 F1 00 09 F0 3E
    Debug transfer 00 02 4D B6 41 F3 20 09 E8 64

    The following class is where I try to get javacv/ffmpeg to show the video. I dont think its an ideal solution and am researching canvasfram as a replacement to the image view.

       public class ImageDecoder {

       private final static String TAG = "ImageDecoder ";

       private ImageDecoder(){

       }


       public static void streamImageToImageView(
               final ImageView view,
               final InputStream inputStream,
               final String format,
               final int frameRate,
               final int bitrate,
               final String preset,
               final int numBuffers
       )
       {
           System.out.println("Image Decoder Starting...");


           try(    final FrameGrabber grabber = new
       FFmpegFrameGrabber(inputStream))
           {

               final Java2DFrameConverter converter = new Java2DFrameConverter();

               grabber.setFrameNumber(frameRate);
               grabber.setFormat(format);
               grabber.setVideoBitrate(bitrate);
               grabber.setVideoOption("preset", preset);
               grabber.setNumBuffers(numBuffers);

               System.out.println("Image Decoder waiting on grabber.start...");
               grabber.start();   //---- this call is blocking the loop

               System.out.println("Image Decoder Looping---------------------------
      -------- hit stop");
               while(!Thread.interrupted()){
                   //System.out.println("Image Decoder Looping");
                   final Frame frame = grabber.grab();
                   if (frame != null){
                       final BufferedImage bufferedImage =
       converter.convert(frame);
                       if (bufferedImage != null){

                           Platform.runLater(() ->
       view.setImage(SwingFXUtils.toFXImage(bufferedImage, null)));
                       }else{
                           System.out.println("no buf im");
                       }
                   }else{
                       System.out.println("no fr");
                       Thread.currentThread().interrupt();
                   }

               }



           }catch (Exception e){
               System.out.print(TAG + e);
           }


       }






       }

    Any help is greatly appreciated.