
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (34)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)
Sur d’autres sites (7519)
-
Streaming video from an image using FFMPEG on Windows
26 mai 2013, par Daniel ZoharI wrote a program that simulates a camera and converts the output into a video stream. The program is required to be able to run on Windows.
There are two components in the system :- Camera Simulator. A C++ program that simulates the camera. It copies a pre-generated frame (i.e. PNG file) every 0.1 seconds, using the windows
copy
command, to a destination path./target/target_image.png
- Video Stream. Using FFmpeg, it creates a video stream out of the copied images. FFmpeg is ran with the following command :
ffmpeg -loop 1 -i ./target/target_image.png -r 10 -vcodec mpeg4 -f mpegts udp://127.0.0.1:1234
When running the whole thing together, it works fine for a few seconds until the ffmpeg halts. Here is a log while running in debug mode :
ffmpeg version N-52458-gaa96439 Copyright (c) 2000-2013 the FFmpeg developers
built on Apr 24 2013 22:19:32 with gcc 4.8.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 27.101 / 52. 27.101
libavcodec 55. 6.100 / 55. 6.100
libavformat 55. 3.100 / 55. 3.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 60.101 / 3. 60.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option '-loop' ... matched as AVOption 'loop' with argument '1'.
Reading option '-i' ... matched as input file with argument './target/target_image.png'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '10'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'mpeg4'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'.
Reading option 'udp://127.0.0.1:1234' ... matched as output file.
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 loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file ./target/target_image.png.
Successfully parsed a group of options.
Opening an input file: ./target/target_image.png.
[AVIOContext @ 02678840] Statistics: 234307 bytes read, 0 seeks
[AVIOContext @ 02678840] Statistics: 221345 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 02678840] Statistics: 226329 bytes read, 0 seeks
Last message repeated 2 times
[AVIOContext @ 02678840] Statistics: 228676 bytes read, 0 seeks
Last message repeated 2 times
[AVIOContext @ 02678840] Statistics: 230685 bytes read, 0 seeks
Last message repeated 2 times
[AVIOContext @ 02678840] Statistics: 232697 bytes read, 0 seeks
Last message repeated 5 times
[AVIOContext @ 02678840] Statistics: 234900 bytes read, 0 seeks
Last message repeated 2 times
[AVIOContext @ 02678840] Statistics: 236847 bytes read, 0 seeks
[image2 @ 02677ac0] Probe buffer size limit of 5000000 bytes reached
Input #0, image2, from './target/target_image.png':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0, 22, 1/25: Video: png, rgb24, 1274x772 [SAR 1:1 DAR 637:386], 1/25, 25 fps, 25 tbr, 25 tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: output file udp://127.0.0.1:1234.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 10.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument mpeg4.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: udp://127.0.0.1:1234.
Successfully opened the file.
[graph 0 input from stream 0:0 @ 02769280] Setting 'video_size' to value '1274x772'
[graph 0 input from stream 0:0 @ 02769280] Setting 'pix_fmt' to value '2'
[graph 0 input from stream 0:0 @ 02769280] Setting 'time_base' to value '1/25'
[graph 0 input from stream 0:0 @ 02769280] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 02769280] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 02769280] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 02769280] w:1274 h:772 pixfmt:rgb24 tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
[format @ 02768ba0] compat: called with args=[yuv420p]
[format @ 02768ba0] Setting 'pix_fmts' to value 'yuv420p'
[auto-inserted scaler 0 @ 02768740] Setting 'w' to value '0'
[auto-inserted scaler 0 @ 02768740] Setting 'h' to value '0'
[auto-inserted scaler 0 @ 02768740] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 02768740] w:0 h:0 flags:'0x4' interl:0
[format @ 02768ba0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 026772c0] query_formats: 4 queried, 3 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 02768740] w:1274 h:772 fmt:rgb24 sar:1/1 -> w:1274 h:772 fmt:yuv420p sar:1/1 flags:0x4
[mpeg4 @ 02785020] detected 4 logical cores
[mpeg4 @ 02785020] intra_quant_bias = 0 inter_quant_bias = -64
[mpegts @ 0277da40] muxrate VBR, pcr every 1 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'udp://127.0.0.1:1234':
Metadata:
encoder : Lavf55.3.100
Stream #0:0, 0, 1/90000: Video: mpeg4, yuv420p, 1274x772 [SAR 1:1 DAR 637:386], 1/10, q=2-31, 200 kb/s, 90k tbn, 10 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> mpeg4)
Press [q] to stop, [?] for help
*** drop!
Last message repeated 10 times
frame= 11 fps=0.0 q=4.0 size= 118kB time=00:00:01.10 bitrate= 875.1kbits/s dup=0 drop=11
Statistics: 242771 bytes read, 0 seeks
[AVIOContext @ 02674a60] Statistics: 246525 bytes read, 0 seeks
*** drop!
[AVIOContext @ 02674a60] Statistics: 230678 bytes read, 0 seeks
[AVIOContext @ 02674a60] Statistics: 244023 bytes read, 0 seeks
*** drop!
[AVIOContext @ 02674a60] Statistics: 246389 bytes read, 0 seeks
*** drop!
[AVIOContext @ 02674a60] Statistics: 224478 bytes read, 0 seeks
[AVIOContext @ 02674a60] Statistics: 228013 bytes read, 0 seeks
*** drop!
[image2 @ 02677ac0] Could not open file : ./target/target_image.png
./target/target_image.png: Input/output error
[output stream 0:0 @ 02768c20] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
frame= 164 fps= 17 q=31.0 Lsize= 959kB time=00:00:16.40 bitrate= 478.9kbits/s dup=0 drop=240
video:869kB audio:0kB subtitle:0 global headers:0kB muxing overhead 10.285235%
404 frames successfully decoded, 0 decoding errors
[AVIOContext @ 026779c0] Statistics: 0 seeks, 746 writeoutsIt seems to me there's some kind of collision between the reading and writing to/from the same file. What's also interesting is that on Linux (while replacing the
copy
withcp
) the program works just fine.Can someone suggest a way to solve this issue ? Alternatives solutions are also acceptable as long as the logical workflow remains the same.
- Camera Simulator. A C++ program that simulates the camera. It copies a pre-generated frame (i.e. PNG file) every 0.1 seconds, using the windows
-
FFMPEG : i need audio channels 7 & 8 to be the main audio track for a video
10 avril 2013, par lo_fyeI have a video with 8 channels of audio.
I need tracks 7 (Left Stereo) and 8 (Right Stereo) to be the audio for the video (which I'm converting to flv).
I've tried playing with
-filter_complex
and thejoin
,amix
, andamerge
filters, as well as the-map
parameter, but I can't seem to find the right combination of values :-/Output :
/usr/local/bin/ffmpeg-1.0/bin/ffmpeg -i '/folder/video_name.mov' -f 'flv' \
-s '320x240' -b '250k' -aspect '4:3' -ac 1 -ab '64k' -ar '22050' -y \
/folder/video_name.flv
ffmpeg version N-46241-g09ea482 Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 5 2012 07:33:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-46)
configuration: --prefix=/usr/local/bin/ffmpeg-1.0
libavutil 52. 1.100 / 52. 1.100
libavcodec 54. 70.100 / 54. 70.100
libavformat 54. 35.100 / 54. 35.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 21.105 / 3. 21.105
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Guessed Channel Layout for Input Stream #0.6 : mono
Guessed Channel Layout for Input Stream #0.7 : mono
Guessed Channel Layout for Input Stream #0.8 : mono
Guessed Channel Layout for Input Stream #0.9 : mono
Guessed Channel Layout for Input Stream #0.10 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/folder/video_name.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2013-04-03 19:45:26
Duration: 00:00:39.03, start: 0.000000, bitrate: 122149 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080, 110585 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976 tbn, 23976 tbc
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
timecode : 00:59:53:00
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:8(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:9(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:10(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream #0:11(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2013-04-03 19:45:30
handler_name : Apple Alias Data Handler
timecode : 00:59:53:00
Please use -b:a or -b:v, -b is ambiguous
Output #0, flv, to '/folder/video_name.flv':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf54.35.100
Stream #0:0(eng): Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 250 kb/s, 1k tbn, 23.98 tbc
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
timecode : 00:59:53:00
Stream #0:1(eng): Audio: adpcm_swf ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 88 kb/s
Metadata:
creation_time : 2013-04-03 19:45:26
handler_name : Apple Alias Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (prores -> flv)
Stream #0:1 -> #0:1 (pcm_s24le -> adpcm_swf)
Press [q] to stop, [?] for help
frame= 33 fps=0.0 q=2.0 size= 108kB time=00:00:01.99 bitrate= 442.4kbits/s
frame= 66 fps= 65 q=2.0 size= 225kB time=00:00:02.97 bitrate= 619.0kbits/s
frame= 99 fps= 65 q=2.0 size= 341kB time=00:00:04.96 bitrate= 561.8kbits/s
frame= 136 fps= 67 q=2.0 size= 400kB time=00:00:05.99 bitrate= 547.5kbits/s
frame= 177 fps= 70 q=3.0 size= 482kB time=00:00:07.98 bitrate= 494.3kbits/s
frame= 210 fps= 69 q=3.7 size= 590kB time=00:00:08.96 bitrate= 539.7kbits/s
frame= 240 fps= 68 q=6.3 size= 660kB time=00:00:10.01 bitrate= 539.7kbits/s
frame= 264 fps= 65 q=6.7 size= 719kB time=00:00:11.01 bitrate= 535.2kbits/s
frame= 288 fps= 63 q=8.4 size= 772kB time=00:00:12.02 bitrate= 526.1kbits/s
frame= 312 fps= 62 q=15.4 size= 829kB time=00:00:13.65 bitrate= 497.4kbits/s
frame= 336 fps= 60 q=10.4 size= 875kB time=00:00:14.02 bitrate= 511.1kbits/s
frame= 360 fps= 59 q=10.6 size= 916kB time=00:00:15.01 bitrate= 499.9kbits/s
frame= 383 fps= 58 q=17.8 size= 957kB time=00:00:15.97 bitrate= 490.6kbits/s
frame= 411 fps= 58 q=6.5 size= 1008kB time=00:00:17.97 bitrate= 459.3kbits/s
frame= 437 fps= 57 q=9.7 size= 1046kB time=00:00:18.99 bitrate= 451.3kbits/s
frame= 460 fps= 57 q=7.7 size= 1086kB time=00:00:20.01 bitrate= 444.6kbits/s
frame= 489 fps= 57 q=11.3 size= 1144kB time=00:00:20.99 bitrate= 446.3kbits/s
frame= 512 fps= 56 q=10.3 size= 1182kB time=00:00:22.01 bitrate= 439.8kbits/s
frame= 535 fps= 55 q=21.5 size= 1225kB time=00:00:22.98 bitrate= 436.7kbits/s
frame= 564 fps= 55 q=18.3 size= 1280kB time=00:00:24.00 bitrate= 436.8kbits/s
frame= 587 fps= 55 q=8.5 size= 1311kB time=00:00:24.98 bitrate= 429.7kbits/s
frame= 610 fps= 54 q=11.9 size= 1349kB time=00:00:26.00 bitrate= 424.9kbits/s
frame= 636 fps= 54 q=7.5 size= 1383kB time=00:00:26.98 bitrate= 419.8kbits/s
frame= 659 fps= 54 q=9.6 size= 1421kB time=00:00:28.00 bitrate= 415.6kbits/s
frame= 683 fps= 54 q=20.0 size= 1471kB time=00:00:29.02 bitrate= 415.1kbits/s
frame= 711 fps= 54 q=6.4 size= 1518kB time=00:00:30.00 bitrate= 414.5kbits/s
frame= 742 fps= 54 q=6.2 size= 1558kB time=00:00:31.02 bitrate= 411.5kbits/s
frame= 774 fps= 54 q=2.5 size= 1601kB time=00:00:33.01 bitrate= 397.1kbits/s
frame= 816 fps= 55 q=2.0 size= 1632kB time=00:00:34.50 bitrate= 387.6kbits/s
frame= 861 fps= 56 q=2.0 size= 1670kB time=00:00:35.99 bitrate= 380.1kbits/s
frame= 905 fps= 57 q=2.0 size= 1706kB time=00:00:38.03 bitrate= 367.4kbits/s
frame= 936 fps= 58 q=2.0 Lsize= 1730kB time=00:00:39.05 bitrate= 362.8kbits/s
video:1278kB audio:423kB subtitle:0 global headers:0kB muxing overhead 1.654557% -
Using FFMPEG to reliably convert videos to mp4 for iphone/ipod and flash players
23 avril 2016, par Jake StevensonI need to convert videos for use in both a flash player and the iphone/ipod touch. I’m using the following batch script with ffmpeg :
@echo off
ffmpeg.exe -i %1 -s qvga -acodec libfaac -ar 22050 -ab 128k -vcodec libx264 -threads 0 -f ipod %2This always outputs an mp4 file, and I can always play it on my PC. The videos also seem to play fine on my iphone 3GS. But with some input files it won’t work for older iphone versions (3G and iPod touch).
Here’s the ffmpeg output from one such file :
D:\ffmpeg>encode.bat d:\temp\recording.flv d:\temp\out.m4v
FFmpeg version SVN-r18709, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming
w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e
nable-avisynth --enable-gpl --enable-zlib --enable-bzlib --enable-libgsm --enabl
e-libfaac --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheo
ra --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid -
-enable-libschroedinger --enable-libx264
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Apr 28 2009 04:04:42, gcc: 4.2.4
[flv @ 0x187d650]skipping flv packet: type 18, size 164, flags 0
Input #0, flv, from 'd:\temp\recording.flv':
Duration: 00:00:07.17, start: 0.001000, bitrate: N/A
Stream #0.0: Video: flv, yuv420p, 320x240, 1k tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: nellymoser, 44100 Hz, mono, s16
[libx264 @ 0x13518b0]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE
4.2
[libx264 @ 0x13518b0]profile Baseline, level 4.2
Output #0, ipod, to 'd:\temp\out.m4v':
Stream #0.0: Video: libx264, yuv420p, 320x240, q=2-31, 200 kb/s, 1k tbn, 1k
tbc
Stream #0.1: Audio: libfaac, 22050 Hz, mono, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 90 fps= 0 q=-1.0 Lsize= 128kB time=6.87 bitrate= 152.4kbits/s
video:92kB audio:32kB global headers:1kB muxing overhead 2.620892%
[libx264 @ 0x13518b0]slice I:8 Avg QP:29.62 size: 7047
[libx264 @ 0x13518b0]slice P:82 Avg QP:30.83 size: 467
[libx264 @ 0x13518b0]mb I I16..4: 17.9% 0.0% 82.1%
[libx264 @ 0x13518b0]mb P I16..4: 0.6% 0.0% 0.0% P16..4: 23.1% 0.0% 0.0%
0.0% 0.0% skip:76.3%
[libx264 @ 0x13518b0]final ratefactor: 57.50
[libx264 @ 0x13518b0]SSIM Mean Y:0.9544735
[libx264 @ 0x13518b0]kb/s:8412.6My suspicion is that it has something to do with the audio encoding. If so, does anyone know how to force it to reencode the audio to the proper format ?
Any other ideas ?