
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (71)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (6692)
-
Converting RGB to YUV, + ffmpeg
10 juillet 2012, par TheSHEEEPI am trying the following to record a live video from my Flash/AIR application :
- I take a "screenshot" (BitmapData from stage) each frame.
-
I convert each pixel to yuv format like this (V2) :
var file :File = new File(_appUrl + "/creation/output.raw");
var fs :FileStream = new FileStream();
fs.open(file, FileMode.WRITE);
var finalY :ByteArray = new ByteArray();
var finalU :ByteArray = new ByteArray();
var finalV :ByteArray = new ByteArray();
var rect :Rectangle = new Rectangle(0, 0, 600, 700);
var pixels :ByteArray;
var pixel :uint;
var r :uint;
var g :uint;
var b :uint;
_screenBuffer = _screenBuffer.reverse();
while (_screenBuffer.length > 0)
{
pixels = BitmapData(_screenBuffer.pop()).getPixels(rect);
pixels.position = 0;
// Convert and save each pixel
for (var x:int = 0; x < 600; x++)
{
for (var y:int = 0; y < 700; y++)
{
// Convert to yuv
pixel = pixels.readUnsignedInt();
r = pixel >> 16 & 0xff;
g = pixel >> 8 & 0xff;
b = pixel & 0xff;
// Y' is written for each pixel
finalY.writeByte(0.257 * r + 0.504 * g + 0.098 * b + 128);
// U and V are written once per 2x2 pixel block
if (x % 2 == 0 && y % 2 == 0)
{
finalU.writeByte(-0.148 * r - 0.291 * g + 0.439 * b + 128);
finalV.writeByte(0.439 * r - 0.368 * g - 0.071 * b + 128);
}
}
}
}
// Write the converted bytes to the file
finalY.position = 0;
finalU.position = 0;
finalV.position = 0;
fs.writeBytes(finalY, 0, finalY.length);
fs.writeBytes(finalU, 0, finalU.length);
fs.writeBytes(finalV, 0, finalV.length);
fs.close(); -
I use the following line of ffmpeg to convert the raw file to a video :
ffmpeg -r 30 -pix_fmt yuv420p -s 600x700 -vcodec rawvideo -f rawvideo -i output.raw -y test.mp4
A video is created, but it is simply a mess, barely resembling what was recorded. I know that the capturing process works, as I have tried the same BitmapData "screenshots" with the SimpleFlvWriter.
So, either something is wrong with my conversion or with the ffmpeg line, but I have no idea.
This is what ffmpeg outputs when creating the video, maybe it can help someone :
libavutil 51. 39.100 / 51. 39.100
libavcodec 54. 3.101 / 54. 3.101
libavformat 54. 1.100 / 54. 1.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.101 / 2. 62.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
[rawvideo @ 01D39FC0] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'output.raw':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 600x700, 30 tbr,
30 tbn, 30 tbc
[buffer @ 01D3FEC0] w:600 h:700 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
[libx264 @ 0375DB80] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE 4.2 AVX
[libx264 @ 0375DB80] profile High, level 3.1
[libx264 @ 0375DB80] 264 - core 120 r2146 bcd41db - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - 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=12 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=0rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4':
Metadata:
encoder : Lavf54.1.100
Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 600x700, q=-1--1, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> libx264)
Press [q] to stop, [?] for help
Truncating packet of size 630000 to 1
frame= 48 fps= 0 q=-1.0 Lsize= 157kB time=00:00:01.53 bitrate= 837.3kbits/s
video:156kB audio:0kB global headers:0kB muxing overhead 0.687626%
[libx264 @ 0375DB80] frame I:3 Avg QP:23.15 size: 23480
[libx264 @ 0375DB80] frame P:38 Avg QP:28.80 size: 2169
[libx264 @ 0375DB80] frame B:7 Avg QP:29.61 size: 833
[libx264 @ 0375DB80] consecutive B-frames: 79.2% 4.2% 0.0% 16.7%
[libx264 @ 0375DB80] mb I I16..4: 41.4% 6.2% 52.4%
[libx264 @ 0375DB80] mb P I16..4: 10.6% 3.3% 0.9% P16..4: 68.4% 1.3% 1.2% 0.0% 0.0% skip:14.2%
[libx264 @ 0375DB80] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 13.3% 2.2% 0.7% direct: 1.9% skip:81.9% L0:51.6% L1:47.4% BI: 1.0%
[libx264 @ 0375DB80] 8x8 transform intra:16.7% inter:31.2%
[libx264 @ 0375DB80] coded y,uvDC,uvAC intra: 14.7% 25.5% 22.3% inter: 1.0% 4.1% 3.4%
[libx264 @ 0375DB80] i16 v,h,dc,p: 87% 11% 2% 0%
[libx264 @ 0375DB80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 3% 18% 75% 1% 0% 1% 1% 0% 0%
[libx264 @ 0375DB80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 6% 74% 12% 1% 1% 1% 2% 1% 2%
[libx264 @ 0375DB80] i8c dc,h,v,p: 51% 45% 4% 1%
[libx264 @ 0375DB80] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0375DB80] ref P L0: 4.6% 0.4% 94.6% 0.3%
[libx264 @ 0375DB80] ref B L0: 96.0% 4.0%
[libx264 @ 0375DB80] ref B L1: 96.5% 3.5%
[libx264 @ 0375DB80] kb/s:793.39I'm not really a codec expert (just starting ;)), so I don't know what to make of most of that.
Here is a zip that contains one of the frames and the video output. What should be visible is a green smiling pear, without any artifacts. Remember the size is 600x700 and the format yuv420. Best to view such raw image files with irfanview, IMO. Don't mind the noise, its from pushing against my microphone ;)
-
FFMpeg Combine wav and avi to mp4
15 avril 2016, par krisphI am trying to combine a wav file and a avi in to a single mp4.
I can do this with the following via php :
$command = 'start /B convertvid\bin\ffmpeg -nostdin -i Temp\\temp.avi -i Temp\\temp.wav -y -filter:v scale=1920:-1 -c:v libx264 -preset ultrafast -movflags faststart -crf 31 -c:a libvo_aacenc -b:a 64k Temp\\output.mp4';
However it takes an age to complete and i need to speed it up, i was just wondering is there anything that could be done to optimize the commands to make it faster ?
I have tried the command using just the command line and it still takes ages...
C:\inetpub\wwwroot\Update\>convertvid\bin\ffmpeg -i Temp\temp.
avi -i Temp\temp.wav -y -c:v libx264 -preset ultrafast -movflags faststart -crf
31 -c:a libvo_aacenc -b:a 64k Temp\testhis.mp4
ffmpeg version N-74645-g4c39892 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 58.100 / 56. 58.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 37.100 / 5. 37.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, avi, from 'Temp\temp.avi':
Duration: 00:01:27.00, start: 0.000000, bitrate: 97 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 256
0x1024 [SAR 1:1 DAR 5:2], 98 kb/s, 0.99 fps, 0.99 tbr, 0.99 tbn, 25 tbc
Metadata:
title : Esa-XVID
Input #1, wav, from 'Temp\temp.wav':
Duration: 00:01:25.00, bitrate: 13 kb/s
Stream #1:0: Audio: gsm_ms (1[0][0][0] / 0x0031), 8000 Hz, mono, s16, 13 kb/
s
[libx264 @ 03b9d3e0] using SAR=1/1
[libx264 @ 03b9d3e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShu
ffle
[libx264 @ 03b9d3e0] profile Constrained Baseline, level 5.0
[libx264 @ 03b9d3e0] 264 - core 148 r2597 e86f3a1 - H.264/MPEG-4 AVC codec - Cop
yleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deb
lock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_rang
e=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_
offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlac
ed=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_m
in=1 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=31.0 qcomp=0.60 qpmin=0 qpma
x=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'Temp\testhis.mp4':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 2560x1
024 [SAR 1:1 DAR 5:2], q=-1--1, 0.99 fps, 1000k tbn, 0.99 tbc
Metadata:
title : Esa-XVID
encoder : Lavc56.58.100 libx264
Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 8000 Hz, mo
no, s16, 64 kb/s
Metadata:
encoder : Lavc56.58.100 libvo_aacenc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (gsm_ms (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
frame= 9 fps=0.0 q=11.0 size= 528kB time=00:00:05.05 bitrate= 855.4kbits/
frame= 17 fps= 16 q=9.0 size= 791kB time=00:00:13.15 bitrate= 492.9kbits/s
frame= 25 fps= 16 q=10.0 size= 844kB time=00:00:21.24 bitrate= 325.6kbits/
frame= 35 fps= 17 q=9.0 size= 870kB time=00:00:31.36 bitrate= 227.2kbits/s
frame= 45 fps= 17 q=10.0 size= 890kB time=00:00:41.47 bitrate= 175.8kbits/
frame= 56 fps= 18 q=9.0 size= 924kB time=00:00:52.60 bitrate= 143.9kbits/s
frame= 67 fps= 18 q=10.0 size= 948kB time=00:01:03.73 bitrate= 121.8kbits/
frame= 78 fps= 19 q=10.0 size= 989kB time=00:01:14.86 bitrate= 108.2kbits/
[mp4 @ 03b9c8e0] Starting second pass: moving the moov atom to the beginning of
the file
frame= 85 fps= 18 q=-1.0 Lsize= 1028kB time=00:01:25.98 bitrate= 97.9kbits
/s dup=9 drop=0
video:912kB audio:111kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.497861%
[libx264 @ 03b9d3e0] frame I:1 Avg QP:28.00 size:245528
[libx264 @ 03b9d3e0] frame P:84 Avg QP: 9.98 size: 8182
[libx264 @ 03b9d3e0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 03b9d3e0] mb P I16..4: 4.1% 0.0% 0.0% P16..4: 4.9% 0.0% 0.0%
0.0% 0.0% skip:90.9%
[libx264 @ 03b9d3e0] coded y,uvDC,uvAC intra: 10.3% 8.6% 6.3% inter: 2.4% 1.8% 0
.9%
[libx264 @ 03b9d3e0] i16 v,h,dc,p: 80% 18% 1% 1%
[libx264 @ 03b9d3e0] i8c dc,h,v,p: 64% 26% 10% 1%
[libx264 @ 03b9d3e0] kb/s:86.79 -
Error when trying to launch ffplay on Ubuntu server 16
18 décembre 2019, par NicolasFor work I need to get a video+audio link working between a machine running Ubuntu server 16 and a client machine running Ubuntu 18.04.
On the server side we have a webcam (with a microphone) and a speaker. The idea is that the client can see and hear what happens in front of the webcam, and can talk to whoever is next to the server.For this purpose, I run ffserver+ffmpeg on the server side to stream video and audio (that works, the client can see and hear what happens around the server), and the client also runs ffserver+ffmpeg on a different port, so that the server can use ffplay to hear what the client says.
Unfortunately for some reason at the moment the server cannot run ffplay. I get the following error :# ffplay -probesize 32 -sync ext http://localhost:8090/camera.rm
ffplay version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2003-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enableopengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
Input #0, rm, from 'http://localhost:8090/camera.rm': 0B f=0/0
Metadata:
title :
author :
copyright :
comment :
Duration: 01:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Audio: ac3 (dnet / 0x74656E64), 22050 Hz, mono, fltp, 32 kb/s
Stream #0:1: Video: rv10 (RV10 / 0x30315652), yuv420p, 640x480, 2048 kb/s, 24464 fps, 24464 tbr, 1k tbn, 1k tbc
SDL_OpenAudio (1 channels, 22050 Hz):
No more combinations to try, audio open failedTo be noted : ffplay has worked in the past on this server. The only modifications that were made are that I added some feeds and streams in the ffserver.conf, but they are not even used. I tried marking my additions as comments and repeating the test, but ffplay still doesn’t work.
My ffserver.conf file is as below :
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 200
MaxClients 100
MaxBandWidth 500000
CustomLog -
#NoDaemon
<feed>
File /tmp/camera.ffm
FileMaxSize 200M
</feed>
#<feed>
#File /tmp/test.ffm
#FileMaxSize 200k
#</feed>
#<feed>
#File /tmp/audio.ffm>
#FileMaxSize 200M
#</feed>
<stream>
Feed camera.ffm
Format rm
AudioBitRate 32
VideoFrameRate 15
VideoIntraOnly
VideoBitRate 2048
VideoBufferSize 2048
VideoSize 640x480
VideoQMin 5
VideoQMax 51
Strict -1
</stream>
#<stream>
#Feed test.ffm
#AudioBitRate 32
#AudioChannels 1
#AudioSampleRate 44100
#VideoBitRate 512
#VideoBufferSize 40
#VideoFrameRate 24
#VideoSize 640x640
#VideoGopSize 12
#VideoQMin 1
#VideoQMax 15
#</stream>
#<stream>
#Feed audio.ffm
#Format rm
#AudioBitRate 128
#NoVideo
#</stream>And I use the following commands :
On the server side : ffserver -f /etc/ffserver.conf
and : ffmpeg -f v4l2 -i /dev/video0 -f alsa -ac 2 -i hw:0 http://localhost:8090/camera.ffm
and to receive audio : ffplay -probesize 32 -sync ext http://10.1.0.244:8080/audio.ra
And on the client side : ffserver -f /etc/ffserver.conf
and : ffmpeg -f alsa -ac 2 -i hw:0 http://localhost:8080/audio.ffm
The two ffserver.conf files (on server and client) are identical, apart for the port which is different (8090 on the server and 8080 on the client).
Does anyone have any idea why ffplay won’t start on my server ?
Thanks,
Nicolas.