
Recherche avancée
Autres articles (56)
-
À propos des documents
21 juin 2013, parQue faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
Document bloqué en file d’attente ?
Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...) -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site
Sur d’autres sites (7165)
-
ffmpeg conditional copy or encode audio stream
31 octobre 2017, par PieterVMy objective is to DirectPlay all my content in Plex.
To do this, I have to conditionally re-encode some audio and video streams, to a format that can be played without the server having to transcode on the fly.I am currently using HanbrakeCLI to encode video to x264 and audio to a compatible format.
I use the "—aencoder copy —audio-fallback ac3" options, to copy the audio stream as is if in a supported format, i.e. aac/ac3/eac3/truehd/dts/dtshd/mp3/flac, or to encode to ac3 if not a supported format.
I want to switch away from HandbrakeCLI because it does not support copying video streams, sometimes my media has a good video stream, but the audio needs to be encoded only, e.g. WMV with a VC1 video and WMAPro audio stream.
A commandline for HandbrakeCLI looks like :
// Create the HandbrakeCLI commandline and execute
// https://handbrake.fr/docs/en/latest/cli/cli-guide.html
string commandline = $"--input \"{inputname}\" --output \"{outputname}\" --format av_mkv --encoder x264 " +
$"--encoder-preset medium --quality {Settings.Default.VideoEncodeQuality} --subtitle 1,2,3,4 --audio 1,2,3,4 " +
$"--aencoder copy --audio-fallback ac3";In ffmpeg I would use :
// Create the FFmpeg commandline and execute
// https://trac.ffmpeg.org/wiki/Encode/H.264
string commandline = $"-i \"{inputname}\" -c:v libx264 -crf {Settings.Default.VideoEncodeQuality} -preset medium -c:a copy -f matroska \"{outputname}\"";Is there an equivalent to HandbrakeCLI’s "—audio-fallback ac3" in ffmpeg ?
I.e. I want the video to be encoded to x264, all audio tracks copied if the track is aac or ac3 or eac3 or truehd or dts or dtshd or mp3 or flac, and if not, encoded as ac3, while also copying all the subtitles and chapters as is.
-
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


-
-
How many FFMPEG commands can I run on a machine
16 septembre 2020, par MickeyAssuming that I have a machine that has the specifications listed below, how many ffmpeg commands (that are taking video from IP camera and encoding it for further stream) could be running at the same time :


- 

- i7 9th gen
- 16 Gb of RAM
- NVIDIA GeForce GTX 1060 3GB








What is the resource takeup for each command like that.


Example of one of the commands I am running could is below.


ffmpeg -rtsp_transport tcp -i "rtsp://ipaddress:port/profile" -framerate 30 -video_size 1280x720 -vcodec libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 60 -c:a aac -b:a 128k -ar 44100 -f flv rtmp://ipaddress:port/destination/application