
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (6)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (3529)
-
.avi file to .webm file with alpha channel
2 juin 2023, par CutestI have no idea how to use FFmpeg, but my .avi file is too large for a 2-second video ? Any idea how I can convert it to WebM ? While retaining its alpha channel ?


I tried this :


ffmpeg -i "1.avi" -c:v libvpx -pix_fmt yuva420p "1.webm"



Output showed :


ffmpeg version 4.4-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.0 (Rev6, 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-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --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-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
[avi @ 00000245f2e7d640] Stream #0: not enough frames to estimate rate; consider increasing probesize
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from '1.avi':
 Duration: 00:00:02.00, start: 0.000000, bitrate: 3983150 kb/s
 Stream #0:0: Video: rawvideo, bgra, 1920x1080, 4014784 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc
 Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))
 Stream #0:1 -> #0:1 (pcm_s16le (native) -> opus (libopus))
Press [q] to stop, [?] for help
[libvpx @ 00000245f2e8ecc0] v1.10.0-24-g8b3e575a4
[libvpx @ 00000245f2e8ecc0] Neither bitrate nor constrained quality specified, using default CRF of 32 and bitrate of 256kbit/sec
[libvpx @ 00000245f2e8ecc0] Transparency encoding with auto_alt_ref does not work
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!



-
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



-
FFmpeg Pydub Debugging/Conversion Failed, ffmpeg returned error code : 1
21 juillet 2021, par Draco

I have a simple line of code importing an mp3 file, it used to give me a WinError2 error which I fixed by adding the ffmpeg exe's into the script directory. But now I have another error which I cannot really make heads or tails of :


The lines of code :


AudioSegment.converter = r"path/to/directory/ffmpeg.exe"


AudioSegment.ffprobe = r"path/to/directory/ffprobe.exe"


imported_mp3 = AudioSegment.from_mp3(Path(file_path))


The error message :


Traceback (most recent call last):
 File "C:\Users\my_user\OneDrive\Desktop\DIR\project.py", line 673, in <module>
 main()
 File "C:\Users\my_user\OneDrive\Desktop\DIR\project.py", line 665, in main
 read_titles(txt_path)
 File "C:\Users\my_user\OneDrive\Desktop\DIR\project.py", line 588, in the_function
 temp_voice = AudioSegment.from_mp3(import_path)
 File "C:\Users\my_user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pydub\audio_segment.py", line 796, in from_mp3
 return cls.from_file(file, 'mp3', parameters=parameters)
 File "C:\Users\my_user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pydub\audio_segment.py", line 773, in from_file
 raise CouldntDecodeError(
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

ffmpeg version 2021-07-14-git-ca56299fb3-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.3.0 (Rev2, 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. 0.100 / 57. 0.100
 libavcodec 59. 3.101 / 59. 3.101
 libavformat 59. 4.100 / 59. 4.100
 libavdevice 59. 0.100 / 59. 0.100
 libavfilter 8. 0.103 / 8. 0.103
 libswscale 6. 0.100 / 6. 0.100
 libswresample 4. 0.100 / 4. 0.100
 libpostproc 56. 0.100 / 56. 0.100
[mp3float @ 000001bf73e87b80] Header missing
 Last message repeated 27 times
[mp3 @ 000001bf73e7e540] decoding for stream 0 failed
[mp3 @ 000001bf73e7e540] Could not find codec parameters for stream 0 (Audio: mp3 (mp3float), 0 channels, fltp): unspecified frame size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mp3, from 'C:\Users\my_user\0.mp3':
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Audio: mp3, 0 channels, fltp
Stream mapping:
 Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 000001bf73e90f80] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[abuffer @ 000001bf73e9b240] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
 Last message repeated 3 times
[abuffer @ 000001bf73e9b240] Error setting option time_base to value 1/0.
[graph_0_in_0_0 @ 000001bf73e9c2c0] Error applying options to the filter.
Error reinitializing filters!
Error while filtering: Result too large
Finishing stream 0:0 without any data written to it.
[abuffer @ 000001bf73e9d4c0] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
 Last message repeated 3 times
[abuffer @ 000001bf73e9d4c0] Error setting option time_base to value 1/0.
[graph_0_in_0_0 @ 000001bf73eaa0c0] Error applying options to the filter.
Error configuring filter graph
Conversion failed!
</module>