Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (71)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (5940)

  • ServletOutputStream failed to flush :

    18 septembre 2024, par Dawid

    I try to convert m3u8 file to WebM using ffmpeg and stream it onto browser.
I want it to play on browser without using any javascript.
Stream video method :

    


     public void streamVideo(OutputStream os ){

       String url = "m3u8file.m3u8";


        byte[] bytes = new byte[BUFFER];
        int bytesRead = -1;

        ProcessBuilder pb = new ProcessBuilder(
                "ffmpeg",
                "-i", url,
                "-c:v", "libvpx-vp9",  
                "-b:v", "1M",           
                "-c:a", "libopus",      
                "-b:a", "128k",
                "-f", "webm",           
                "pipe:1"                
        );
        pb.redirectErrorStream(true);

        try {
                    Process process = pb.start();
            try (
                    InputStream is = process.getInputStream()){

                while((bytesRead = is.read(bytes)) != -1){
                    os.write(bytes, 0 , bytesRead);
                    os.flush();
                }


            }catch (IOException ex){
                ex.printStackTrace();
            }


        }catch (IOException ex){
            ex.printStackTrace();
        }



    }


}


    


    Web Controller

    


     &#xA; @Autowired&#xA;    private VideoService videoService;&#xA;&#xA;    @GetMapping("/stream")&#xA;    public ResponseEntity<streamingresponsebody> streamVideo(@RequestHeader(value = "Range", required = false) String rangeHeader) {&#xA;        HttpHeaders headers = new HttpHeaders();&#xA;&#xA;        headers.add("Content-Type", "video/webm");&#xA;        headers.add("Accept-Ranges", "bytes");&#xA;&#xA;        StreamingResponseBody responseStream  = os ->{&#xA;            videoService.streamVideo(os);&#xA;        };&#xA;        return new ResponseEntity&lt;>(responseStream, headers, HttpStatus.PARTIAL_CONTENT);&#xA;    }&#xA;</streamingresponsebody>

    &#xA;

    When I open the /stream I get an error on spring application

    &#xA;

    "ServletOutputStream failed to flush : java.io.IOException : An established connection was aborted by the software in your host machine"

    &#xA;

      &#xA;
    • On firefox in console I got 2 errors&#xA;Cant decode multimedia resource :&#xA;And Cant decode multimedia resource:Error Code : NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006)&#xA;And the window which video will be showing says "No video with supported format and MIME type found"

      &#xA;

    • &#xA;

    • On Chrome just nothing happens

      &#xA;

    • &#xA;

    • And on firefox when i open the view-source i see the stream information and then there is jibberish which i suppose are bytes from the video the. The jibberish stops when i got the ServletOutputStream failed to flush : in console in Spring

      &#xA;

    • &#xA;

    &#xA;

    Sorry if error codes translation is hard to understand

    &#xA;

  • Can't fix this ffmpeg, NoClassDefFoundError

    15 mars 2023, par noob234

    I am trying to get the video duration with this library import org.bytedeco.javacv.FFmpegFrameGrabber;

    &#xA;

    When I upload this mp4 video (https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4), I get this error message :&#xA;java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.ffmpeg.global.avutil

    &#xA;

    It will break when trying to get the 'grabber' :

    &#xA;

    private void videoInfo(MultipartFile file) {&#xA;    try (FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(file.getInputStream())) { // on this line it will break :(&#xA;        grabber.start();&#xA;        long durationMs = grabber.getLengthInTime();&#xA;    } catch (FrameGrabber.Exception e) {&#xA;        throw new RuntimeException(e);&#xA;    } catch (IOException e) {&#xA;        throw new RuntimeException(e);&#xA;    }&#xA;}&#xA;

    &#xA;

    This is my build.gradle :

    &#xA;

    plugins {&#xA;    id &#x27;java&#x27;&#xA;    id &#x27;org.springframework.boot&#x27; version &#x27;2.7.9&#x27;&#xA;    id &#x27;io.spring.dependency-management&#x27; version &#x27;1.0.15.RELEASE&#x27;&#xA;}&#xA;&#xA;group = &#x27;com.nob234&#x27;&#xA;version = &#x27;0.0.1-SNAPSHOT&#x27;&#xA;&#xA;configurations {&#xA;    compileOnly {&#xA;        extendsFrom annotationProcessor&#xA;    }&#xA;}&#xA;&#xA;repositories {&#xA;    mavenCentral()&#xA;}&#xA;&#xA;dependencies {&#xA;    implementation &#x27;org.springframework.boot:spring-boot-starter-web&#x27;&#xA;    compileOnly &#x27;org.projectlombok:lombok&#x27;&#xA;    annotationProcessor &#x27;org.projectlombok:lombok&#x27;&#xA;    testImplementation &#x27;org.springframework.boot:spring-boot-starter-test&#x27;&#xA;    implementation &#x27;org.springdoc:springdoc-openapi-ui:1.6.9&#x27;&#xA;    implementation &#x27;org.springframework.boot:spring-boot-starter-data-jpa&#x27;&#xA;    runtimeOnly &#x27;org.postgresql:postgresql&#x27;&#xA;    // for logging&#xA;    implementation &#x27;org.slf4j:slf4j-api:1.7.30&#x27;&#xA;    implementation &#x27;org.slf4j:jcl-over-slf4j:1.7.30&#x27;&#xA;    implementation &#x27;org.slf4j:log4j-over-slf4j:1.7.30&#x27;&#xA;    implementation &#x27;ch.qos.logback:logback-classic:1.2.3&#x27;&#xA;    implementation &#x27;org.bytedeco:javacv:1.5.8&#x27;&#xA;}&#xA;&#xA;tasks.named(&#x27;test&#x27;) {&#xA;    useJUnitPlatform()&#xA;}&#xA;

    &#xA;

    This is my ffmpeg version :

    &#xA;

    ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;libavutil      58.  2.100 / 58.  2.100&#xA;libavcodec     60.  3.100 / 60.  3.100&#xA;libavformat    60.  3.100 / 60.  3.100&#xA;libavdevice    60.  1.100 / 60.  1.100&#xA;libavfilter     9.  3.100 /  9.  3.100&#xA;libswscale      7.  1.100 /  7.  1.100&#xA;libswresample   4. 10.100 /  4. 10.100&#xA;libpostproc    57.  1.100 / 57.  1.100&#xA;

    &#xA;

    Please keep in mind that I use Java 8 in this project and I hope this issue is reproducible. If you want more info please leave a comment.

    &#xA;

  • Can't fix this ffmpeg, NoClassDefFoundError org.bytedeco.ffmpeg.global.avutil

    16 mars 2023, par noob234

    I am trying to get the video duration with this library import org.bytedeco.javacv.FFmpegFrameGrabber;

    &#xA;

    When I upload this mp4 video (https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4), I get this error message :&#xA;java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.ffmpeg.global.avutil

    &#xA;

    It will break when trying to get the 'grabber' :

    &#xA;

    private void videoInfo(MultipartFile file) {&#xA;    try (FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(file.getInputStream())) { // on this line it will break :(&#xA;        grabber.start();&#xA;        long durationMs = grabber.getLengthInTime();&#xA;    } catch (FrameGrabber.Exception e) {&#xA;        throw new RuntimeException(e);&#xA;    } catch (IOException e) {&#xA;        throw new RuntimeException(e);&#xA;    }&#xA;}&#xA;

    &#xA;

    This is my build.gradle :

    &#xA;

    plugins {&#xA;    id &#x27;java&#x27;&#xA;    id &#x27;org.springframework.boot&#x27; version &#x27;2.7.9&#x27;&#xA;    id &#x27;io.spring.dependency-management&#x27; version &#x27;1.0.15.RELEASE&#x27;&#xA;}&#xA;&#xA;group = &#x27;com.nob234&#x27;&#xA;version = &#x27;0.0.1-SNAPSHOT&#x27;&#xA;&#xA;configurations {&#xA;    compileOnly {&#xA;        extendsFrom annotationProcessor&#xA;    }&#xA;}&#xA;&#xA;repositories {&#xA;    mavenCentral()&#xA;}&#xA;&#xA;dependencies {&#xA;    implementation &#x27;org.springframework.boot:spring-boot-starter-web&#x27;&#xA;    compileOnly &#x27;org.projectlombok:lombok&#x27;&#xA;    annotationProcessor &#x27;org.projectlombok:lombok&#x27;&#xA;    testImplementation &#x27;org.springframework.boot:spring-boot-starter-test&#x27;&#xA;    implementation &#x27;org.springdoc:springdoc-openapi-ui:1.6.9&#x27;&#xA;    implementation &#x27;org.springframework.boot:spring-boot-starter-data-jpa&#x27;&#xA;    runtimeOnly &#x27;org.postgresql:postgresql&#x27;&#xA;    // for logging&#xA;    implementation &#x27;org.slf4j:slf4j-api:1.7.30&#x27;&#xA;    implementation &#x27;org.slf4j:jcl-over-slf4j:1.7.30&#x27;&#xA;    implementation &#x27;org.slf4j:log4j-over-slf4j:1.7.30&#x27;&#xA;    implementation &#x27;ch.qos.logback:logback-classic:1.2.3&#x27;&#xA;    implementation &#x27;org.bytedeco:javacv:1.5.8&#x27;&#xA;}&#xA;&#xA;tasks.named(&#x27;test&#x27;) {&#xA;    useJUnitPlatform()&#xA;}&#xA;

    &#xA;

    This is my ffmpeg version :

    &#xA;

    ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;libavutil      58.  2.100 / 58.  2.100&#xA;libavcodec     60.  3.100 / 60.  3.100&#xA;libavformat    60.  3.100 / 60.  3.100&#xA;libavdevice    60.  1.100 / 60.  1.100&#xA;libavfilter     9.  3.100 /  9.  3.100&#xA;libswscale      7.  1.100 /  7.  1.100&#xA;libswresample   4. 10.100 /  4. 10.100&#xA;libpostproc    57.  1.100 / 57.  1.100&#xA;

    &#xA;

    Please keep in mind that I use Java 8 in this project and I hope this issue is reproducible. If you want more info please leave a comment.

    &#xA;