
Recherche avancée
Autres articles (60)
-
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 ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
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 (10246)
-
Statically built FFMPEG binary segmentation fault
12 février 2020, par stevendesuI want to create a custom build of FFMPEG which rips out everything except for the ability to transmux HLS videos to MP4, and I need this build to be 100% static with no external dependencies
I tried using the following configuration :
./configure \
--extra-cflags='-static -static-libstdc++ -static-libgcc' \
--extra-cxxflags='-static -static-libstdc++ -static-libgcc' \
--extra-ldflags='-static -static-libstdc++ -static-libgcc' \
--pkg-config-flags='--static' \
--enable-static \
--disable-shared \
--disable-runtime-cpudetect \
--disable-autodetect \
--disable-ffplay \
--disable-ffprobe \
--disable-doc \
--disable-avdevice \
--disable-swresample \
--disable-swscale \
--disable-postproc \
--disable-pthreads \
--disable-w32threads \
--disable-os2threads \
--enable-network \
--disable-dct \
--disable-dwt \
--disable-error-resilience \
--disable-lsp \
--disable-lzo \
--disable-mdct \
--disable-rdft \
--disable-fft \
--disable-faan \
--disable-pixelutils \
--disable-encoders \
--disable-decoders \
--disable-hwaccels \
--disable-muxers \
--enable-muxer=mov \
--enable-muxer=mp4 \
--disable-demuxers \
--enable-demuxer=hls \
--enable-demuxer=mpegts \
--enable-demuxer=h264 \
--enable-demuxer=aac \
--disable-parsers \
--enable-parser=h264 \
--enable-parser=aac \
--disable-bsfs \
--disable-protocols \
--enable-protocol=tcp \
--enable-protocol=tls \
--enable-protocol=http \
--enable-protocol=https \
--enable-protocol=hls \
--disable-indevs \
--disable-outdevs \
--disable-devices \
--disable-filters \
--disable-alsa \
--disable-appkit \
--disable-avfoundation \
--disable-bzlib \
--disable-coreimage \
--disable-iconv \
--disable-lzma \
--enable-openssl \
--disable-sndio \
--disable-sdl2 \
--disable-securetransport \
--disable-xlib \
--disable-zlib \
--disable-amf \
--disable-audiotoolbox \
--disable-cuda-llvm \
--disable-cuvid \
--disable-d3d11va \
--disable-dxva2 \
--disable-ffnvcodec \
--disable-nvdec \
--disable-nvenc \
--disable-v4l2-m2m \
--disable-vaapi \
--disable-vdpau \
--disable-videotoolbox \
--disable-debugThis looked about like what I wanted :
install prefix /usr/local
source path .
C compiler gcc
C library glibc
ARCH x86 (generic)
big-endian no
runtime cpu detection no
standalone assembly yes
x86 assembler nasm
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AESNI enabled yes
AVX enabled yes
AVX2 enabled yes
AVX-512 enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available yes
EBP available yes
debug symbols no
strip symbols yes
optimize for size no
optimizations yes
static yes
shared no
postprocessing support no
network support yes
threading support no
safe bitstream reader yes
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled no
makeinfo supports HTML no
External libraries:
openssl
External libraries providing hardware acceleration:
Libraries:
avcodec avfilter avformat avutil
Programs:
ffmpeg
Enabled decoders:
Enabled encoders:
Enabled hwaccels:
Enabled parsers:
aac h264
Enabled demuxers:
aac h264 hls mpegts
Enabled muxers:
mov mp4
Enabled protocols:
hls http https tcp tls
Enabled filters:
aformat anull atrim format hflip null transpose trim vflip
Enabled bsfs:
null
Enabled indevs:
Enabled outdevs:
License: LGPL version 2.1 or laterIt included several filters which I won’t ever need or use, but these filters are pulled in automatically if you don’t specify
--disable-avfilter
, and specifying--disable-avfilter
prevents theffmpeg
binary from being produced. So I’m stuck with those.Using these parameters and then running
make
, I received a binary that was about 5.9 MB in size and looked right :$> ldd ffmpeg
not a dynamic executableBut when I try to run it :
$> ./ffmpeg -version
Segmentation faultUsing valgrind to try and inspect the cause of the segmentation fault :
$> valgrind ./ffmpeg -version
.... lots of stuff ...
==61362== Jump to the invalid address stated on the next line
==61362== at 0x0: ???
==61362== by 0x70BB1B: ??? (in /src/FFmpeg/ffmpeg)
==61362== by 0x70B2E6: ??? (in /src/FFmpeg/ffmpeg)
==61362== by 0x4033F9: ??? (in /src/FFmpeg/ffmpeg)
==61362== by 0x1FFF000677: ???
==61362== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==61362==
==61362==
==61362== Process terminating with default action of signal 11 (SIGSEGV)
==61362== Bad permissions for mapped region at address 0x0
==61362== at 0x0: ???
==61362== by 0x70BB1B: ??? (in /src/FFmpeg/ffmpeg)
==61362== by 0x70B2E6: ??? (in /src/FFmpeg/ffmpeg)
==61362== by 0x4033F9: ??? (in /src/FFmpeg/ffmpeg)
==61362== by 0x1FFF000677: ???
==61362==
==61362== HEAP SUMMARY:
==61362== in use at exit: 0 bytes in 0 blocks
==61362== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==61362==
==61362== All heap blocks were freed -- no leaks are possible
==61362==
==61362== For counts of detected and suppressed errors, rerun with: -v
==61362== Use --track-origins=yes to see where uninitialised values come from
==61362== ERROR SUMMARY: 93 errors from 90 contexts (suppressed: 0 from 0)
Segmentation faultAttempting to access memory at location
0x0
sounds like trying to follow a null pointer. But I’m not sure how to fix this.gdb backtrace
When I first ran
gdb ./ffmpeg
gdb immediately gave me a segmentation fault and I wasn’t kicked into the gdb REPL, so I couldn’t investigateAfter rebuilding ffmpeg I was able to get in this time :
$> gdb ./ffmpeg
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later /gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
/www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
/www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ffmpeg...done.
(gdb) r
Starting program: /src/FFmpeg/ffmpeg
warning: Error disabling address space randomization: Operation not permitted
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x0000000000f9a8d5 in __register_frame_info_bases.part.6 ()
#2 0x00000000004445fd in frame_dummy ()
#3 0x0000000000000001 in ?? ()
#4 0x0000000000ebd20c in __libc_csu_init ()
#5 0x0000000000ebc9d7 in __libc_start_main ()
#6 0x000000000044451a in _start ()
(gdb)I tried grep’ing the code base for
__register_frame_info_bases
and found nothing. So I’m not really sure where to go from hereA fix, but not an explanation
By randomly removing configuration parameters and rebuilding I discovered that
--disable-pthreads
was causing the segmentation fault. When I remove this, ffmpeg runs just fineI don’t know why this is the case, though. Why would they make it possible to remove something that you need to run ?
-
How to stream video from Node.js
7 mai 2014, par Sunrisingi am trying to request a video stored on server and receive a stream of data to show in a html tag
From the client i request the streaming of a particular file i know exists in my server
Then in node i use this :
function streamvideo(response, request) {
// here i simply read from the response the path and the name of the file i want
var queryparts = url.parse(request.url, true).query;
var path = queryparts.query;
var path = 'tmp/' + path
, stat = fs.statSync(path)
, total = stat.size;
var origin = (request.headers.origin || "*");
// still not sure it is correct to manage range this way but it works
// if i request a range....
if (request.headers['range']) {
var range = request.headers.range
, parts = range.replace(/bytes=/, "").split("-")
, partialstart = parts[0]
, partialend = parts[1]
, start = parseInt(partialstart, 10)
, end = partialend ? parseInt(partialend, 10) : total - 1
, chunksize = (end - start) + 1;
console.log('RANGE: ' + start + ' - ' + end + ' = ' + chunksize + "\n")
response.writeHead(
206
, {
'Access-Control-Allow-Credentials': true,
'Access-Control-Allow-Origin': origin,
'Content-Range': 'bytes ' + start + '-' + end + '/' + total,
'Accept-Ranges': 'bytes',
'Content-Length': chunksize,
'Content-Type': 'video/mp4'
});
} else {
// if i request all the video
console.log('ALL: ' + total);
response.writeHead(
200,
{
'Access-Control-Allow-Credentials': true,
'Access-Control-Allow-Origin': origin,
'Content-Length': total,
'Content-Type': 'video/mp4'
}
);
}
// on-the-fly encoding
var ffmpeg = child_process.spawn("ffmpeg",[
"-i", path, // path
"-b:v" , "64k", // bitrate to 64k
"-bufsize", "64k",
"pipe:1" // Output to STDOUT
]);
//pack-up everything and send back the response with the stream
var file = fs.createReadStream(path);
file.pipe(response);it may be not the best code ever but it works because i receive on the client a stream of something !
BUT how can i verify this ? how can i actually ’see’ the video in the page ?now in the client page i have a tag like this :
<div>
<video class="mejs-wmp" width="320" height="240" src="test.mp4" type="video/mp4" controls="controls" preload="none"></video>
</div>but i can only see a black screen in my player...
Why ?
Thanks !
(feel free to correct any imprecision you see)
-
Working with -filter_complex in ffmpeg with a batch concat array
21 avril 2014, par user3555008What I am trying to do here is write an ffmpeg script that takes all songs from a folder and combines them into one audio file using the command line in Windows.
So far I have
ffmpeg -i "pathforinput1" -i "pathforinput2" -i "pathforinputn" -filter_complex "[0:0] [1:0] concat=n=(number of songs goes here):v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "output file.mp3"
My problem is that I want to combine it with the existing script :
for %A in ("input folder\*.extension") do ffmpeg
to create a total script that uses
-i "%A"
for the input. The problem I am having here is that each input file requires an entry in the array-filter_complex "[0:0] [1:0]
as well as having the total number of input files present inconcat=n=(number of files)
. I’ m willing to use a batch script to make this possible, but I can’t see how I would go about finding the total number of files in a folder and then creating an array for each (for example if there were 7 songs the array would be[0:0] [1:0] [2:0] [3:0] [4:0] [5:0] [6:0]
).Any help or pointers for making this possible would be great. Someone in this question managed to make something similar for a Unix system but I am using batch files and I don’t know how to modify it for Windows.
Thanks in advance for any help
Ok, progress made with the help of the first commenter. However, I think ffmpeg isn’t liking what I’ve made. My code thus far is :
:: Give you a list of the .wav filenames in -i "filename1" -i "filename2" format
for %%a in ("C:\Users\James\Input\*.*") do call set var=%%var%% -i "%%a"
echo %var%
:: Give you the number of .mp3 files
for /f %%a in ('dir "C:\Users\James\Input\*.*" /b /a-d ^|find /c /v "" ') do set "numfiles=%%a"
echo there are "%numfiles%" files
set /a totalnum=numfiles
:: dir "C:\Users\James\Input\" /b >> C:\Users\James\Output\filelist.txt
:: print some text
set /a numfiles=numfiles-1
for /L %%b in (0,1,%numfiles%) do call set array=%%array%% [%%b:0]
:: for /L %%b in (0,1,%numfiles%) do call set array=%%array%% [0:0]
echo %array%
for /f "tokens=* delims= " %%C in ('echo %array% ') do set array=%%C
set array=%array:~0,-1%
echo %array%
:: for %%d in ("C:\Users\James\Input\*.*") do ffmpeg -i "%%d" -filter_complex "%array% concat=n=%totalnum%:v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "C:\Users\James\Output\outputtestbatch1.mp3"
for %%d in ("C:\Users\James\Input\*.*") do ffmpeg -i "%%d" -filter_complex "%array% concat=n=%totalnum%:v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "C:\Users\James\Output\outputtestbatch1.mp3"
pause`The issue I am having now is that I think ffmpeg is assuming each input file has audio stream [0:0] rather than incrementing them one after the other. Is there a way to fix this with the input method I’m using ?
**SECOND EDIT**L : Success ! I modified foxidrive’s script a bit because it was slightly misconfigured. Final product is here :
@echo off
for %%a in ("C:\Users\James\Input\*.*") do call set var=%%var%% -i "%%a"
:: echo %var%
:: Give you the number of files
for /f %%a in ('dir "C:\Users\James\Input\*.*" /b /a-d ^|find /c /v "" ') do set "numfiles=%%a"
echo there are "%numfiles%" files
for /L %%b in (0,%numfiles%) do call set array=%%array%% [%%b:0]
set array=%array:~1%
echo "%array%"
ffmpeg %var% -filter_complex "%array% concat=n=%numfiles%:v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "C:\Users\James\Output\outputtestbatch1.mp3"
popd
pause