Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (104)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (7323)

  • VLC RTSP HTML5 transcoding

    30 mai 2022, par Pierogi

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

    


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

    


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

    


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

    


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


    


    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.

    


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


    


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

    


    and configure the "Stream output" like below,
enter image description here

    


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

    


    &#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;

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

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