
Recherche avancée
Autres articles (53)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (3951)
-
Nginx rtmp module - on_publish fires multiple time instead of once
29 juillet 2017, par Stephen WrightThis is copy and pasted from the bug report I created on the rtmp-module by Arut, I am not completely sure if it is a bug or me not understanding how the module works, I have read the whole directives of module as from https://github.com/arut/nginx-rtmp-module/wiki/Directives
Proper explanation, if code is not displayed properly I will edit and fix
Hi, been using the module and finding it very very good !
Think I have found a issue though, although it may be me misunderstanding the directives.
Essentially I wish to fire a script (/usr/local/bin/make_thumbnail.sh) which creates a thumbnail automatically from a stream (using ffmpeg), the idea is to have this done for every stream as soon as it is published in order to create a function a bit like twitch tv where the streamer will not have to specify any thumbnail image, authenticated users simply start a stream (which will later be authenticated but is not yet) The script does also write data into the database however this stage works fine and I don’t believe the issue is related, if I comment out these lines then the thumbnail creation still works and my issue continues.
Initially this was done using the "exec" command as I believe I mis-read the documentation and I believe the exec command doesn’t work for my problem as ". When publishing stops the process is terminated." does this mean it will continually execute until stream stops ?
I have started using the exec_publish command to try and fix this issue however the same issue seems to occur. The entire script repeats approximately every 15-17 seconds, a new thumbnail is created and a new database entry is create with all the correct information.
Below is the nginx.conf line. Please ignore if indentation is incorrect couldn’t see a way to indent blocks of code and it’s late here, assume all code is indented correctly unless you believe that could be the issue in which case I will post it indented as early as I can.
application live {
allow play all;
live on;
record all;
record_path /var/stream/video_recordings/;
record_unique on;
hls on;
hls_nested on;
hls_path /var/stream/HLS/live;
hls_fragment 10s;
#on publish create thumbnail using first second of stream and save in
/var/stream/video_recordings/thumbnails
exec_publish usr/local/bin/make_thumbnail.sh $name;The rest can be pasted or attached if needed but is working nginx config for rtmp + website
The most simple version of the make_thumbnail..sh is pasted below, I have omitted the variables that I have used for database entryys obviously but as the script works without fail from terminal I believe this to be an nginx issue (if I run the command manually under the nginx user e.g. sudo -u nginx /usr/local/bin/make_thumbnail.sh with a name the same as any running stream, it works and only executes once as would expect, all permissions in script are ok and tested.
make_thumbnail.sh
#!/bin/bash
TIME=$(date +%s)
NAME=$1
echo "time: "
FILENAME=${TIME}_${NAME}
ffmpeg -i rtmp://192.168.0.98:1935/live/$1 -vframes 1 -s 150x150 -ss 10 -
strftime 1 /var/stream/video_recordings/thumbnails/"$FILENAME.jpg";
#Writes path to video into database
mysql --user=$DB_USER --password=$DB_PASSWD $DB_NAME << EOF
INSERT INTO $TABLE3 (thumbnailfile) VALUES ('$FILENAME');
set @last_id_in_thumbnails = LAST_INSERT_ID();
INSERT INTO $TABLE (created_at, updated_at, thumnailID) VALUES
(NOW(),NOW(),@last_id_in_thumbnails);
SET @last_id_in_livestreams = LAST_INSERT_ID();
INSERT INTO $TABLE2 (created_at, updated_at, filename,liveID) VALUES
(NOW(),NOW(),'$FILENAME',@last_id_in_livestreams);
EOFI have not got the nginx rtmp logs installed, I can obviously do this however some of the logs appear in the nginx error.log, strangely the latest stream I tried did not update in the access log, however I think this is because I did not attempt to connect to it via any method. I don’t fully understand the error.log, in my stupidity I decided to use nginx with which I am quite inexperienced and I am finding it very difficult to troubleshoot this issue, it appears to me that as part of the RTMP protocol or my streaming software (OBS) is either directly pinging the rtmp stream or is being pinged by the server to ensure the connection is still there. And this ping is
I have left a stream running from approx 4 minutes without interacting with the server, streaming software, computer running the stream, I have ensured the internet connection is constant as my first though was the connection dropped, however on inspecting the database the executing is done always after at least 11 seconds however usually this is 16, I can’t seem to figure out how to select the closest dates from the database however there has been at least a few 17 second differences (potentially when
I am unsure if this is an issue or if it is intended behavior but I do require this to finish a university degree, I’m not asking for answers but if it is a legitimate issue then I would be happy to spend as much time I can commit to it if some insight into what is causing it, or if there is a workaround I believe it should be documented somewhere, I have googled into making any exec commands run only once on publishI can’t seem to pinpoint where in the log the issue is happening however think it is something to do with the below exceprts I would attach the file but can’t seem to select all lines after the timestamp upon starting a stream
2017/07/26 18:17:35 [info] 1451#0: *2229 exec: starting managed child
'ffmpeg', client: 192.168.0.78, server: 0.0.0.0:1935
2017/07/26 18:17:35 [info] 1451#0: *2412 client connected '192.168.0.98'
2017/07/26 18:17:35 [info] 1451#0: *2412 connect: app='live' args=''
flashver='LNX 9,0,124,2' swf_url='' tc_url='rtmp://192.168.0.98:1935/live'
page_url='' acodecs=4071 vcodecs=252 object_encoding=0, client:
192.168.0.98, server: 0.0.0.0:1935
2017/07/26 18:17:35 [info] 1451#0: *2412 createStream, client: 192.168.0.98,
server: 0.0.0.0:1935
2017/07/26 18:17:35 [info] 1451#0: *2412 play: name='newname' args=''
start=-2000 duration=0 reset=0 silent=0, client: 192.168.0.98, server:
0.0.0.0:1935
2017/07/26 18:17:36 [info] 1451#0: *2410 recv() failed (104: Connection
reset by peer), client: 192.168.0.98, server: 0.0.0.0:1935
2017/07/26 18:17:36 [info] 1451#0: *2410 disconnect, client: 192.168.0.98,
server: 0.0.0.0:1935
2017/07/26 18:17:36 [info] 1451#0: *2410 deleteStream, client: 192.168.0.98,
server: 0.0.0.0:1935
2017/07/26 18:17:36 [notice] 1451#0: signal 17 (SIGCHLD) received
2017/07/26 18:17:36 [notice] 1451#0: unknown process 10487 exited with code
0
2017/07/26 18:17:36 [info] 1451#0: *2229 exec: child 10487 exited; ignoring,
client: 192.168.0.78, server: 0.0.0.0:1935
ver: 0.0.0.0:1935
2017/07/26 18:17:41 [info] 1451#0: *2229 exec: starting managed child
'usr/local/bin/make_thumbnail.sh', client: 192.168.0.78, server:
0.0.0.0:1935
2017/07/26 18:17:41 [info] 1451#0: *2413 client connected '192.168.0.98'
2017/07/26 18:17:41 [info] 1451#0: *2413 connect: app='live' args=''
flashver='LNX 9,0,124,2' swf_url='' tc_url='rtmp://192.168.0.98:1935/live'
page_url='' acodecs=4071 vcodecs=252 object_encoding=0, client:
192.168.0.98,
server: 0.0.0.0:1935
2017/07/26 18:17:41 [info] 1451#0: *2413 createStream, client: 192.168.0.98,
server: 0.0.0.0:1935
2017/07/26 18:17:41 [info] 1451#0: *2413 play: name='newname' args=''
start=-2000 duration=0 reset=0 silent=0, client: 192.168.0.98, server:
0.0.0.0:1935
2017/07/26 18:17:43 [info] 1451#0: *2229 exec: starting managed child
'ffmpeg',
client: 192.168.0.78, server: 0.0.0.0:1935
2017/07/26 18:17:43 [info] 1451#0: *2414 client connected '192.168.0.98'
2017/07/26 18:17:43 [info] 1451#0: *2414 connect: app='live' args=''
flashver='LNX 9,0,124,2' swf_url='' tc_url='rtmp://192.168.0.98:1935/live'
page_url='' acodecs=4071 vcodecs=252 object_encoding=0, client:
192.168.0.98,
server: 0.0.0.0:1935
@ -
Evolution #3751 : Ajouter le support du SNI au proxy connect
1er août 2017, par - EquipementBonjour,
En PHP 5.6, avec la version SPIP SVN du 01/08/2017, lorsque je clique sur le bouton "Essayer le proxy", j’obtiens le message :
Deprecated : SNI_server_name is deprecated in favor of peer_name in ...\ecrire\inc\distant.php on line 1345Selon http://php.net/manual/en/context.ssl.php :
SNI_server_name string (...) Note : This option is deprecated, in favour of peer_name, as of PHP 5.6.0. -
FFmpeg - Concatenating videos with different resolutions
7 août 2017, par JillI currently have an android app where the videos get combined using ffmpeg’s concat. That works fine. However, when I add text (using drawtext) to one of the videos, after combining the videos again, the combined video gets distorted. The video with the drawtext shows up fine, but then the videos without text switches orientation.
I think the problem roots from the fact that a vertical video on my android phone has the resolution of 1920x1080, however if I use that for the scale when executing drawtext, it becomes horizontal.
I think an example might help explain this better. Let’s say I have 2 vertically recorded videos, and I combine them with concat. The combined video shows up fine. Then if I add text to the 1st video using drawtext, the combined video will then show the first video (with text) at normal orientation (vertical). However, when it transitions to the next video, it first stalls for a couple seconds and then the 2nd video is shown at a horizontal orientation.
Also, I tried this also with having the aspect ratio as 1:1 so it wouldn’t matter, but the second video’s orientation still changed counter clockwise.
Thanks for the help, and happy to add more clarification if needed.
This is for adding the text :
ffmpeg -i input.mp4 -vf drawbox=y=ih-200:color=black@0.5:width=iw:height=200:t=max
,drawtext=fontfile=RobotoRegular.ttf:text='Text':x=(w-text_w)/2:y=(h-text_h)-100:fontsize=70:fontcolor=white
-c:v libx264 -b:v 17000k -r 30 -preset ultrafast -y output.mp4Output :
ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.me.app/files/65/VID_20170802_111518.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2017-08-02 18:15:20
com.android.version: 7.0
Duration: 00:00:00.93, start: 0.000000, bitrate: 16415 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 16408 kb/s, SAR 1:1 DAR 16:9, 28.94 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2017-08-02 18:15:20
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
[libx264 @ 0xeab7ec00] using SAR=1/1
[libx264 @ 0xeab7ec00] using cpu capabilities: none!
[libx264 @ 0xeab7ec00] profile Constrained Baseline, level 4.1
[libx264 @ 0xeab7ec00] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=17000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/65/temp.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
com.android.version: 7.0
encoder : Lavf57.25.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=-1--1, 17000 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandle
creation_time : 2017-08-02 18:15:20
encoder : Lavc57.24.102 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 6 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
frame= 10 fps=8.8 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
frame= 14 fps=8.4 q=15.0 size= 155kB time=00:00:00.03 bitrate=38067.5kbits/s dup=1 drop=0 speed=0.0201x
frame= 18 fps=8.0 q=22.0 size= 744kB time=00:00:00.16 bitrate=36592.5kbffmpeg -f concat -safe 0 -i input.mp4 -c copy -y output.mp4
Output :
ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from '/storage/emulated/0/Android/data/com.me.app/files/64/TXT_20170802_110325.txt':
Duration: N/A, start: 0.000000, bitrate: 23403 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
Metadata:
handler_name : VideoHandler
Output #0, mp4, to '/storage/emulated/0/Android/data/com.me.app/files/64/VID_20170802_110325concat.mp4':
Metadata:
encoder : Lavf57.25.100
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], q=2-31, 23403 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xe762a600] Auto-inserting h264_mp4toannexb bitstream filter
frame= 64 fps=0.0 q=-1.0 Lsize= 5218kB time=00:00:12.30 bitrate=3474.5kbits/s speed= 122x
video:5217kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025721%