
Recherche avancée
Autres articles (71)
-
Le profil des utilisateurs
12 avril 2011, parChaque 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, parAccé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, parDixit 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 DawidI 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



 @Autowired
 private VideoService videoService;

 @GetMapping("/stream")
 public ResponseEntity<streamingresponsebody> streamVideo(@RequestHeader(value = "Range", required = false) String rangeHeader) {
 HttpHeaders headers = new HttpHeaders();

 headers.add("Content-Type", "video/webm");
 headers.add("Accept-Ranges", "bytes");

 StreamingResponseBody responseStream = os ->{
 videoService.streamVideo(os);
 };
 return new ResponseEntity<>(responseStream, headers, HttpStatus.PARTIAL_CONTENT);
 }
</streamingresponsebody>


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


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


- 

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


-
On Chrome just nothing happens


-
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










Sorry if error codes translation is hard to understand


-
-
Can't fix this ffmpeg, NoClassDefFoundError
15 mars 2023, par noob234I am trying to get the video duration with this library
import org.bytedeco.javacv.FFmpegFrameGrabber;


When I upload this mp4 video (https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4), I get this error message :

java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.ffmpeg.global.avutil


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


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



This is my build.gradle :


plugins {
 id 'java'
 id 'org.springframework.boot' version '2.7.9'
 id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}

group = 'com.nob234'
version = '0.0.1-SNAPSHOT'

configurations {
 compileOnly {
 extendsFrom annotationProcessor
 }
}

repositories {
 mavenCentral()
}

dependencies {
 implementation 'org.springframework.boot:spring-boot-starter-web'
 compileOnly 'org.projectlombok:lombok'
 annotationProcessor 'org.projectlombok:lombok'
 testImplementation 'org.springframework.boot:spring-boot-starter-test'
 implementation 'org.springdoc:springdoc-openapi-ui:1.6.9'
 implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
 runtimeOnly 'org.postgresql:postgresql'
 // for logging
 implementation 'org.slf4j:slf4j-api:1.7.30'
 implementation 'org.slf4j:jcl-over-slf4j:1.7.30'
 implementation 'org.slf4j:log4j-over-slf4j:1.7.30'
 implementation 'ch.qos.logback:logback-classic:1.2.3'
 implementation 'org.bytedeco:javacv:1.5.8'
}

tasks.named('test') {
 useJUnitPlatform()
}



This is my ffmpeg version :


ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
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
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100



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.


-
Can't fix this ffmpeg, NoClassDefFoundError org.bytedeco.ffmpeg.global.avutil
16 mars 2023, par noob234I am trying to get the video duration with this library
import org.bytedeco.javacv.FFmpegFrameGrabber;


When I upload this mp4 video (https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4), I get this error message :

java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.ffmpeg.global.avutil


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


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



This is my build.gradle :


plugins {
 id 'java'
 id 'org.springframework.boot' version '2.7.9'
 id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}

group = 'com.nob234'
version = '0.0.1-SNAPSHOT'

configurations {
 compileOnly {
 extendsFrom annotationProcessor
 }
}

repositories {
 mavenCentral()
}

dependencies {
 implementation 'org.springframework.boot:spring-boot-starter-web'
 compileOnly 'org.projectlombok:lombok'
 annotationProcessor 'org.projectlombok:lombok'
 testImplementation 'org.springframework.boot:spring-boot-starter-test'
 implementation 'org.springdoc:springdoc-openapi-ui:1.6.9'
 implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
 runtimeOnly 'org.postgresql:postgresql'
 // for logging
 implementation 'org.slf4j:slf4j-api:1.7.30'
 implementation 'org.slf4j:jcl-over-slf4j:1.7.30'
 implementation 'org.slf4j:log4j-over-slf4j:1.7.30'
 implementation 'ch.qos.logback:logback-classic:1.2.3'
 implementation 'org.bytedeco:javacv:1.5.8'
}

tasks.named('test') {
 useJUnitPlatform()
}



This is my ffmpeg version :


ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
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
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100



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.