Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (62)

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

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (5124)

  • Frames grabbed from UDP H264 stream with ffmpeg are gray/distorded

    12 septembre 2019, par Clément Bourdarie

    I am grabbing frames from a udp h264 stream with Javacv’s FFMPEG on windows, and putting them into a JavaFX imageview. The problem is that most of the image isn’t received well (it is gray, distored...) :

    The JavaFX imageview result

    I used to have the same problem before and I made it work by using flush on the frame grabber after each frame, but I forgot to save my work and lost it, and this time the correction doesn’t work.

    Here’s the part where i configure/launch FFMPEG :

           final Java2DFrameConverter converter = new Java2DFrameConverter();

           // Show drone camera
           FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("udp://227.0.0.1:2200");

           grabber.setFrameRate(_frameRate);
           grabber.setFormat(_format);
           grabber.setVideoBitrate(25000000);
           grabber.setVideoOption("preset", "ultrafast");
           grabber.setNumBuffers(0);

           grabber.start();

           // Grab frames as long as the thread is running
           while(_running){
                  final Frame frame = grabber.grab();
                  if (frame != null) {
                      final BufferedImage bufferedImage = converter.convert(frame);
                      if (bufferedImage != null) {
                            _cameraView.setImage(SwingFXUtils.toFXImage(bufferedImage, null));
                      }
                   }
                   Thread.sleep( 1000 / _frameRate );// don't grab frames faster than they are provided
                   grabber.flush();
           }
           _grabber.close();

    _format is "h264" and _frameRate is 30.

    Also, the system is flooded with prints like these (I’m not sure they are related to the problem though) :

    [h264 @ 00000000869c0a80] Invalid NAL unit 4, skipping.
    [h264 @ 00000000869c0a80] Invalid NAL unit 4, skipping.
    [h264 @ 00000000869c0a80] Invalid NAL unit 4, skipping.
    [h264 @ 00000000869c0a80] Reference 6 >= 4
    [h264 @ 00000000869c0a80] error while decoding MB 115 14, bytestream 1979
    [h264 @ 00000000869c0a80] concealing 6414 DC, 6414 AC, 6414 MV errors in P frame
    [h264 @ 0000000078f81180] Invalid NAL unit 0, skipping.
    [h264 @ 0000000078f81180] Invalid NAL unit 0, skipping.
    [h264 @ 0000000078f81180] concealing 4811 DC, 4811 AC, 4811 MV errors in B frame

    I don’t understand why it doesn’t work anymore

  • ffmpeg concat of .ts files where issues in one file causes all audio/video after to be out of sync [closed]

    23 juillet, par The Shoe Shiner

    I'll start by saying I need a solution that can be automated in code, i.e. not one that requires me to manually select timestamps and trim files, and unfortuntely my media server (Jellyfin) only has access to ffmpeg, so I'm looking for an ffmpeg solution.

    


    I have a set of .ts files that were recorded from a live stream. The media server will immediately restart the recording if for some reason ffmpeg fails during the copy process. So I end up with multiple files that I can then concatenate. Most of the time this works fine.

    


    The current issue is that (as happens occasionally) one of these files, which is about 10 seconds long, has about 5 seconds of good data, and 5 seconds of what appears (in players) to be essentially nothing, video is still and no audio. The rest of the files, before and after, are are fine. The media server (which uses ffprobe) reports that the framerate for the problematic file is 15fps, however I suspect that this is a result of the gap causing bad math, because the first 5 seconds appear to be fine and running at 29.###fps, so maybe the missing data at the end is affecting the calculated framerate, but admittedly I don't know exactly what's happening under the hood.

    


    I need to concat these files, but after I run the concat, all video after that problematic 10s file is out of sync with the audio.

    


    I'm fine with gaps, pauses, missing audio, etc in that small portion of the final file, but what I need to avoid is having that single file cause all the remaining content to be out-of-sync or otherwise broken. So I think I need a way to "correct" that problematic file before the concat, and I need to do so in a way that does not require me to manually select timestamps, per my first comment.

    


    I have personally seen .ts have timestamp issues so my code already does a simple remux of all the ts files to mp4 prior to concat, and have also tried a remux of a final concatenated ts file, neither of which resolve this issue.

    


    Is there any other ffmpeg process I can run on the files, that might force ffmpeg to correct timestamps, which would allow me to concat successfully ? I'm not necessarily trying to recover data in the bad file, I'm just trying to ensure that I can concat a set of files and have the final file resemble what one would see when watching each file independently.

    


    Edit : More details about what I have tried (In addition to what was already mentioned).

    


      

    • During the remux I used the -shortest flag, assuming maybe the audio stream was a different length than the video.
    • 


    • Also tried the -reset_timestamps 1 flag in the remux.
    • 


    • The remux command looked like this : ffmpeg.exe -y -i "Invictus 2025_07_22_05_25_00_4_concat0.ts" -reset_timestamps 1 -vcodec copy -acodec copy -map 0:v -map 0:a -shortest "Invictus 2025_07_22_05_25_00_4_concat0.mp4"
    • 


    


  • need to loop and convert the files

    24 décembre 2020, par AUDICOM

    My script should work as follows :
Check whether or not there are DAV files in the folder, if there are NO elements for a 1 minute loop until the next check, and if there are any DAV files, it should trigger DAV to JPEG conversion and move JPEGs to the SNAPSHOT folder, and DAV for PROCESSED folder. Until it works, the problem is finishing the conversion to JPEG and moving the files to folders, it closes the script, and it goes back to the loop and waits for a new file, this is not happening.

    


    Another problem is also that the files are generated every 30 minutes in bulk, but they already appear in bulk and therefore end when the 30 minutes are over, or the problem is when the script ends or the script just moves to one. PROCESSED folder, and does not convert.

    


    Script :

    


    REM -  - Checks for New Files (*.DAV).

:LOOP01    
     IF EXIST "C:\Users\AudicomRede\Documents\SNAPSHOT FINAL\TESTE VERIFICAÇÃO\*.*" GOTO SKIP01


:LOOP02
     IF NOT EXIST "C:\Users\AudicomRede\Documents\SNAPSHOT FINAL\TESTE VERIFICAÇÃO" GOTO SKIP02

     REM - ALL THIS WILL BE DONE IF THE DAV FILE EXISTS
:
:
:SKIP01
    REM Crafty 1 minute delay...
       PING 1.1.1.1 -n 10 -w 6000 >NUL
           GOTO LOOP01
:
:
:SKIP02
    REM START CONVERT
       for %%A IN (*.dav) do (

            ffmpeg -i "%%A" -r 0.2 -bt 20M -s 480x300 "%%~nA"%%03d.jpg

                  Move "%%A" PROCESSED
                      Move "*.*" SNAPSHOT 
                          
)

 GOTO SKIP01


    


    I use FFMPEG to convert all files.