Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (94)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (7252)

  • ffmpeg progess bar not giving percent

    3 décembre 2014, par Brett

    Hi im trying to create a java program that shows the percent of a ffmpeg command , Im not sure where i am going wrong.

    Its keeps giving me these results

    run :
    Total duration : 857.44 seconds.
    Progress : 0.85%
    Progress : 1.76%
    Progress : 2.79%
    Progress : 3.93%
    Progress : 5.04%
    Progress : 6.21%
    Progress : 6000.27%
    Progress : 6001.29%
    Progress : 6002.46%
    Progress : 6003.58%
    Progress : 6004.59%
    Progress : 6005.70%
    Progress : 6006.77%
    Progress : 12000.86%
    Progress : 12001.97%
    Progress : 12002.97%
    Progress : 12004.03%
    Progress : 12005.15%
    Progress : 12006.27%
    Progress : 18000.34%
    Progress : 18001.46%
    Progress : 18002.29%
    Progress : 18003.41%
    Progress : 18004.41%
    Progress : 18005.50%
    Progress : 18006.55%
    Progress : 24000.52%
    Progress : 24001.62%
    Progress : 24002.74%
    Progress : 24003.69%
    Progress : 24004.76%
    Progress : 24005.88%
    Progress : 24006.94%
    Progress : 30001.01%
    Progress : 30002.16%
    Progress : 30003.24%
    Progress : 30004.25%
    Progress : 30005.37%
    Progress : 30006.44%
    Progress : 36000.56%
    Progress : 36001.60%
    Progress : 36002.69%
    Progress : 36003.73%
    Progress : 36004.81%
    Progress : 36005.93%
    Progress : 42000.05%
    Progress : 42001.18%
    Progress : 42002.30%
    Progress : 42003.41%
    Progress : 42004.50%
    Progress : 42005.60%
    Progress : 42006.72%
    Progress : 48000.84%
    Progress : 48001.96%
    Progress : 48003.08%
    Progress : 48004.18%
    Progress : 48005.09%
    Progress : 48006.16%
    Progress : 54000.22%
    Progress : 54001.15%
    Progress : 54002.20%
    Progress : 54003.30%
    Progress : 54004.42%
    Progress : 54005.49%
    Progress : 54006.38%
    Progress : 60000.45%
    Progress : 60001.57%
    Progress : 60002.55%
    Progress : 60003.64%
    Progress : 60004.66%
    Progress : 60005.62%
    Progress : 60006.72%
    Progress : 66000.67%
    Progress : 66001.73%
    Progress : 66002.75%
    Progress : 66003.61%
    Progress : 66004.71%
    Progress : 66005.82%
    Progress : 66006.81%
    Progress : 72000.67%
    Progress : 72001.73%
    Progress : 72002.80%
    Progress : 72003.87%
    Progress : 72004.81%
    Progress : 72005.71%
    Progress : 72006.69%
    Progress : 78000.73%
    Progress : 78001.82%
    Progress : 78002.91%
    Progress : 78003.91%
    Progress : 78004.98%
    Progress : 78005.88%
    Progress : 78006.49%
    Progress : 84000.37%
    Progress : 84001.12%
    Progress : 84002.04%
    BUILD SUCCESSFUL (total time : 49 seconds)

    But the file is created , i don’t know why im getting 0.00% any help would be awsome
    ..
    It also complains some imports a not being used here are the imports.

    here is my code

    import java.io.IOException;
    import java.util.Scanner;
    import static java.util.logging.Level.parse;
    import java.util.regex.Pattern;
    import javafx.util.Duration;
    import static javax.management.Query.lt;
    /**
    *
    * @author brett
    */

    public class MashMeUp {

       public static void main(String[] args) throws IOException {
           ProcessBuilder pb = new ProcessBuilder("ffmpeg", "-i", "C:\\Users\\brett\\Documents\\Telegraph_Road.mp4", "C:\\Users\\brett\\Documents\\out.mp4");

           // ProcessBuilder pb = new ProcessBuilder(args);  
           final Process p = pb.start();

       // create a new thread to get progress from ffmpeg command , override  
           // it's run method, and start it!  
           new Thread() {
               public void run() {

                   Scanner sc = new Scanner(p.getErrorStream());

                   // Find duration  
                   Pattern durPattern = Pattern.compile("(?<=Duration: )[^,]*");
                   String dur = sc.findWithinHorizon(durPattern, 0);
                   if (dur == null) {
                       throw new RuntimeException("Could not parse duration.");
                   }
                   String[] hms = dur.split(":");
                   double totalSecs = Integer.parseInt(hms[0]) * 3600
                           + Integer.parseInt(hms[1]) * 60
                           + Double.parseDouble(hms[2]);
                   System.out.println("Total duration: " + totalSecs + " seconds.");

                   // Find time as long as possible.  
                   Pattern timePattern = Pattern.compile("(?<=time=)[\\d:.]*");
                   // TODO make regex that works with ffmpeg static build  
                   String match;
                   String[] matchSplit;
    while (null != (match = sc.findWithinHorizon(timePattern, 0))) {
       matchSplit = match.split(":");
       double progress = Double.parseDouble(matchSplit[2]) / totalSecs +  Integer.parseInt(matchSplit[0]) * 3600 + Integer.parseInt(matchSplit[1]) * 60;
                       System.out.printf("Progress: %.2f%%%n", progress * 100);
                   }
               }
           }.start();
       }
    }
  • lavu/tx : implement aarch64 NEON SIMD FFT

    3 février 2022, par Lynne
    lavu/tx : implement aarch64 NEON SIMD FFT
    

    The fastest fast Fourier transform in not just the west, but the world,
    now for the most popular toy ISA.

    On a high level, it follows the design of the AVX2 version closely,
    with the exception that the input is slightly less permuted as we don't have
    to do lane switching with the input on double 4pt and 8pt.

    On a low level, the lack of subadd/addsub instructions REALLY penalizes
    any attempt at writing an FFT. That single register matters a lot,
    and reloading it simply takes unacceptably long.
    In x86 land, vendors would've noticed developers need this.
    In ARM land, you get a badly designed complex multiplication instruction
    we cannot use, that's not present on 95% of devices. Because only
    compilers matter, right ?

    Future optimization options are very few, perhaps better register
    management to use more ld1/st1s.

    All timings below are in cycles :
    A53 :
    Length | C | New (lavu) | Old (lavc) | FFTW


    |-------------|-------------|-------------|-----
    4 | 842 | 420 | 1210 | 1460
    8 | 1538 | 1020 | 1850 | 2520
    16 | 3717 | 1900 | 3700 | 3990
    32 | 9156 | 4070 | 8289 | 8860
    64 | 21160 | 9931 | 18600 | 19625
    128 | 49180 | 23278 | 41922 | 41922
    256 | 112073 | 53876 | 93202 | 101092
    512 | 252864 | 122884 | 205897 | 207868
    1024 | 560512 | 278322 | 458071 | 453053
    2048 | 1295402 | 775835 | 1038205 | 1020265
    4096 | 3281263 | 2021221 | 2409718 | 2577554
    8192 | 8577845 | 4780526 | 5673041 | 6802722

    Apple M1
    New - Total for len 512 reps 2097152 = 1.459141 s
    Old - Total for len 512 reps 2097152 = 2.251344 s
    FFTW - Total for len 512 reps 2097152 = 1.868429 s

    New - Total for len 1024 reps 4194304 = 6.490080 s
    Old - Total for len 1024 reps 4194304 = 9.604949 s
    FFTW - Total for len 1024 reps 4194304 = 7.889281 s

    New - Total for len 16384 reps 262144 = 10.374001 s
    Old - Total for len 16384 reps 262144 = 15.266713 s
    FFTW - Total for len 16384 reps 262144 = 12.341745 s

    New - Total for len 65536 reps 8192 = 1.769812 s
    Old - Total for len 65536 reps 8192 = 4.209413 s
    FFTW - Total for len 65536 reps 8192 = 3.012365 s

    New - Total for len 131072 reps 4096 = 1.942836 s
    Old - Segfaults
    FFTW - Total for len 131072 reps 4096 = 3.713713 s

    Thanks to wbs for some simplifications, assembler fixes and a review
    and to jannau for giving it a look.

    • [DH] libavutil/aarch64/Makefile
    • [DH] libavutil/aarch64/tx_float_init.c
    • [DH] libavutil/aarch64/tx_float_neon.S
    • [DH] libavutil/tx.c
    • [DH] libavutil/tx_priv.h
  • Desperately looking for a RTSP server that can stream from a live source (not from a file)

    7 janvier 2020, par Joseph Matan

    I need a RTSP-server that can listen on a configured port (8554 for example), and then, for example, if I run FFmpeg with :

    ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -intra -an -f rtsp -rtsp_transport tcp rtsp://192.168.1.10:8554/test

    Then the RTSP-server will RECORD the video, and to play it, I just need to run it with :

    ffplay -i rtsp://192.168.1.10:8554/test

    I need the RTSP-server to support TCP transport and H264 video encoder and OPUS audio encoder and stream from a live-video (not from a file) + the program should be unlicensed.

    • This server works great, but don’t support OPUS.

    • Live555 support H264 and OPUS, but only streams from files (VOD).

    • I’ve have found some other servers that can stream directly from /dev/video0, but it’s also not a good solution for me.

    • Wowza and Red5Pro does answer all the above requirements, except that they are licenced programs.

    Any suggestions for a RTSP-server that support all the above requirements ?


    EDIT :

    I’ve tried Gstreamer and it looks promising, but I still didn’t success.
    However, I’m quite sure I’m on the right way (perhaps I don’t know how to use yet the pipelines).

    1. I’ve built gst-rtsp-server, version 1.13.91.
    2. Then, I ran ./test-record "( decodebin name=depay0 ! videoconvert ! rtspsink )"
    3. I ran netstat -anp and I can see clearly, the server is listening on tcp port 8554.
    4. Now it’s time to stream to server. I’ve tried it once with Gstreamer and once with FFmpeg.

    Gstreamer

    gst-launch-1.0 videotestsrc ! x264enc ! rtspclientsink location=rtsp://127.0.0.1:8554/test

    FFmpeg

    ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -c:v libx264 -qp 10 -an -f rtsp -rtsp_transport tcp rtsp://127.0.0.1:8554/test

    In both cases, I can see the RTP packets in wireshark,
    and by calling again to netstat -anp, I see :

    tcp        0      0 0.0.0.0:8554            0.0.0.0:*               LISTEN      14386/test-record  
    tcp        0      0 127.0.0.1:8554          127.0.0.1:46754         ESTABLISHED 14386/test-record  
    tcp        0      0 127.0.0.1:46754         127.0.0.1:8554          ESTABLISHED 19479/ffmpeg  

    So I can surly understand that I’m streaming (or streaming something...). However, when I’m trying to play the video, I’m getting failure (I’ve tried to play with Gstreamer, FFplay and VLC - all fails...) :

    Gstreamer

    gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test latency=300 ! decodebin ! autovideoconvert ! autovideosink

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Progress: (open) Opening Stream
    Progress: (connect) Connecting to rtsp://127.0.0.1:8554/test
    Progress: (open) Retrieving server options
    Progress: (open) Retrieving media info
    ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not get/set settings from/on resource.
    Additional debug info:
    gstrtspsrc.c(7507): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
    Server can not provide an SDP.
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    FFplay

    ffplay -i rtsp://127.0.0.1:8554/test

    [rtsp @ 0x7fb140000b80] method DESCRIBE failed: 405 Method Not Allowed
    rtsp://127.0.0.1:8554/test: Server returned 4XX Client Error, but not one of 40{0,1,3,4}

    VLC

    vlc rtsp://127.0.0.1:8554/test

    VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b)
    [0000000000857f10] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    Qt: Session management error: None of the authentication protocols specified are supported
    [00007f9fdc000ea0] live555 demux error: Failed to connect with rtsp://127.0.0.1:8554/test
    [00007f9fdc001d10] satip stream error: Failed to setup RTSP session

    Any ideas what I’m doing wrong ?