
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (42)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
De près ou de loin...
29 avril 2011, parIls ne le savent pas forcément mais sont indispensables
MediaSPIP est un logiciel open-source, il se base sur d’autres logiciels, et d’autres logiciels lui sont également nécessaires pour fonctionner ... Les personnes ici listées ne savent pas forcément qu’elles ont un rôle important dans le développement, elles ont apporté leur connaissances dans le cadre de la création d’une partie de ces éléments nécessaires ou ont écrit des articles permettant de comprendre certaines choses... il semble indispensable (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (4116)
-
live video streaming not playing on dash.js player using ffmpeg, nginx-rtmp in raspberry pi
15 août 2016, par sparksI am trying to stream a live video from raspberry pi & pi camera module to web browser.But the video doesn’t play.I am using Nginx-rtmp and ffmpeg to process the video. On the client side i use dash js player trying to play the video but no luck.I see the warning on the terminal
[flv @ 0x2c3b950] Failed to update header with correct duration.
[flv @ 0x2c3b950] Failed to update header with correct filesize.But i am not sure if this could be the issue. Anybody knows what might be wrong ?I don’t expect a straight answer but i am sure somebody can guide me in the right direction. Thank you in advance. Here is my set up
Nginx.conf
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name 192.168.1.114 localhost;
location / {
root /var/www;
index index.html index.htm;
}
location /dash {
root /var/www;
add_header Cache-Control no-cache;
}
location /dash.js{
root /var/www;
}
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /var/www;
index index.html;
add_header Cache-Control no-cache;
}
location /rtmpcontrol{
rtmp_control all;
}
location /rtmpstat{
rtmp_stat all;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application rtmp {
live on;
hls on;
dash on;
dash_path /var/www/dash;
hls_path /var/www/hls;
}
}
}baseline.html
<code class="echappe-js"><script src='http://stackoverflow.com/feeds/tag/dash.all.js'></script><script><br />
function getUrlVars() {<br />
var vars = {};<br />
var parts = window.location.href.replace(/[?&amp;]+([^=&amp;]+)=([^&amp;]*)/gi, function(m,key,value) {<br />
vars[key] = value;<br />
});<br />
return vars;<br />
}<br />
<br />
function startVideo() {<br />
var vars = getUrlVars(),<br />
url = "http://192.168.1.114:80/dash/stream.mpd",<br />
video,<br />
context,<br />
player;<br />
<br />
if (vars &amp;&amp; vars.hasOwnProperty("url")) {<br />
url = vars.url;<br />
}<br />
<br />
video = document.querySelector(".dash-video-player video");<br />
context = new Dash.di.DashContext();<br />
player = new MediaPlayer(context);<br />
<br />
player.startup();<br />
<br />
player.attachView(video);<br />
player.setAutoPlay(false);<br />
<br />
player.attachSource(url);<br />
}<br />
</script><body onload="startVideo()">
How i grab and push video stream
raspivid -w 640 -h 480 -fps 25 -t 0 -b 1800000 -o - | ffmpeg -y -f h264 -i - -vcodec libx264 -f flv -rtmp_buffer 100 -rtmp_live live rtmp://localhost:1935/rtmp/stream
When i run the above command, i see the following on the terminal
ffmpeg version N-81256-gd3426fb Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --enable-gpl --enable-libx264 --enable-nonfree
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 51.100 / 57. 51.100
libavformat 57. 44.100 / 57. 44.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 49.100 / 6. 49.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p, 640x480, 25 fps, 25 tbr, 1200k tbn, 50 tbc
[tcp @ 0x2c3c850] Connection to tcp://localhost:1935 failed (Connection refused), trying next address
[libx264 @ 0x2c50d80] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x2c50d80] profile High, level 3.0
[libx264 @ 0x2c50d80] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[flv @ 0x2c3b950] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, flv, to 'rtmp://localhost:1935/rtmp/stream':
Metadata:
encoder : Lavf57.44.100
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 640x480, q=-1--1, 25 fps, 1k tbn, 25 tbc
Metadata:
encoder : Lavc57.51.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
^Cmmal: Aborting program.0 size= 930kB time=00:00:45.44 bitrate= 167.7kbits/s speed=1.03x
[flv @ 0x2c3b950] Failed to update header with correct duration.
[flv @ 0x2c3b950] Failed to update header with correct filesize.
frame= 1197 fps= 26 q=-1.0 Lsize= 976kB time=00:00:47.76 bitrate= 167.5kbits/s speed=1.04x
video:953kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.484349%
[libx264 @ 0x2c50d80] frame I:5 Avg QP:18.91 size: 3600
[libx264 @ 0x2c50d80] frame P:299 Avg QP:21.38 size: 1486
[libx264 @ 0x2c50d80] frame B:893 Avg QP:20.62 size: 574
[libx264 @ 0x2c50d80] consecutive B-frames: 0.4% 0.0% 1.0% 98.6%
[libx264 @ 0x2c50d80] mb I I16..4: 10.1% 87.1% 2.8%
[libx264 @ 0x2c50d80] mb P I16..4: 3.8% 7.4% 0.0% P16..4: 34.2% 2.1% 1.5% 0.0% 0.0% skip:51.0%
[libx264 @ 0x2c50d80] mb B I16..4: 0.2% 0.3% 0.0% B16..8: 20.1% 0.4% 0.0% direct: 3.8% skip:75.1% L0:48.6% L1:50.9% BI: 0.6%
[libx264 @ 0x2c50d80] 8x8 transform intra:68.1% inter:97.0%
[libx264 @ 0x2c50d80] coded y,uvDC,uvAC intra: 10.1% 27.5% 1.8% inter: 2.0% 12.9% 0.1%
[libx264 @ 0x2c50d80] i16 v,h,dc,p: 18% 20% 9% 53%
[libx264 @ 0x2c50d80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 11% 58% 2% 2% 1% 2% 1% 1%
[libx264 @ 0x2c50d80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 26% 30% 3% 4% 4% 6% 2% 2%
[libx264 @ 0x2c50d80] i8c dc,h,v,p: 66% 18% 15% 1%
[libx264 @ 0x2c50d80] Weighted P-Frames: Y:1.7% UV:1.3%
[libx264 @ 0x2c50d80] ref P L0: 58.2% 2.2% 25.5% 14.1% 0.1%
[libx264 @ 0x2c50d80] ref B L0: 81.7% 13.3% 5.0%
[libx264 @ 0x2c50d80] ref B L1: 93.6% 6.4%
[libx264 @ 0x2c50d80] kb/s:162.87
Exiting normally, received signal 2.On my var/www/dash directory
stream-0.m4a stream-19200.m4a stream-29200.m4a
stream-9600.m4a stream-init.m4a stream.mpd stream-raw.m4v
stream-0.m4v stream-19200.m4v stream-29200.m4v stream-9600.m4v stream-init.m4v stream-raw.m4a -
AFTER PHP-FFMpeg not converting (error with ffmpeg)
15 août 2016, par Magurean Dan SergiuI have installed ffmpeg server side with all the dependencies, updated it. And then installed PHP-FFMpeg with Composer. Tested that ffmpeg is instaled with a ssh conexion.
root@host [/opt/ffmpeg]# ffmpeg
ffmpeg version N-81322-ge8b355a Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --disable-yasm
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 51.100 / 57. 51.100
libavformat 57. 46.100 / 57. 46.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 51.100 / 6. 51.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'But when I try to convert a video file with a php script it throws me a very long error.
PHP Code :<?PHP
include($_SERVER['DOCUMENT_ROOT']."/vendors/install/vendor/autoload.php");
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open($_SERVER['DOCUMENT_ROOT'].'/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.wmv');
$video
->filters()
->synchronize();
$format = new FFMpeg\Format\Video\X264();
$format->on('progress', function ($video, $format, $percentage) {
echo "$percentage % transcoded";});
$video
->save($format,$_SERVER['DOCUMENT_ROOT'].'/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.mp4');
?>Error displayed :
<b>Fatal error</b>: Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutionFailureException' with message 'ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57ad320a1b685j794u/pass-57ad320a1b716' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.mp4'' in /home/user/working/vendors/install/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:100↵Stack trace:↵#0 /home/user/working/vendors/install/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(72): Alchemy\BinaryDriver\ProcessRunner-&gt;doExecutionFailure(''/usr/bin/ffmpe...')↵#1 / in <b>/home/user/working/vendors/install/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Video.php</b> on line <b>168</b><br />↵"
Then I have took the basic code displayed upwards and ran it directly through ssh.
'/usr/local/bin/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57ad320a1b685j794u/pass-57ad320a1b716' '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.mp4'
And this is the response I get :
ffmpeg version N-81322-ge8b355a Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --disable-yasm
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 51.100 / 57. 51.100
libavformat 57. 46.100 / 57. 46.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 51.100 / 6. 51.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, asf, from '/home/user/working/resources/uploads/23097/2efeb41a1a7085a1dbd469c4895ac23e.wmv':
Metadata:
SfOriginalFPS : 299700
WMFSDKVersion : 11.0.6001.7000
WMFSDKNeeded : 0.0.0.0000
comment : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
title : Wildlife in HD
copyright : © 2008 Microsoft Corporation
IsVBR : 0
DeviceConformanceTemplate: AP@L3
Duration: 00:00:30.09, start: 0.000000, bitrate: 6977 kb/s
Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 192 kb/s
Stream #0:1(eng): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
Unknown encoder 'libx264'My question is what to do next ? I have wasted 3 days to make this work and this is the furthest I have come. How can I test if libx264 is installed corectly ? And if it is not installed corectly how cand I reinstal or make it work ?
After a few modifications
I have used an already installed ffmpeg, and removed a few commands (that were by default the same) and this time I used only the command line.
The request
'/home/user/working/vendors/install/ffmpeg-git-20160813-64bit-static/ffmpeg' '-y' '-i' '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.wmv' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-vcodec' 'libx264' '-c:a' 'aac' '-b:v' '1000k' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57b053ce14a12ljm8a/pass-57b053ce14ad3' '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.mp4'
The new result :
ffmpeg version N-81328-gceab04f-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-1) 20160803
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --enable-libzimg --cc=gcc-5
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 51.102 / 57. 51.102
libavformat 57. 46.101 / 57. 46.101
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 51.100 / 6. 51.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, asf, from '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.wmv':
Metadata:
SfOriginalFPS : 299700
WMFSDKVersion : 11.0.6001.7000
WMFSDKNeeded : 0.0.0.0000
comment : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
title : Wildlife in HD
copyright : © 2008 Microsoft Corporation
IsVBR : 0
DeviceConformanceTemplate: AP@L3
Duration: 00:00:30.09, start: 0.000000, bitrate: 6977 kb/s
Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 192 kb/s
Stream #0:1(eng): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1280x720, 5942 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
[libx264 @ 0x442f5c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x442f5c0] ratecontrol_init: can't open stats file
Output #0, mp4, to '/home/user/working/resources/uploads/96048/ffd3c5e349fa5745159deef163b5c253.mp4':
Metadata:
SfOriginalFPS : 299700
WMFSDKVersion : 11.0.6001.7000
WMFSDKNeeded : 0.0.0.0000
comment : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
title : Wildlife in HD
copyright : © 2008 Microsoft Corporation
IsVBR : 0
DeviceConformanceTemplate: AP@L3
Stream #0:0(eng): Unknown: none
Metadata:
start_time : 0
encoder : Lavc57.51.102 libx264
Stream #0:1(eng): Unknown: none
Metadata:
encoder : Lavc57.51.102 aac
Stream mapping:
Stream #0:1 -> #0:0 (vc1 (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (wmav2 (native) -> aac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height -
ffmpeg mp3 streaming via node js
21 août 2016, par school boyvar fs = require('fs');
var child = require('child_process');
var http=require('http')
var input_file = fs.createReadStream('./remo.mp3');
http.createServer(function (req,res) {
var args = ['-ss',120,
'-i', 'remo.mp3',
'-f','mp3',
'pipe:1' // Output on stdout
];
var trans_proc = child.spawn('ffmpeg', args);
res.writeHead(200, {
'Content-Type': 'audio/mpeg'
});
trans_proc.stdout.pipe(res)
trans_proc.stderr.on('data',function (err) {
console.log(err.toString());
})
}).listen(2000)i am trying to cut the mp3 and streaming to the browser but in browser it showing corrupted file