Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (59)

  • 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 ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (6043)

  • Facing issue with mp4Parser

    20 novembre 2014, par Rohit

    I am trying to trim video with the help of mp4Parser. In output am getting trimmed video but just before video finishes it give error "Sorry cant Play this video". Video am making is H264.

       public static void main(String args) throws IOException {

       Movie movie = new MovieCreator()
               .build(new RandomAccessFileIsoBufferWrapperImpl(
                       new File(
                               "/sdcard/Videos11/"+args+".mp4")));

       List<track> tracks = movie.getTracks();
       Log.e("Tracks","Following are the Tracks:- "+tracks);
       movie.setTracks(new LinkedList<track>());
       // remove all tracks we will create new tracks from the old

       double startTime = 0.000;
       double endTime = 6.000;

       boolean timeCorrected = false;

       // Here we try to find a track that has sync samples. Since we can only
       // start decoding
       // at such a sample we SHOULD make sure that the start of the new
       // fragment is exactly
       // such a frame
       for (Track track : tracks) {
           if (track.getSyncSamples() != null
                   &amp;&amp; track.getSyncSamples().length > 0) {
               if (timeCorrected) {
                   // This exception here could be a false positive in case we
                   // have multiple tracks
                   // with sync samples at exactly the same positions. E.g. a
                   // single movie containing
                   // multiple qualities of the same video (Microsoft Smooth
                   // Streaming file)

                   throw new RuntimeException(
                           "The startTime has already been corrected by another track with SyncSample. Not Supported.");
               }
               startTime = correctTimeToNextSyncSample(track, startTime);
               endTime = correctTimeToNextSyncSample(track, endTime);
               timeCorrected = true;
           }
       }

       for (Track track : tracks) {
           long currentSample = 0;
           double currentTime = 0;
           long startSample = -1;
           long endSample = -1;

           for (int i = 0; i &lt; track.getDecodingTimeEntries().size(); i++) {
               TimeToSampleBox.Entry entry = track.getDecodingTimeEntries().get(i);
               for (int j = 0; j &lt; entry.getCount(); j++) {
                   // entry.getDelta() is the amount of time the current sample
                   // covers.

                   if (currentTime &lt;= startTime) {
                       // current sample is still before the new starttime
                       startSample = currentSample;
                   }
                   if (currentTime &lt;= endTime) {
                       // current sample is after the new start time and still
                       // before the new endtime
                       endSample = currentSample;
                   } else {
                       // current sample is after the end of the cropped video
                       break;
                   }
                   currentTime += (double) entry.getDelta()
                           / (double) track.getTrackMetaData().getTimescale();
                   currentSample++;
               }
           }
           movie.addTrack(new CroppedTrack(track, startSample, endSample));
       }

       IsoFile out = new DefaultMp4Builder().build(movie);

       String filePath = "sdcard/test"+i+".mp4";
       i++;
       File f = new File(filePath);
       FileOutputStream fos = new FileOutputStream(f);
       BufferedOutputStream bos = new BufferedOutputStream(fos, 65535);
       out.getBox(new IsoOutputStream(fos));
       bos.close();
       fos.flush();
       fos.close();

    }

    private static double correctTimeToNextSyncSample(Track track,
           double cutHere) {
       double[] timeOfSyncSamples = new double[track.getSyncSamples().length];
       long currentSample = 0;
       double currentTime = 0;
       for (int i = 0; i &lt; track.getDecodingTimeEntries().size(); i++) {
           TimeToSampleBox.Entry entry = track.getDecodingTimeEntries().get(i);
           for (int j = 0; j &lt; entry.getCount(); j++) {
               if (Arrays.binarySearch(track.getSyncSamples(),
                       currentSample + 1) >= 0) {
                   // samples always start with 1 but we start with zero
                   // therefore +1
                   timeOfSyncSamples[Arrays.binarySearch(
                           track.getSyncSamples(), currentSample + 1)] = currentTime;
               }
               currentTime += (double) entry.getDelta()
                       / (double) track.getTrackMetaData().getTimescale();
               currentSample++;
           }
       }
       for (double timeOfSyncSample : timeOfSyncSamples) {
           if (timeOfSyncSample > cutHere) {
               return timeOfSyncSample;
           }
       }
       return timeOfSyncSamples[timeOfSyncSamples.length - 1];
    }
    </track></track>

    Making video of 30 seconds and want to trim first 6 seconds. Working but in last(between 5 to 6 sec) it shows Cant play this video. Any help will be appreciated.

  • building ffmpeg 2.1.8 with MSVC2013 (configure produces errors)

    29 juin 2017, par scaram

    I am trying to build ffmpeg 2.1.8 for a legacy project. I use windows 10, MSVC 2013, MSYS, YASM and this tutorial.

    After

    ./configure --toolchain=msvc --enable-shared

    I see the many errors in config.log, here the first three ones

    1. error : ’test’ declared as an array with a negative size
    2. fatal error C1189 : #error : "unsatisfied condition : defined GLIBC"
    3. fatal error C1083 : File (Include) cannot be opened : "newlib.h" : No such file or directory

    here the more detailed information...

    C:/Users/scaram/AppData/Local/Temp/ffconf.LgAWDJFi.o_preprocessed.c:8859:27: error: 'test' declared as an array with a negative size
    ffconf.LgAWDJFi.o_converted.c
    C:/Users/scaram/AppData/Local/Temp/ffconf.RncapARb.c(1) : error C2118: Negativer Index
    check_cpp_condition features.h defined __UCLIBC__
    check_cpp
    BEGIN /tmp/ffconf.RncapARb.c
       1   #include
       2   #if !(defined __UCLIBC__)
       3   #error "unsatisfied condition: defined __UCLIBC__"
       4   #endif
    END /tmp/ffconf.RncapARb.c
    c99wrap cl -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -nologo -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64 -P -Fi /tmp/ffconf.LgAWDJFi.o /tmp/ffconf.RncapARb.c
    ffconf.RncapARb.c
    C:/Users/scaram/AppData/Local/Temp/ffconf.RncapARb.c(3) : fatal error C1189: #error :  "unsatisfied condition: defined __UCLIBC__"
    check_cpp_condition features.h defined __GLIBC__
    check_cpp
    BEGIN /tmp/ffconf.RncapARb.c
       1   #include
       2   #if !(defined __GLIBC__)
       3   #error "unsatisfied condition: defined __GLIBC__"
       4   #endif
    END /tmp/ffconf.RncapARb.c
    c99wrap cl -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -nologo -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64 -P -Fi /tmp/ffconf.LgAWDJFi.o /tmp/ffconf.RncapARb.c
    ffconf.RncapARb.c
    C:/Users/scaram/AppData/Local/Temp/ffconf.RncapARb.c(3) : fatal error C1189: #error :  "unsatisfied condition: defined __GLIBC__"
    check_cpp_condition newlib.h defined _NEWLIB_VERSION
    check_cpp
    BEGIN /tmp/ffconf.RncapARb.c
       1   #include
       2   #if !(defined _NEWLIB_VERSION)
       3   #error "unsatisfied condition: defined _NEWLIB_VERSION"
       4   #endif
    END /tmp/ffconf.RncapARb.c
    c99wrap cl -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -nologo -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64 -P -Fi /tmp/ffconf.LgAWDJFi.o /tmp/ffconf.RncapARb.c
    ffconf.RncapARb.c
    C:/Users/scaram/AppData/Local/Temp/ffconf.RncapARb.c(1) : fatal error C1083: File (Include) cannot be opened: "newlib.h": No such file or directory
    check_header _mingw.h
    check_cpp
    BEGIN /tmp/ffconf.RncapARb.c
       1   #include &lt;_mingw.h>
       2   int x;
    END /tmp/ffconf.RncapARb.c

    What can I do to make it work ?

  • VLC RTSP HTML5 transcoding

    30 mai 2022, par Pierogi

    I'm trying to get audio streaming on an HTML page from an RTSP server.

    &#xA;

    The RTSP server is the rtsp-simple-server running a command line below.
    &#xA;./rtsp-simple-server rtsp-simple-server.yml.
    &#xA;The configure file is the default.

    &#xA;

    The stream player is FFmpeg running a command line below.
    &#xA;ffmpeg -re -stream_loop -1 -i myaudio.mp3 -c copy -f rtsp -rtsp_transport tcp rtsp://localhost:8554/mystream

    &#xA;

    The console log at the time the rtsp-simple-server and the ffmpeg are started is below.

    &#xA;

    2022/05/29 19:06:38 INF rtsp-simple-server v0.18.4&#xA;2022/05/29 19:06:38 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)&#xA;2022/05/29 19:06:38 INF [RTMP] listener opened on :1935&#xA;2022/05/29 19:06:38 INF [HLS] listener opened on :8888&#xA;2022/05/29 19:09:16 INF [RTSP] [conn [::1]:62737] opened&#xA;2022/05/29 19:09:16 INF [RTSP] [session 271690815] created by [::1]:62737&#xA;2022/05/29 19:09:16 INF [RTSP] [session 271690815] is publishing to path &#x27;mystream&#x27;, 1 track with TCP&#xA;

    &#xA;

    And the time the rtsp path(rtsp ://localhost:8554/mystream) is opened by VLC, the contents can be played properly. The additional console log at the time is below.

    &#xA;

    2022/05/29 19:13:19 INF [RTSP] [conn 127.0.0.1:62780] opened&#xA;2022/05/29 19:13:19 INF [RTSP] [session 734209460] created by 127.0.0.1:62780&#xA;2022/05/29 19:13:19 INF [RTSP] [session 734209460] is reading from path &#x27;mystream&#x27;, 1 track with UDP&#xA;2022/05/29 19:13:29 INF [RTSP] [session 734209460] destroyed (teared down by 127.0.0.1:62780)&#xA;2022/05/29 19:13:29 INF [RTSP] [conn 127.0.0.1:62780] closed (EOF)&#xA;2022/05/29 19:13:29 INF [RTSP] [conn 127.0.0.1:62781] opened&#xA;2022/05/29 19:13:29 INF [RTSP] [session 445756113] created by 127.0.0.1:62781&#xA;2022/05/29 19:13:29 INF [RTSP] [session 445756113] is reading from path &#x27;mystream&#x27;, 1 track with TCP&#xA;

    &#xA;

    However, I open the rtsp streaming from the VLC's "Network" tab like below,&#xA;enter image description here

    &#xA;

    and configure the "Stream output" like below,&#xA;enter image description here

    &#xA;

    and I tried to get this streaming from an HTML page like below,

    &#xA;

    &#xA;&#xA;  &#xA;    &#xA;    &#xA;  &#xA;  &#xA;    <h1>transcode test</h1>&#xA;    <audio src="http://localhost:9999/mystream" autoplay="autoplay"></audio>&#xA;  &#xA;&#xA;

    &#xA;

    the browser console displays Failed to load resource: the server responded with a status of 404 (Not found). I've already tried other ports(etc. 8080).

    &#xA;

    So, how can I get the rtsp stream from the RTSP server on an HTML page.&#xA;Any idea ?

    &#xA;

    My environment.

    &#xA;

      &#xA;
    • Browser : Microsoft edge
    • &#xA;

    • OS : MacOS 11.6.5
    • &#xA;

    • rtsp-simple-server : 0.18.4
    • &#xA;

    • FFmpeg : 5.0.1
    • &#xA;

    • VLC : 3.0.17.3
    • &#xA;

    &#xA;