
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (40)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (7104)
-
FFMPEG- Could not write header for output file #0 (incorrect codec parameters ?) : Operation not permitted Error initializing output stream 0:2 —
30 septembre 2021, par DannyHello guys I am trying to create a web-dash manifest for VOD with ffmpeg, but I am getting this error
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted Error initializing output stream 0:2 --
while using vp9 codec and doesn't understand the error and how to resolve it. Can someone help me out ? If I use vp8 instead of vp9 codec, I get the same error, but the ffmpeg log doesn't show any error.

subprocess.call([
 FFMPEG_PATH,
 "-f", "webm_dash_manifest", "-i", 480p_path,
 "-f", "webm_dash_manifest", "-i", 720p_path,
 "-f", "webm_dash_manifest", "-i", audio_path,
 "-c", "copy", "-map", "0", "-map", "1", "-map", "2",
 "-adaptation_sets", "id=0, streams=0,1, id=1, streams=2",
 "-f", "webm_dash_manifest", dash_path
 ])



Thanks in advance


UPDATE :
This is from the ffmpeg log.


ffmpeg version 2021-09-27-git-b786bc7433-full_build-www.gyan.dev 
Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.3.0 (Rev5, 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-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --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 57. 7.100 / 57. 7.100
 libavcodec 59. 9.101 / 59. 9.101
 libavformat 59. 5.100 / 59. 5.100
 libavdevice 59. 0.101 / 59. 0.101
 libavfilter 8. 9.100 / 8. 9.100
 libswscale 6. 1.100 / 6. 1.100
 libswresample 4. 0.100 / 4. 0.100
 libpostproc 56. 0.100 / 56. 0.100
Trailing option(s) found in the command: may be ignored.
[webm_dash_manifest @ 000002242a67e500] Could not find codec parameters for stream 0 (Video: vp9, none(tv, bt709, progressive), 854x480): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, webm_dash_manifest, from '480p.webm':
 Metadata:
 HANDLER : Created by Tester
 MAJOR_BRAND : isom
 MINOR_VERSION : 512
 COMPATIBLE_BRANDS: isomiso2avc1mp41
 HW : 1
 :
 BITRATE : 4000000
 :
 COMMENT : vid:v09044240000bq2bmhglths5sm54mgk0
 COPYRIGHT : 638e55167a0287a903e7b6895ed5d02e
 MAXRATE : 15000000
 :
 TE_IS_REENCODE : 1
 :
 ENCODER : Lavf59.2.101
 Duration: 00:00:20.17, bitrate: 907 kb/s
 Stream #0:0: Video: vp9, none(tv, bt709, progressive), 854x480, SAR 1:1 DAR 427:240, 30 fps, 30 tbr, 1k tbn (default)
 Metadata:
 HANDLER_NAME : VideoHandler
 VENDOR_ID : [0][0][0][0]
 ENCODER : Lavc59.1.100 libvpx-vp9
 DURATION : 00:00:20.166000000
 webm_dash_manifest_duration: 20166
 webm_dash_manifest_initialization_range: 1008
 webm_dash_manifest_file_name: 480p.webm
 webm_dash_manifest_track_number: 1
 webm_dash_manifest_cues_start: 2286344
 webm_dash_manifest_cues_end: 2286441
 webm_dash_manifest_bandwidth: 862822
 webm_dash_manifest_cluster_keyframe: 1
 webm_dash_manifest_cue_timestamps: 0,5000,10000,15000,20000
[webm_dash_manifest @ 000002242a69b840] Could not find codec parameters for stream 0 (Video: vp9, none(tv, bt709, progressive), 1280x720): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #1, webm_dash_manifest, from '720p.webm':
 Metadata:
 HANDLER : Created by Tester
 MAJOR_BRAND : isom
 MINOR_VERSION : 512
 COMPATIBLE_BRANDS: isomiso2avc1mp41
 HW : 1
 :
 BITRATE : 4000000
 :
 COMMENT : vid:v09044240000bq2bmhglths5sm54mgk0
 COPYRIGHT : 638e55167a0287a903e7b6895ed5d02e
 MAXRATE : 15000000
 :
 TE_IS_REENCODE : 1
 :
 ENCODER : Lavf59.2.101
 Duration: 00:00:20.17, bitrate: 1548 kb/s
 Stream #1:0: Video: vp9, none(tv, bt709, progressive), 1280x720, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn (default)
 Metadata:
 HANDLER_NAME : VideoHandler
 VENDOR_ID : [0][0][0][0]
 ENCODER : Lavc59.1.100 libvpx-vp9
 DURATION : 00:00:20.166000000
 webm_dash_manifest_duration: 20166
 webm_dash_manifest_initialization_range: 1008
 webm_dash_manifest_file_name: 720p.webm
 webm_dash_manifest_track_number: 1
 webm_dash_manifest_cues_start: 3903085
 webm_dash_manifest_cues_end: 3903182
 webm_dash_manifest_bandwidth: 1473835
 webm_dash_manifest_cluster_keyframe: 1
 webm_dash_manifest_cue_timestamps: 0,5000,10000,15000,20000
Input #2, webm_dash_manifest, from 'audio.webm':
 Metadata:
 HANDLER : Created by Tester
 MAJOR_BRAND : isom
 MINOR_VERSION : 512
 COMPATIBLE_BRANDS: isomiso2avc1mp41
 HW : 1
 :
 BITRATE : 4000000
 :
 COMMENT : vid:v09044240000bq2bmhglths5sm54mgk0
 COPYRIGHT : 638e55167a0287a903e7b6895ed5d02e
 MAXRATE : 15000000
 :
 TE_IS_REENCODE : 1
 :
 ENCODER : Lavf59.2.101
 Duration: 00:00:20.16, bitrate: 118 kb/s
 Stream #2:0: Audio: vorbis, 44100 Hz, stereo, fltp (default)
 Metadata:
 HANDLER_NAME : SoundHandler
 VENDOR_ID : [0][0][0][0]
 ENCODER : Lavc59.1.100 libvorbis
 DURATION : 00:00:20.158000000
 webm_dash_manifest_duration: 20158
 webm_dash_manifest_initialization_range: 5244
 webm_dash_manifest_file_name: audio.webm
 webm_dash_manifest_track_number: 1
 webm_dash_manifest_cues_start: 298527
 webm_dash_manifest_cues_end: 298624
 webm_dash_manifest_bandwidth: 110530
 webm_dash_manifest_cluster_keyframe: 1
 webm_dash_manifest_cue_timestamps: 0,4994,9983,14978,19971
At least one output file must be specified



The command for converting videos and audio to specific resolutions run without issues.


FFMPEG command directly run in cli.


ffmpeg -f webm_dash_manifest -i 480p.webm -f webm_dash_manifest -i 720p.webm -f webm_dash_manifest -i audio.webm -c copy -map 0 -map 1 -map 2 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1 id=1,streams=2 my_manifest.mpd



-
Completely remove high frequencies from wav file with ffmpeg
21 septembre 2021, par Melvin BenderFor my speech recognition project, I'd like to completely cut off frequencies above 5000Hz on my wav files using ffmpeg.
I understand there is a lowpass filter for reducing frequencies above a certain value :


ffmpeg -i original.wav -af "lowpass=f=5000" lowpass.wav



However when I check the spectogram, it seems like frequencies above 5000 have been reduced, not completely cut off


Voice sample with 5000Hz filter


How can I completely cut off frequencies with ffmpeg ? Any other software is also fine.


-
node.js ffmpeg spawn child_process unexpected data output and not possible to kill or stop
1er septembre 2021, par PLNR
I'm rather new to backend stuff, so please excuse, if my question is trivial.

For an Intranet project, I want to present a video element in a webpage (React, HLS.js Player) with the possibility reload the stream in case it hung.

The video sources are mpeg-ts streams delivered as udp multicast.

A small node.js / express server should handle the ffmpeg commands, to transcode the multicast to hls to display them in a browser.



My Problem is, that I am unable to stop the process...

I've tried to SIGINT, SIGTERM the process with it's pid, but the encoding is just going on.

Here is the code I wrote for transcoding so far :


const express = require("express");
const { spawn, exec } = require("child_process");
const cors = require("cors");
const process = require("process")

let ls;
let pid;

const app = express();

app.use(cors());

app.get('/cam/:source', (body) => {
 const cam = body.params.source;
 console.log(cam);

 let source = "udp://239.1.1.1:4444";
 let stream = "/var/www/html/streams/tmp/cam1.m3u8"


 stream = spawn("ffmpeg", ["-re", "-i", source, "-c:v", "libx264", "-crf", "21", "-preset", "veryfast", "-c:a", "aac", "-b:a", "128k", "-ac", "2", "-f", "hls", "-hls_list_size", "5", "-hls_flags", "delete_segments", stream], {detached: true});

 pid = stream.pid;

 stream.stdout.on("data", data => {
 console.log(`stdout: ${data}`);
 });

 stream.stderr.on("data", data => {
 console.log(`stderr: ${data}`);
 console.log("pid: ", pid);
 });

 stream.on("error", error => {
 console.log(`error: ${error.message}`);
 });

 stream.on("close", code => {
 console.log(`child process exited with code ${code}`);
 });
})

app.get('/cam/quit', () => {
 process.kill(pid, 'SIGINT')
})

app.listen(5000, ()=> {
 console.log('Listening');
})



On requesting the /cam/quit i would expect the process to stop... but it doesn't.

I've tried :

app.get('/cam/quit', () => {
 process.kill(pid, 'SIGINT')
})



app.get('/cam/quit', () => {
 process.kill(stream.pid, 'SIGINT')
})



app.get('/cam/quit', () => {
 stream.kill(pid, 'SIGINT')
})



app.get('/cam/quit', () => {
 stream.kill(0, 'SIGINT')
})



But none of this worked... do I miss something ? Is there something I need to change ?


Problem 2 - Output :

The output is emitted on stderr... even the process is working as expected.

This is maybe only cosmetics, but it makes me wondering.

Here is the terminal output :

[nodemon] starting `node server.js`
Listening
camera stream reloaded
stderr: ffmpeg version 4.3.2-0+deb11u1ubuntu1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10 (Ubuntu 10.2.1-20ubuntu1)
 configuration: --prefix=/usr --extra-version=0+deb11u1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100

pid: 4206
stderr: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'udp://239.1.1.1':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : 
pid: 4206
stderr: 1970-01-01T00:00:00.000000Z
 encoder : Lavf52.54.0
 Duration: 01:55:59.20, start: 0.000000, bitrate: 1436 kb/s
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 720x384 [SAR 1:1 DAR 15:8], 1272 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : SoundHandler

pid: 4206
stderr: Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help

pid: 4206
stderr: [libx264 @ 0x5616b38b5440] using SAR=1/1

pid: 4206
stderr: [libx264 @ 0x5616b38b5440] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

pid: 4206
stderr: [libx264 @ 0x5616b38b5440] profile High, level 3.0, 4:2:0, 8-bit

pid: 4206
stderr: [libx264 @ 0x5616b38b5440] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=21.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, hls, to '/var/www/html/streams/tmp/aft.m3u8':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.45.100
 Stream #0:0(und): Video: h264 (libx264), yuv420p, 720x384 [SAR 1:1 DAR 15:8], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : VideoHandler
 encoder : Lavc58.91.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1(und): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 1970-01-01T00:00:00.000000Z
 handler_name : SoundHandler
 encoder : Lavc58.91.100 aac

pid: 4206
stderr: frame= 8 fps=0.0 q=0.0 size=N/A time=00:00:00.46 bitrate=N/A speed=0.931x 
pid: 4206
stderr: frame= 21 fps= 21 q=26.0 size=N/A time=00:00:00.96 bitrate=N/A speed=0.95x 
pid: 4206
stderr: frame= 33 fps= 22 q=26.0 size=N/A time=00:00:01.49 bitrate=N/A speed=0.982x 
pid: 4206
stderr: frame= 46 fps= 23 q=26.0 size=N/A time=00:00:02.00 bitrate=N/A speed=0.989x 
pid: 4206
stderr: frame= 58 fps= 23 q=26.0 size=N/A time=00:00:02.49 bitrate=N/A speed=0.986x 
pid: 4206



and so on...



Any help would be highly appreciated !

Many thanks in advance