
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (40)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (6460)
-
How can I convert audio to WAVE_FORMAT_PCM using FFmpeg ?
16 juin, par Eric StdlibI am using Python's
wave
module to read audio, and using FFmpeg to convert audio from other types to wav. However, I am encountering some problem.


I wrote
v.py
to generate an silence audio filea.wav



import sys, wave, math
import numpy as np

wave_data = np.zeros(44100).astype(np.short)

f = wave.open('a.wav', 'wb')
f.setnchannels(1)
f.setsampwidth(2)
f.setframerate(96000)
f.writeframes(wave_data.tostring())
f.close()




Then I used FFmpeg to "copy"
a.wav
tob.wav
(though it seems to encode / decode the file), but I can only reada.wav
with Python ;b.wav
cannot be opened.


[user@localhost tmp]$ ffmpeg -i a.wav b.wav
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'a.wav':
 Duration: 00:00:00.46, bitrate: 1536 kb/s
 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 96000 Hz, mono, s16, 1536 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'b.wav':
 Metadata:
 ISFT : Lavf57.71.100
 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 96000 Hz, mono, s16, 1536 kb/s
 Metadata:
 encoder : Lavc57.89.100 pcm_s16le
size= 86kB time=00:00:00.45 bitrate=1537.8kbits/s speed= 706x 
video:0kB audio:86kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.115646%
[user@localhost tmp]$ python3
Python 3.6.4 (default, Jan 23 2018, 22:25:37) 
[GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wave
>>> wave.open('a.wav')

>>> wave.open('b.wav')
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib64/python3.6/wave.py", line 499, in open
 return Wave_read(f)
 File "/usr/lib64/python3.6/wave.py", line 163, in __init__
 self.initfp(f)
 File "/usr/lib64/python3.6/wave.py", line 143, in initfp
 self._read_fmt_chunk(chunk)
 File "/usr/lib64/python3.6/wave.py", line 260, in _read_fmt_chunk
 raise Error('unknown format: %r' % (wFormatTag,))
wave.Error: unknown format: 65534
>>> 
</module></stdin>



How should I change the command of FFmpeg to convert the file to WAVE_FORMAT_PCM, so that I can read
b.wav
with Python ?

-
Want to send a video from desktop to Wowza using ffmpeg
3 mars 2018, par ST94I am trying to stream a local
.mp4
video file from my laptop toWowza Streaming Engine
using ffmpeg. Both systems are able to ping each other. I give the following command on my laptopffmpeg -re -i bunny_1080p_60fps_normal.mp4 -vcodec libx264 -acodec aac -ar 48000 -strict experimental -f flv "rtmp://192.168.1.22:1935/live/myStream"
192.168.1.22
is the IP address of Wowza server residing on another system runningUbuntu 17.04
.I see the following on the command prompt of my laptop when I give the above command,
ffmpeg version N-89894-g18e2ac032e Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 5.101 / 58. 5.101
libavdevice 58. 0.101 / 58. 0.101
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bunny_1080p_60fps_normal.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2013-12-16T17:59:32.000000Z
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
genre : Animation
composer : Sacha Goedegebure
Duration: 00:10:34.53, start: 0.000000, bitrate: 4486 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4001 kb/s, 60 fps, 60 tbr, 60k tbn, 120 tbc (default)
Metadata:
creation_time : 2013-12-16T17:59:32.000000Z
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 160 kb/s (default)
Metadata:
creation_time : 2013-12-16T17:59:37.000000Z
handler_name : GPAC ISO Audio Handler
Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)
Metadata:
creation_time : 2013-12-16T17:59:37.000000Z
handler_name : GPAC ISO Audio Handler
Side data:
audio service type: main
[rtmp @ 000001ed7c4108c0] No credentials set
[rtmp @ 000001ed7c4108c0] Server error: [ AccessManager.Reject ] : [ code=403 need auth; authmod=adobe ] :
rtmp://192.168.1.22:1935/live/myStream: Unknown error occurredCan anyone please tell me what the exact procedure is to stream a video file to Wowza .
How will I be able to view the stream at Wowza ?
-
ffmpeg hwmap SW decoded frame to OpenCL and hwmap back to h264 for SW encode
3 novembre 2019, par Oleksandr KyrpaI trying speed up process and avoid copy frames between GPU and CPU. But got error : "Segmentation fault : 11", so may be I’m doing something wrong ?
My full ffmpeg command and log here :
./ffmpeg -i ../720.mp4 -init_hw_device opencl=ocl:0.1 -filter_hw_device ocl -filter_complex "hwmap,avgblur_opencl=30,hwmap" -c:v h264 -an -t 10 -y ../out_blur.mp4 -loglevel debug
Output :
./ffmpeg -i ../720.mp4 -init_hw_device opencl=ocl:0.1 -filter_hw_device ocl -filter_complex "hwmap,avgblur_opencl=30,hwmap" -c:v h264 -an -t 10 -y ../out_blur.mp4 -loglevel debug
ffmpeg version N-95621-g53c21c2d6b Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.10.44.4)
configuration: --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-ffplay --enable-nonfree --enable-opencl
libavutil 56. 35.101 / 56. 35.101
libavcodec 58. 60.100 / 58. 60.100
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 66.100 / 7. 66.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument '../720.mp4'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl=ocl:0.1'.
Reading option '-filter_hw_device' ... matched as option 'filter_hw_device' (set hardware device used when filtering) with argument 'ocl'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument 'hwmap,unsharp_opencl=lx=17:ly=17:la=5,hwmap'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264'.
Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '10'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '../out_blur.mp4' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option init_hw_device (initialise hardware device) with argument opencl=ocl:0.1.
[AVHWDeviceContext @ 0x7fbb1ec08480] 1 OpenCL platforms found.
[AVHWDeviceContext @ 0x7fbb1ec08480] 3 OpenCL devices found on platform "Apple".
[AVHWDeviceContext @ 0x7fbb1ec08480] 0.1: Apple / HD Graphics 4000
Applying option filter_hw_device (set hardware device used when filtering) with argument ocl.
Applying option filter_complex (create a complex filtergraph) with argument hwmap,unsharp_opencl=lx=17:ly=17:la=5,hwmap.
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url ../720.mp4.
Successfully parsed a group of options.
Opening an input file: ../720.mp4.
[NULL @ 0x7fbb1f818c00] Opening '../720.mp4' for reading
[file @ 0x7fbb1ec3d600] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Processing st: 0, edit list 0 - media time: 0, duration: 300300
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] Before avformat_find_stream_info() pos: 4123312 bytes read:34929 seeks:1 nb_streams:1
[h264 @ 0x7fbb1f9ae800] nal_unit_type: 7(SPS), nal_ref_idc: 1
[h264 @ 0x7fbb1f9ae800] nal_unit_type: 8(PPS), nal_ref_idc: 1
[h264 @ 0x7fbb1f9ae800] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x7fbb1f9ae800] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7fbb1f9ae800] Format yuv420p chosen by get_format().
[h264 @ 0x7fbb1f9ae800] Reinit context to 1280x720, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbb1f818c00] After avformat_find_stream_info() pos: 38244 bytes read:73125 seeks:2 frames:1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../720.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.33.100
Duration: 00:00:10.01, start: 0.000000, bitrate: 3295 kb/s
Stream #0:0(und), 1, 1/30000: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, 3293 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
Metadata:
handler_name : ISO Media file produced by Google Inc. Created on: 10/24/2018.
Successfully opened the file.
[Parsed_unsharp_opencl_1 @ 0x7fbb1ec45640] Setting 'lx' to value '17'
[Parsed_unsharp_opencl_1 @ 0x7fbb1ec45640] Setting 'ly' to value '17'
[Parsed_unsharp_opencl_1 @ 0x7fbb1ec45640] Setting 'la' to value '5'
Parsing a group of options: output url ../out_blur.mp4.
Applying option c:v (codec name) with argument h264.
Applying option an (disable audio) with argument 1.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 10.
Successfully parsed a group of options.
Opening an output file: ../out_blur.mp4.
Matched encoder 'libx264' for codec 'h264'.
[file @ 0x7fbb1ec44680] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 8 logical cores
[h264 @ 0x7fbb1f9a9800] nal_unit_type: 7(SPS), nal_ref_idc: 1
[h264 @ 0x7fbb1f9a9800] nal_unit_type: 8(PPS), nal_ref_idc: 1
Stream mapping:
Stream #0:0 (h264) -> hwmap
hwmap -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Last message repeated 1 times
[h264 @ 0x7fbb1f9a9800] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x7fbb1f9a9800] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7fbb1f9a9800] Format yuv420p chosen by get_format().
[h264 @ 0x7fbb1f9a9800] Reinit context to 1280x720, pix_fmt: yuv420p
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7fbb1f9b7e00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7fbb1f9cf200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7fbb1fa04c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7fbb1fa1b000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7fbb1fa24800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7fbb1fa24e00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7fbb1fa25400] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
[h264 @ 0x7fbb22809200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
[Parsed_unsharp_opencl_1 @ 0x7fbb1ed04e80] Setting 'lx' to value '17'
[Parsed_unsharp_opencl_1 @ 0x7fbb1ed04e80] Setting 'ly' to value '17'
[Parsed_unsharp_opencl_1 @ 0x7fbb1ed04e80] Setting 'la' to value '5'
[graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'video_size' to value '1280x720'
[graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'time_base' to value '1/30000'
[graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x7fbb1ee09040] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0x7fbb1ee09040] w:1280 h:720 pixfmt:yuv420p tb:1/30000 fr:30000/1001 sar:1/1 sws_param:flags=2
[format @ 0x7fbb1ed0a080] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le'
[AVFilterGraph @ 0x7fbb21004240] query_formats: 7 queried, 6 merged, 0 already done, 0 delayed
[Parsed_hwmap_2 @ 0x7fbb1ed03e00] picking yuv420p out of 13 ref:opencl alpha:1
[Parsed_hwmap_0 @ 0x7fbb1ed09940] Configure hwmap yuv420p -> opencl.
[Parsed_hwmap_2 @ 0x7fbb1ed03e00] Configure hwmap opencl -> yuv420p.
[hwmap @ 0x7fbb1ed03940] Filter input: yuv420p, 1280x720 (0).
Segmentation fault: 11