
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (40)
-
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
ANNEXE : Les extensions, plugins SPIP des canaux
11 février 2010, parUn plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
Les extensions que MediaSPIP nécessite pour fonctionner
Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...)
Sur d’autres sites (5470)
-
ffmpeg concatenate videos keeping data stream
27 juin 2017, par jabalI have 2 video segments where each of them has an AMF data stream embedded.
ffprobe segment_360p.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'segment_360p.mp4':
Metadata:
**major_brand : f4v**
minor_version : 0
compatible_brands: isommp42m4v
creation_time : 2017-06-26 19:16:08
Duration: 00:01:14.23, start: 0.000000, bitrate: 1055 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], 933 kb/s, 29.76 fps, 29.97 tbr, 90k tbn, 59.94 tbc (defa
lt)
Metadata:
creation_time : 2017-06-26 19:16:08
handler_name : WowzaStreamingEngine
encoder : WowzaStreamingEngine
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 116 kb/s (default)
Metadata:
creation_time : 2017-06-26 19:16:08
handler_name : WowzaStreamingEngine
Stream #0:2(eng): Data: none (amf0 / 0x30666D61), 0 kb/s (default)
Metadata:
creation_time : 2017-06-26 19:16:08
handler_name : WowzaStreamingEngineI am using ffmpeg to concatenate two such videos with the
-f concat
filter (ffmpeg -f concat -i mylist.txt -c copy output.mp4
) Unfortunately in the output stream this data stream is completely lost :ffprobe output.mp4
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
**major_brand : isom**
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.16.102
Duration: 00:03:38.93, start: 0.000000, bitrate: 1032 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], 903 kb/s, 29.50 fps, 29.97 tbr, 90k tbn, 59.94 tbc (defau
lt)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 120 kb/s (default)
Metadata:
handler_name : SoundHandlerWhile looking at the output, I noticed that the "major_brand" changed from f4v to isom, not sure if that is related or not.
How can I preserve the data stream while concatenating videos ?
-
A ffmpeg comman canwork in cmd but not in Python using subprocess.call() or os.system()
6 juin 2018, par StarryskyI wanna transfer a .mp3 to .wav. This is my command :
ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav
It worked well in cmd
C:\Users\starrysky\Documents\GitHub\bing_pic\html>ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav
ffmpeg version N-86482-gbc40674 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 66.100 / 55. 66.100
libavcodec 57. 99.100 / 57. 99.100
libavformat 57. 73.100 / 57. 73.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 92.100 / 6. 92.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Input #0, mp3, from 'a.mp3':
Metadata:
encoder : Lavf54.6.100
Duration: 00:00:01.87, start: 0.000000, bitrate: 8 kb/s
Stream #0:0: Audio: mp3, 8000 Hz, mono, s16p, 8 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'a.wav':
Metadata:
ISFT : Lavf57.73.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
Metadata:
encoder : Lavc57.99.100 pcm_s16le
size= 59kB time=00:00:01.87 bitrate= 256.3kbits/s speed= 187x
video:0kB audio:58kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.130208%but when I moved it into my python program, something strange happened.
>>> C:\Users\starrysky\Documents\GitHub\bing_pic\html\
'ffmpeg' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������
1 Command 'ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav' returned non-zero exit status 1.
文件错误啊,亲
[WinError 2] 系统找不到指定的文件。: 'a.wav'This is part of my python code :
@bot.register(wife, RECORDING)
def translate_sound(msg):
msg.get_file(save_path='a.mp3')
path = os.path.abspath('.')+'\\'
print(path)
try:
subprocess.check_call('ffmpeg -i a.mp3 -ar 16000 -ac 1 -acodec pcm_s16le a.wav', shell=True)
# ''
except Exception as e:
print(1, e)
wav_to_text('a.wav')
try:
os.remove('a.wav')
except Exception as e:
print(e)# 调用百度语音识别API
def get_token():
URL = 'http://openapi.baidu.com/oauth/2.0/token'
_params = urllib.parse.urlencode({'grant_type': b'client_credentials',
'client_id': b''
'client_secret': b''})
_res = urllib.request.Request(URL, _params.encode())
_response = urllib.request.urlopen(_res)
_data = _response.read()
_data = json.loads(_data)
return _data['access_token']
def wav_to_text(wav_file):
try:
wav_file = open(wav_file, 'rb')
except IOError:
print('文件错误啊,亲')
return
wav_file = wave.open(wav_file)
n_frames = wav_file.getnframes()
print('n_frames ', n_frames)
frame_rate = wav_file.getframerate()
print("frame_rate ", frame_rate)
if n_frames == 1 or frame_rate not in (8000, 16000):
print('不符合格式')
return
audio = wav_file.readframes(n_frames)
seconds = n_frames/frame_rate+1
minute = int(seconds/60 + 1)
for i in range(0, minute):
sub_audio = audio[i*60*frame_rate:(i+1)*60*frame_rate]
base_data = base64.b64encode(sub_audio)
data = {"format": "wav",
"token": get_token(),
"len": len(sub_audio),
"rate": frame_rate,
"speech": base_data.decode(),
"cuid": "B8-AC-6F-2D-7A-94",
"channel": 1}
data = json.dumps(data)
res = urllib.request.Request('http://vop.baidu.com/server_api',
data.encode(),
{'content-type': 'application/json'})
response = urllib.request.urlopen(res)
res_data = json.loads(response.read())
try:
print(res_data['result'][0])
except Exception as e:
print(e)What happened ?
-
ffmpeg : aspect ratio of image in a slideshow
26 juin 2020, par worovI have a bunch of images PNG files. I'm trying to make a slideshow with these using ffmpeg. The images are 3000*4000. These images don't have all the same aspect ratio.



Some are like these :






Some are like this :






I used the command :



ffmpeg -loop 1 -framerate 1/10 -i img%3d.png -i audio.wav -vf scale=w=3840:h=-1 -vcodec libx264 -crf 14 -r 60 -pix_fmt yuv420p -shortest output.mp4




It returns me this :



ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
 built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
 configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-mips32r2 --disable-mips32r6 --disable-mips64r6 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-libopencv --disable-podpages --disable-stripping --enable-avfilter --enable-avresample --enable-gcrypt --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opengl --enable-openssl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --disable-opencl --enable-libmfx --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
 libavutil 55. 58.100 / 55. 58.100
 libavcodec 57. 89.100 / 57. 89.100
 libavformat 57. 71.100 / 57. 71.100
 libavdevice 57. 6.100 / 57. 6.100
 libavfilter 6. 82.100 / 6. 82.100
 libavresample 3. 5. 0 / 3. 5. 0
 libswscale 4. 6.100 / 4. 6.100
 libswresample 2. 7.100 / 2. 7.100
 libpostproc 54. 5.100 / 54. 5.100
Input #0, image2, from 'img%3d.png':
 Duration: 00:02:30.00, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: png, rgb24(pc), 4000x3000 [SAR 7087:7087 DAR 4:3], 0.10 tbr, 0.10 tbn, 0.10 tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from 'audio.wav':
 Duration: 01:54:44.14, bitrate: 1536 kb/s
 Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
 Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55c1be935420] using SAR=1/1
[libx264 @ 0x55c1be935420] frame MB size (240x180) > level limit (36864)
[libx264 @ 0x55c1be935420] MB rate (2592000) > level limit (2073600)
[libx264 @ 0x55c1be935420] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55c1be935420] profile High, level 5.2
[libx264 @ 0x55c1be935420] 264 - core 150 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 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=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=14.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
 Metadata:
 encoder : Lavf57.71.100
 Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p(progressive), 3840x2880 [SAR 1:1 DAR 4:3], q=-1--1, 60 fps, 15360 tbn, 60 tbc
 Metadata:
 encoder : Lavc57.89.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc57.89.100 aac
[image2 @ 0x55c1be8edde0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
More than 1000 frames duplicated 5309kB time=00:00:09.13 bitrate=4762.0kbits/s dup=599 drop=0 speed=0.164x 
More than 10000 frames duplicated 137722kB time=00:02:39.13 bitrate=7089.8kbits/s dup=9584 drop=0 speed=0.174x 
More than 100000 frames duplicated429964kB time=00:27:39.13 bitrate=7060.5kbits/s dup=99434 drop=0 speed=0.173x 
frame=413401 fps= 10 q=-1.0 Lsize= 5962186kB time=01:54:49.96 bitrate=7088.9kbits/s dup=413310 drop=0 speed=0.173x 
video:5831116kB audio:117825kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.222641%
[libx264 @ 0x55c1be935420] frame I:2068 Avg QP: 6.65 size:2816521
[libx264 @ 0x55c1be935420] frame P:104040 Avg QP:10.85 size: 470
[libx264 @ 0x55c1be935420] frame B:307293 Avg QP:16.51 size: 318
[libx264 @ 0x55c1be935420] consecutive B-frames: 0.8% 0.0% 0.5% 98.7%
[libx264 @ 0x55c1be935420] mb I I16..4: 7.3% 54.6% 38.1%
[libx264 @ 0x55c1be935420] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.2% 0.0% 0.0% 0.0% 0.0% skip:99.8%
[libx264 @ 0x55c1be935420] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0% L0:49.5% L1:50.5% BI: 0.0%
[libx264 @ 0x55c1be935420] 8x8 transform intra:54.6% inter:97.9%
[libx264 @ 0x55c1be935420] coded y,uvDC,uvAC intra: 98.2% 92.7% 92.2% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x55c1be935420] i16 v,h,dc,p: 17% 12% 36% 35%
[libx264 @ 0x55c1be935420] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 26% 13% 5% 6% 6% 9% 6% 11%
[libx264 @ 0x55c1be935420] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 24% 11% 7% 9% 7% 10% 7% 11%
[libx264 @ 0x55c1be935420] i8c dc,h,v,p: 40% 33% 18% 10%
[libx264 @ 0x55c1be935420] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55c1be935420] ref P L0: 99.6% 0.0% 0.4% 0.0%
[libx264 @ 0x55c1be935420] ref B L0: 21.9% 78.1% 0.0%
[libx264 @ 0x55c1be935420] ref B L1: 99.5% 0.5%
[libx264 @ 0x55c1be935420] kb/s:6933.00
[aac @ 0x55c1be938aa0] Qavg: 640.546




But the second image is distorted in the video (I can't show you because I don't have enough reputation to post more links).



So I would like to preserve the aspect ratio of each picture : the images shouldn't be distorted. What command should I use for this ?



Thanks in advance.