
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (97)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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) (...)
Sur d’autres sites (5422)
-
FFMPEG : Redirecting Matroska muxed data to socket
14 août 2016, par Parth ShahI am using FFMPEG library to mux H.264 and AAC frames to Matroska (.mkv) file. I can do that both using command line and C program.
Now, instead of writing the muxed matroska data in to file I want to write these muxed data directly on to socket or pipe. My actual goal is to write a C program that send muxed data to socket and server will receive this muxed data.
I tried using protocol tcp. They are working with the matroska format.
So, My C program is able to send muxed data successfully over socket and server is able to receive this muxed data.But when I apply ffprobe command over the received file, I am getting duration and bitrate field N/A. and when I tried to play this file with vlc i am unable to seek the file and getting garbage duration.
Below the output of the ffprobe.
ffprobe version N-65784-g50a35f0 Copyright (c) 2007-2014 the FFmpeg developers
built on Aug 25 2014 12:31:36 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1)
configuration:
libavutil 54. 5.100 / 54. 5.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 1.100 / 56. 1.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.101 / 5. 0.101
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
Input #0, matroska,webm, from 'Array.mkv':
Metadata:
ENCODER : Lavf54.29.104
Duration: N/A, start: 1412858260.281000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 [SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)
Stream #0:1: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 [SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)
Stream #0:2: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 [SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)
Stream #0:3: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 [SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)As You can see Duration and Bitrate field shows N/A. However I am getting correct startTime.
Any help or advice ? Thank you in advance.
-
Run ffmpeg without outputting configuration information ?
28 mars 2014, par Matt JoinerI'm invoking
ffmpeg
withsubprocess.Popen
, and trying to capture thestderr
output and write it tologging
.args = ['ffmpeg', '-i', path]
if start:
args += ['-ss', start]
if end:
args += ['-t', end]
args += [
'-vcodec', 'copy',
'-acodec', 'copy',
'-scodec', 'copy',
'-f', 'mpegts',
'-y', '/dev/stdout']
self.child = subprocess.Popen(
args,
stdin=open(os.devnull, 'rb'),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)ffmpeg
generates a lot of configuration information like the following :FFmpeg version 0.6.2-4:0.6.2-1ubuntu1,
Copyright (c) 2000-2010 the Libav
developers built on Mar 22 2011
15:55:04 with gcc 4.5.2
configuration :
—extra-version=4:0.6.2-1ubuntu1 —prefix=/usr —enable-avfilter —enable-avfilter-lavf —enable-vdpau —enable-bzlib —enable-libgsm —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-libvorbis —enable-pthreads —enable-zlib —enable-libvpx —disable-stripping —enable-runtime-cpudetect —enable-vaapi —enable-gpl —enable-postproc —enable-swscale —enable-x11grab —enable-libdc1394 —enable-shared —disable-static WARNING : library configuration
mismatch libavutil configuration :
—extra-version=4:0.6.2-1ubuntu2 —prefix=/usr —enable-avfilter —enable-avfilter-lavf —enable-vdpau —enable-bzlib —enable-libdirac —enable-libgsm —enable-libopenjpeg —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-libvorbis —enable-pthreads —enable-zlib —enable-libvpx —disable-stripping —enable-runtime-cpudetect —enable-vaapi —enable-libopenjpeg —enable-gpl —enable-postproc —enable-swscale —enable-x11grab —enable-libfaad —enable-libdirac —enable-libfaad —enable-libmp3lame —enable-librtmp —enable-libx264 —enable-libxvid —enable-libdc1394 —enable-shared —disable-static libavcodec configuration :
—extra-version=4:0.6.2-1ubuntu2 —prefix=/usr —enable-avfilter —enable-avfilter-lavf —enable-vdpau —enable-bzlib —enable-libdirac —enable-libgsm —enable-libopenjpeg —enable-libschroedinger —enable-libspeex —enable-libtheora —enable-libvorbis —enable-pthreads —enable-zlib —enable-libvpx —disable-stripping —enable-runtime-cpudetect —enable-vaapi —enable-libopenjpeg —enable-gpl —enable-postproc —enable-swscale —enable-x11grab —enable-libfaad —enable-libdirac —enable-libfaad —enable-libmp3lame —enable-librtmp —enable-libx264 —enable-libxvid —enable-libdc1394 —enable-shared —disable-static libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0Prior to finally outputting the stuff I'd like to log :
Seems stream 0 codec frame rate
differs from container frame rate :
47.95 (66893/1395) -> 23.98 (66893/2790) At least one output file
must be specifiedIs there an option to prevent this excessive output ? Should I be doing it differently ?
-
avcodec_find_decoder for FFMpeg 2.1 is not working with Android
18 mars 2014, par Fabien HenonI ported FFMpeg 2.1 to Android with NDK and I wrote a JNI function to initialize a video.
Here is the code of this C function :
JNIEXPORT int JNICALL Java_com_media_ffmpeg_FFMpeg_naInit(JNIEnv *pEnv, jobject pObj, jstring pfilename) {
gVideoFileName = (char *) (*pEnv)->GetStringUTFChars(pEnv, pfilename, NULL);
__android_log_print(ANDROID_LOG_INFO, TAG, "Init %s\n", gVideoFileName);
avcodec_register_all();
__android_log_print(ANDROID_LOG_INFO, TAG, "avcodec_register_all\n");
av_register_all();
__android_log_print(ANDROID_LOG_INFO, TAG, "av_register_all\n");
VideoState *vs;
__android_log_print(ANDROID_LOG_INFO, TAG, "VideoState var\n");
vs = malloc(sizeof (VideoState));
memset(vs, 0, sizeof(VideoState));
__android_log_print(ANDROID_LOG_INFO, TAG, "malloc\n");
gvs = vs;
__android_log_print(ANDROID_LOG_INFO, TAG, "VideoState\n");
//open the video file
avformat_open_input(&vs->pFormatCtx, gVideoFileName, NULL, NULL);
__android_log_print(ANDROID_LOG_INFO, TAG, "open_input\n");
//retrieve stream info
avformat_find_stream_info(vs->pFormatCtx, NULL);
__android_log_print(ANDROID_LOG_INFO, TAG, "find_stream_info\n");
//find the video stream
AVCodecContext *pcodecctx;
//find the first video stream
vs->videoStreamIdx = -1;
__android_log_print(ANDROID_LOG_INFO, TAG, "before loop\n");
AVCodec *pcodec;
vs->videoStreamIdx = av_find_best_stream(vs->pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &pcodec, 0);
__android_log_print(ANDROID_LOG_INFO, TAG, "after loop. %d\n", vs->videoStreamIdx);
//get the decoder from the video stream
pcodecctx = vs->pFormatCtx->streams[vs->videoStreamIdx]->codec;
__android_log_print(ANDROID_LOG_INFO, TAG, "stream selected %d, %d\n", pcodecctx != NULL ? 1 : 0, pcodecctx->codec_id);
pcodec = avcodec_find_decoder(pcodecctx->codec_id);
__android_log_print(ANDROID_LOG_INFO, TAG, "find_decoder\n");
//open the codec
avcodec_open2(pcodecctx, pcodec, NULL);
__android_log_print(ANDROID_LOG_INFO, TAG, "open2\n");
return 0;
}When I execute this function from my Java code the log
find_decoder
(after the call to the functionavcodec_find_decoder
) is never displayed.Everything is correct : pointers have correct values and
pcodecctx->codec_id
has a value equal to 28.
But whenavcodec_find_decoder
there is nothing more, like a crash and I have no more log.Did I do something wrong when using and initializing FFMpeg ?
PS : before that instead of a call to
malloc
, thenmemset
I had a call toav_mallocz
but I also had a crash at this point, and replacing this call bymalloc
andmemset
fixed the crash.EDIT
I built
FFMpeg
using this script :#!/bin/bash
NDK=/Users/me/android-ndk
SYSROOT=$NDK/platforms/android-8/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64
function build_one
{
./configure \
--prefix=$PREFIX \
--disable-shared \
--enable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_oneEDIT 2
Here is the output for the configuration of the build of the library
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
install prefix /Users/fabienhenon/android-ndk/sources/ffmpeg/android/arm
source path .
C compiler /Users/fabienhenon/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc
C library bionic
host C compiler gcc
host C library
ARCH arm (armv5te)
big-endian no
runtime cpu detection yes
ARMv5TE enabled yes
ARMv6 enabled yes
ARMv6T2 enabled yes
VFP enabled yes
NEON enabled yes
THUMB enabled no
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared no
postprocessing support no
new filter support yes
network support yes
threading support pthreads
safe bitstream reader yes
SDL support no
opencl enabled no
libzvbi enabled no
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled yes
External libraries:
zlib
Enabled decoders:
aac bmp iac
aac_latm bmv_audio idcin
aasc bmv_video idf
ac3 brender_pix iff_byterun1
adpcm_4xm c93 iff_ilbm
adpcm_adx cavs imc
adpcm_afc cdgraphics indeo2
adpcm_ct cdxl indeo3
adpcm_dtk cinepak indeo4
adpcm_ea cljr indeo5
adpcm_ea_maxis_xa cllc interplay_dpcm
adpcm_ea_r1 comfortnoise interplay_video
adpcm_ea_r2 cook jacosub
adpcm_ea_r3 cpia jpeg2000
adpcm_ea_xas cscd jpegls
adpcm_g722 cyuv jv
adpcm_g726 dca kgv1
adpcm_g726le dfa kmvc
adpcm_ima_amv dirac lagarith
adpcm_ima_apc dnxhd loco
adpcm_ima_dk3 dpx mace3
adpcm_ima_dk4 dsicinaudio mace6
adpcm_ima_ea_eacs dsicinvideo mdec
adpcm_ima_ea_sead dvbsub metasound
adpcm_ima_iss dvdsub microdvd
adpcm_ima_oki dvvideo mimic
adpcm_ima_qt dxa mjpeg
adpcm_ima_rad dxtory mjpegb
adpcm_ima_smjpeg eac3 mlp
adpcm_ima_wav eacmv mmvideo
adpcm_ima_ws eamad motionpixels
adpcm_ms eatgq movtext
adpcm_sbpro_2 eatgv mp1
adpcm_sbpro_3 eatqi mp1float
adpcm_sbpro_4 eightbps mp2
adpcm_swf eightsvx_exp mp2float
adpcm_thp eightsvx_fib mp3
adpcm_xa escape124 mp3adu
adpcm_yamaha escape130 mp3adufloat
aic evrc mp3float
alac exr mp3on4
als ffv1 mp3on4float
amrnb ffvhuff mpc7
amrwb ffwavesynth mpc8
amv flac mpeg1video
anm flashsv mpeg2video
ansi flashsv2 mpeg4
ape flic mpegvideo
ass flv mpl2
asv1 fourxm msa1
asv2 fraps msmpeg4v1
atrac1 frwu msmpeg4v2
atrac3 g2m msmpeg4v3
aura g723_1 msrle
aura2 g729 mss1
avrn gif mss2
avrp gsm msvideo1
avs gsm_ms mszh
avui h261 mts2
ayuv h263 mvc1
bethsoftvid h263i mvc2
bfi h263p mxpeg
bink h264 nellymoser
binkaudio_dct hevc nuv
binkaudio_rdft hnm4_video paf_audio
bintext huffyuv paf_video
pam realtext v308
pbm rl2 v408
pcm_alaw roq v410
pcm_bluray roq_dpcm vb
pcm_dvd rpza vble
pcm_f32be rv10 vc1
pcm_f32le rv20 vc1image
pcm_f64be rv30 vcr1
pcm_f64le rv40 vima
pcm_lxf s302m vmdaudio
pcm_mulaw sami vmdvideo
pcm_s16be sanm vmnc
pcm_s16be_planar sgi vorbis
pcm_s16le sgirle vp3
pcm_s16le_planar shorten vp5
pcm_s24be sipr vp6
pcm_s24daud smackaud vp6a
pcm_s24le smacker vp6f
pcm_s24le_planar smc vp8
pcm_s32be smvjpeg vp9
pcm_s32le snow vplayer
pcm_s32le_planar sol_dpcm vqa
pcm_s8 sonic wavpack
pcm_s8_planar sp5x webp
pcm_u16be srt webvtt
pcm_u16le ssa wmalossless
pcm_u24be subrip wmapro
pcm_u24le subviewer wmav1
pcm_u32be subviewer1 wmav2
pcm_u32le sunrast wmavoice
pcm_u8 svq1 wmv1
pcm_zork svq3 wmv2
pcx tak wmv3
pgm targa wmv3image
pgmyuv targa_y216 wnv1
pgssub text ws_snd1
pictor theora xan_dpcm
pjs thp xan_wc3
png tiertexseqvideo xan_wc4
ppm tiff xbin
prores tmv xbm
prores_lgpl truehd xface
ptx truemotion1 xl
qcelp truemotion2 xsub
qdm2 truespeech xwd
qdraw tscc y41p
qpeg tscc2 yop
qtrle tta yuv4
r10k twinvq zero12v
r210 txd zerocodec
ra_144 ulti zlib
ra_288 utvideo zmbv
ralf v210
rawvideo v210x
Enabled encoders:
a64multi ljpeg prores
a64multi5 mjpeg prores_aw
aac movtext prores_ks
ac3 mp2 qtrle
ac3_fixed mp2fixed r10k
adpcm_adx mpeg1video r210
adpcm_g722 mpeg2video ra_144
adpcm_g726 mpeg4 rawvideo
adpcm_ima_qt msmpeg4v2 roq
adpcm_ima_wav msmpeg4v3 roq_dpcm
adpcm_ms msvideo1 rv10
adpcm_swf nellymoser rv20
adpcm_yamaha pam s302m
alac pbm sgi
amv pcm_alaw snow
ass pcm_f32be sonic
asv1 pcm_f32le sonic_ls
asv2 pcm_f64be srt
avrp pcm_f64le ssa
avui pcm_mulaw subrip
ayuv pcm_s16be sunrast
bmp pcm_s16be_planar svq1
cljr pcm_s16le targa
comfortnoise pcm_s16le_planar tiff
dca pcm_s24be tta
dnxhd pcm_s24daud utvideo
dpx pcm_s24le v210
dvbsub pcm_s24le_planar v308
dvdsub pcm_s32be v408
dvvideo pcm_s32le v410
eac3 pcm_s32le_planar vorbis
ffv1 pcm_s8 wavpack
ffvhuff pcm_s8_planar wmav1
flac pcm_u16be wmav2
flashsv pcm_u16le wmv1
flashsv2 pcm_u24be wmv2
flv pcm_u24le xbm
g723_1 pcm_u32be xface
gif pcm_u32le xsub
h261 pcm_u8 xwd
h263 pcx y41p
h263p pgm yuv4
huffyuv pgmyuv zlib
jpeg2000 png zmbv
jpegls ppm
Enabled hwaccels:
Enabled parsers:
aac dvd_nav mpegvideo
aac_latm dvdsub png
ac3 flac pnm
adx gsm rv30
bmp h261 rv40
cavsvideo h263 tak
cook h264 vc1
dca hevc vorbis
dirac mjpeg vp3
dnxhd mlp vp8
dpx mpeg4video vp9
dvbsub mpegaudio
Enabled demuxers:
aac hevc pcm_s32le
ac3 hls pcm_s8
act hnm pcm_u16be
adf ico pcm_u16le
adp idcin pcm_u24be
adx idf pcm_u24le
aea iff pcm_u32be
afc ilbc pcm_u32le
aiff image2 pcm_u8
amr image2pipe pjs
anm ingenient pmp
apc ipmovie pva
ape ircam pvf
aqtitle iss qcp
asf iv8 r3d
ass ivf rawvideo
ast jacosub realtext
au jv redspark
avi latm rl2
avr lmlm4 rm
avs loas roq
bethsoftvid lvf rpl
bfi lxf rsd
bink m4v rso
bintext matroska rtp
bit mgsts rtsp
bmv microdvd sami
boa mjpeg sap
brstm mlp sbg
c93 mm sdp
caf mmf segafilm
cavsvideo mov shorten
cdg mp3 siff
cdxl mpc smacker
concat mpc8 smjpeg
data mpegps smush
daud mpegts sol
dfa mpegtsraw sox
dirac mpegvideo spdif
dnxhd mpl2 srt
dsicin mpsub str
dts msnwc_tcp subviewer
dtshd mtv subviewer1
dv mv swf
dxa mvi tak
ea mxf tedcaptions
ea_cdata mxg thp
eac3 nc tiertexseq
epaf nistsphere tmv
ffm nsv truehd
ffmetadata nut tta
filmstrip nuv tty
flac ogg txd
flic oma vc1
flv paf vc1t
fourxm pcm_alaw vivo
frm pcm_f32be vmd
g722 pcm_f32le vobsub
g723_1 pcm_f64be voc
g729 pcm_f64le vplayer
gif pcm_mulaw vqf
gsm pcm_s16be w64
gxf pcm_s16le wav
h261 pcm_s24be wc3
h263 pcm_s24le webvtt
h264 pcm_s32be wsaud
wsvqa xa xwma
wtv xbin yop
wv xmv yuv4mpegpipe
Enabled muxers:
a64 image2pipe pcm_s24be
ac3 ipod pcm_s24le
adts ircam pcm_s32be
adx ismv pcm_s32le
aiff ivf pcm_s8
amr jacosub pcm_u16be
asf latm pcm_u16le
asf_stream m4v pcm_u24be
ass matroska pcm_u24le
ast matroska_audio pcm_u32be
au md5 pcm_u32le
avi microdvd pcm_u8
avm2 mjpeg psp
bit mkvtimestamp_v2 rawvideo
caf mlp rm
cavsvideo mmf roq
crc mov rso
data mp2 rtp
daud mp3 rtsp
dirac mp4 sap
dnxhd mpeg1system segment
dts mpeg1vcd smjpeg
dv mpeg1video smoothstreaming
eac3 mpeg2dvd sox
f4v mpeg2svcd spdif
ffm mpeg2video speex
ffmetadata mpeg2vob srt
filmstrip mpegts stream_segment
flac mpjpeg swf
flv mxf tee
framecrc mxf_d10 tg2
framemd5 null tgp
g722 nut truehd
g723_1 ogg vc1
gif oma vc1t
gxf opus voc
h261 pcm_alaw w64
h263 pcm_f32be wav
h264 pcm_f32le webm
hds pcm_f64be webvtt
hls pcm_f64le wtv
ico pcm_mulaw wv
ilbc pcm_s16be yuv4mpegpipe
image2 pcm_s16le
Enabled protocols:
cache hls rtmpt
concat http rtp
crypto httpproxy srtp
data md5 tcp
ffrtmphttp mmsh udp
file mmst unix
ftp pipe
gopher rtmp
Enabled filters:
aconvert colorchannelmixer null
adelay compand nullsink
aecho concat nullsrc
aeval copy overlay
aevalsrc crop pad
afade curves pan
aformat dctdnoiz perms
ainterleave decimate pixdesctest
allpass deshake psnr
alphaextract drawbox removelogo
alphamerge drawgrid replaygain
amerge earwax rgbtestsrc
amix edgedetect rotate
amovie elbg scale
anull equalizer select
anullsink extractplanes sendcmd
anullsrc fade separatefields
apad field setdar
aperms fieldmatch setfield
aphaser fieldorder setpts
aresample format setsar
aselect fps settb
asendcmd framestep showinfo
asetnsamples gradfun showspectrum
asetpts haldclut showwaves
asetrate haldclutsrc silencedetect
asettb hflip sine
ashowinfo highpass smptebars
asplit histogram smptehdbars
astats hue split
astreamsync idet swapuv
atempo il telecine
atrim interleave testsrc
avectorscope join thumbnail
bandpass life tile
bandreject lowpass transpose
bass lut treble
bbox lut3d trim
biquad lutrgb unsharp
blackdetect lutyuv vflip
blend mandelbrot vignette
cellauto mergeplanes volume
channelmap movie volumedetect
channelsplit negate w3fdif
color noformat
colorbalance noise
Enabled bsfs:
aac_adtstoasc imx_dump_header mp3_header_decompress
chomp mjpeg2jpeg noise
dump_extradata mjpega_dump_header remove_extradata
h264_mp4toannexb mov2textsub text2movsub
Enabled indevs:
dv1394 lavfi
fbdev v4l2
Enabled outdevs:
fbdev v4l2
License: LGPL version 2.1 or later