
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (20)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (4971)
-
external-downloader option not working as expected in youtube-dl
31 mars 2021, par Coder_HI was trying to download specific timestamps from youtube using
youtube-dl
as mentioned as mentioned here in the comments

youtube-dl -v "https://www.youtube.com/watch?v=1I-3vJSC-Vo" -x -k --external-downloader ffmpeg --external-downloader-args "-ss 0:30 -to 0:35"



I got the following error :


[youtube] 1I-3vJSC-Vo: Downloading webpage
[download] Destination: ONE MINUTE OF PURE SATISFACTION _ Compilation 1-1I-3vJSC-Vo.f398.mp4
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/incl
ude/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable
-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libf
reetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-lib
openmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-lib
soxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal -
-enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-l
ibopencv --enable-libx264 --enable-shared
 WARNING: library configuration mismatch
 avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incd
ir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-lad
spa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig -
-enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enabl
e-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --ena
ble-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0
r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb
--enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Option to (record or transcode stop time) cannot be applied to input url https://r7---sn-gwpa-civk.googlevideo.com/videoplayback?exp
ire=1617150322&ei=Em1jYPnzG7qr3LUP6eGr2A0&ip=2409%3A4043%3A609%3A4b92%3Ad9f7%3Ad14%3A44f9%3A8525&id=o-AALoNXBA9D9WAuCZn-2a9-JjLoqCOC
_11Lo7_9LdU7g0&itag=398&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397%2C398&source=youtub
e&requiressl=yes&mh=05&mm=31%2C29&mn=sn-gwpa-civk%2Csn-gwpa-cvhd&ms=au%2Crdu&mv=m&mvi=7&pcm2cms=yes&pl=38&initcwndbps=148750&vprv=1&
mime=video%2Fmp4&ns=_3yx5zxNR1CYgHJamv8F-s4F&gir=yes&clen=4733883&dur=59.920&lmt=1578997687942906&mt=1617128452&fvip=7&keepalive=yes
&fexp=24001373%2C24007246&beids=9466588&c=WEB&txp=5431432&n=HoSSxcQKm_nNAUWgVTbz2&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2C
requiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAN-MjT3t_kpgwkOrBiw8f-0q5iDINPxu4bjfgZS66nNGAiBOLta-kt_AuaqGH
D-hJiElj9oNALl35IsBseYOR5AU4A%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgIf334bMxslsq
Lxpnn2BATGGV6GWoWoJQQuMMgQL-NaMCICojD-uZ1VkyxIOQrfOwlLAEJ-gCe1skejtRBk-oHejU -- you are trying to apply an input option to an output
 file or vice versa. Move this option before the file it belongs to.
Error parsing options for input file https://r7---sn-gwpa-civk.googlevideo.com/videoplayback?expire=1617150322&ei=Em1jYPnzG7qr3LUP6e
Gr2A0&ip=2409%3A4043%3A609%3A4b92%3Ad9f7%3Ad14%3A44f9%3A8525&id=o-AALoNXBA9D9WAuCZn-2a9-JjLoqCOC_11Lo7_9LdU7g0&itag=398&aitags=133%2
C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397%2C398&source=youtube&requiressl=yes&mh=05&mm=31%2C29&mn
=sn-gwpa-civk%2Csn-gwpa-cvhd&ms=au%2Crdu&mv=m&mvi=7&pcm2cms=yes&pl=38&initcwndbps=148750&vprv=1&mime=video%2Fmp4&ns=_3yx5zxNR1CYgHJa
mv8F-s4F&gir=yes&clen=4733883&dur=59.920&lmt=1578997687942906&mt=1617128452&fvip=7&keepalive=yes&fexp=24001373%2C24007246&beids=9466
588&c=WEB&txp=5431432&n=HoSSxcQKm_nNAUWgVTbz2&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%
2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAN-MjT3t_kpgwkOrBiw8f-0q5iDINPxu4bjfgZS66nNGAiBOLta-kt_AuaqGHD-hJiElj9oNALl35IsBseYOR5AU4A%3D%3D&
lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgIf334bMxslsqLxpnn2BATGGV6GWoWoJQQuMMgQL-NaMCICoj
D-uZ1VkyxIOQrfOwlLAEJ-gCe1skejtRBk-oHejU.
Error opening input files: Invalid argument


ERROR: ffmpeg exited with code 1




Why am I facing this error despite using the same format as mentioned in the link ?


-
FFMpeg/video4linux2,v4l2 : The v4l2 frame is 46448 bytes, but 153600 bytes are expected (Webcam capture not fast enough ?)
30 août 2013, par user763410I am trying to capture webcam output in linux/ubuntu. I have a chicony webcam (lenovo laptop). I am running inside a VMWARE virtual machine. The capture is not proceeding beyond 10 seconds. can you please help.
The command I used is :
$ ffmpeg -y -f video4linux2 -r 20 -s 160x120 -i /dev/video0 -acodec libfaac -ab 128k /tmp/web.avi
The most important message I am getting is :
[video4linux2,v4l2 @ 0x9e43fa0] The v4l2 frame is 46448 bytes, but 153600 bytes are expected
Complete message from ffmpeg :
ffmpeg version N-55159-gf118b41 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 18 2013 09:09:13 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-libass --prefix=/opt/ffmpeg --enable-debug --enable-libfreetype
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
[video4linux2,v4l2 @ 0x9e43fa0] The V4L2 driver changed the video from 160x120 to 320x240
[video4linux2,v4l2 @ 0x9e43fa0] The driver changed the time per frame from 1/20 to 1/15
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 6424.338678, bitrate: 18432 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 18432 kb/s, 15 fps, 15 tbr, 1000k tbn, 1000k tbc
Codec AVOption ab (set bitrate (in bits/s)) specified for output file #0 (/tmp/web.avi) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Output #0, avi, to '/tmp/web.avi':
Metadata:
ISFT : Lavf55.12.102
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240, q=2-31, 200 kb/s, 20 tbn, 20 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x9e43fa0] The v4l2 frame is 46448 bytes, but 153600 bytes are expected
/dev/video0: Invalid data found when processing input
frame= 29 fps= 14 q=3.5 Lsize= 87kB time=00:00:01.45 bitrate= 490.0kbits/s
video:80kB audio:0kB subtitle:0 global headers:0kB muxing overhead 7.760075%
[video4linux2,v4l2 @ 0x9e43fa0] Some buffers are still owned by the caller on close. -
Basic Video Palette Conversion
How do you take a 24-bit RGB image and convert it to an 8-bit paletted image for the purpose of compression using a codec that requires 8-bit input images ? Seems simple enough and that’s what I’m tackling in this post.
Ask FFmpeg/Libav To Do It
Ideally, FFmpeg / Libav should be able to handle this automatically. Indeed, FFmpeg used to be able to, at least at the time I wrote this post about ZMBV and was unhappy with FFmpeg’s default results. Somewhere along the line, FFmpeg and Libav lost the ability to do this. I suspect it got removed during some swscale refactoring.Still, there’s no telling if the old system would have computed palettes correctly for QuickTime files.
Distance Approach
When I started writing my SMC video encoder, I needed to convert RGB (from PNG files) to PAL8 colorspace. The path of least resistance was to match the pixels in the input image to the default 256-color palette that QuickTime assumes (and is hardcoded into FFmpeg/Libav).How to perform the matching ? Find the palette entry that is closest to a given input pixel, where "closest" is the minimum distance as computed by the usual distance formula (square root of the sum of the squares of the diffs of all the components).
That means for each pixel in an image, check the pixel against 256 palette entries (early termination is possible if an acceptable threshold is met). As you might imagine, this can be a bit time-consuming. I wondered about a faster approach...
Lookup Table
I think this is the approach that FFmpeg used to use, but I went and derived it for myself after studying the default QuickTime palette table. There’s a pattern there— all of the RGB entries are comprised of combinations of 6 values — 0x00, 0x33, 0x66, 0x99, 0xCC, and 0xFF. If you mix and match these for red, green, and blue values, you come up with6 * 6 * 6 = 216
different colors. This happens to be identical to the web-safe color palette.The first (0th) entry in the table is (FF, FF, FF), followed by (FF, FF, CC), (FF, FF, 99), and on down to (FF, FF, 00) when the green component gets knocked down and step and the next color is (FF, CC, FF). The first 36 palette entries in the table all have a red component of 0xFF. Thus, if an input RGB pixel has a red color closest to 0xFF, it must map to one of those first 36 entries.
I created a table which maps indices 0..215 to values from 5..0. Each of the R, G, and B components of an input pixel are used to index into this table and derive 3 indices ri, gi, and bi. Finally, the index into the palette table is given by :
index = ri * 36 + gi * 6 + bi
For example, the pixel (0xFE, 0xFE, 0x01) would yield ri, gi, and bi values of 0, 0, and 5. Therefore :
index = 0 * 36 + 0 * 6 + 5
The palette index is 5, which maps to color (0xFF, 0xFF, 0x00).
Validation
So I was pretty pleased with myself for coming up with that. Now, ideally, swapping out one algorithm for another in my SMC encoder should yield identical results. That wasn’t the case, initially.One problem is that the regulation QuickTime palette actually has 40 more entries above and beyond the typical 216-entry color cube (rounding out the grand total of 256 colors). Thus, using the distance approach with the full default table provides for a little more accuracy.
However, there still seems to be a problem. Let’s check our old standby, the Big Buck Bunny logo image :
Distance approach using the full 256-color QuickTime default palette
Distance approach using the 216-color palette
Table lookup approach using the 216-color palette
I can’t quite account for that big red splotch there. That’s the most notable difference between images 1 and 2 and the only visible difference between images 2 and 3.
To prove to myself that the distance approach is equivalent to the table approach, I wrote a Python script to iterate through all possible RGB combinations and verify the equivalence. If you’re not up on your base 2 math, that’s 224 or 16,777,216 colors to run through. I used Python’s multiprocessing module to great effect and really maximized a Core i7 CPU with 8 hardware threads.
So I’m confident that the palette conversion techniques are sound. The red spot is probably attributable to a bug in my WIP SMC encoder.
Source Code
Update August 23, 2011 : Here’s the Python code I used for proving equivalence between the 2 approaches. In terms of leveraging multiple CPUs, it’s possibly the best program I have written to date.PYTHON :-
# !/usr/bin/python
-
-
from multiprocessing import Pool
-
-
palette = []
-
pal8_table = []
-
-
def process_r(r) :
-
counts = []
-
-
for i in xrange(216) :
-
counts.append(0)
-
-
print "r = %d" % (r)
-
for g in xrange(256) :
-
for b in xrange(256) :
-
min_dsqrd = 0xFFFFFFFF
-
best_index = 0
-
for i in xrange(len(palette)) :
-
dr = palette[i][0] - r
-
dg = palette[i][1] - g
-
db = palette[i][2] - b
-
dsqrd = dr * dr + dg * dg + db * db
-
if dsqrd <min_dsqrd :
-
min_dsqrd = dsqrd
-
best_index = i
-
counts[best_index] += 1
-
-
# check if the distance approach deviates from the table-based approach
-
i = best_index
-
r = palette[i][0]
-
g = palette[i][1]
-
b = palette[i][2]
-
ri = pal8_table[r]
-
gi = pal8_table[g]
-
bi = pal8_table[b]
-
table_index = ri * 36 + gi * 6 + bi ;
-
if table_index != best_index :
-
print "(0x%02X 0x%02X 0x%02X) : distance index = %d, table index = %d" % (r, g, b, best_index, table_index)
-
-
return counts
-
-
if __name__ == ’__main__’ :
-
counts = []
-
for i in xrange(216) :
-
counts.append(0)
-
-
# initialize reference palette
-
color_steps = [ 0xFF, 0xCC, 0x99, 0x66, 0x33, 0x00 ]
-
for r in color_steps :
-
for g in color_steps :
-
for b in color_steps :
-
palette.append([r, g, b])
-
-
# initialize palette conversion table
-
for i in range(0, 26) :
-
pal8_table.append(5)
-
for i in range(26, 77) :
-
pal8_table.append(4)
-
for i in range(77, 128) :
-
pal8_table.append(3)
-
for i in range(128, 179) :
-
pal8_table.append(2)
-
for i in range(179, 230) :
-
pal8_table.append(1)
-
for i in range(230, 256) :
-
pal8_table.append(0)
-
-
# create a pool of worker threads and break up the overall job
-
pool = Pool()
-
it = pool.imap_unordered(process_r, range(256))
-
try :
-
while 1 :
-
partial_counts = it.next()
-
for i in xrange(216) :
-
counts[i] += partial_counts[i]
-
except StopIteration :
-
pass
-
-
print "index, count, red, green, blue"
-
for i in xrange(len(counts)) :
-
print "%d, %d, %d, %d, %d" % (i, counts[i], palette[i][0], palette[i][1], palette[i][2])
-