
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 (29)
-
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (3928)
-
FFmpeg make : *** [libavdevice/avfoundation.o] Error 1
29 décembre 2014, par Althen Lim Zi XuanI’m very new (1 weeks ago) to Mac OS environment and I have to create a iPhone apps using FFmpeg (I’m new to this, too !). This is what I’ve done to import FFmpeg library.
First, here’s the environment :
OS: Mac OS X 10.7.5
Xcode: 4.5
FFmpeg: 2.5 (Latest update of 04/12/2014)So I download from FFmpeg.org using command :
git clone git://source.ffmpeg.org/ffmpeg.git ~/ffmpeg
and create the folder in it :
cd ffmpeg
mkdir i386
mkdir armv7
mkdir armv7s
mkdir -p universal/libI download the gas-preprocessor.pl from yuvi and copied into /usr/bin and /usr/local/bin with READ/WRITE access for all.
However, I do encounter the error as title mentions during the making process of armv7 and armv7s which appear like this :
make: *** [libavdevice/avfoundation.o] Error 1
Can anyone teach me how to deal with it ? Here’s my configuration.
For i386 : (Compilation success and I saw files and folder in i386 folder)
./configure --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc" --as="/usr/local/bin/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2" --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk" --target-os=darwin --arch=i386 --cpu=i386 --extra-cflags="-arch i386" --extra-ldflags="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk"--prefix=compiled/i386 --enable-cross-compile --enable-nonfree --enable-gpl --disable-armv5te --disable-swscale-alpha --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-debug
For armv7 :
./configure --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as="/usr/local/bin/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2" --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk --target-os=darwin --arch=arm --cpu=cortex-a8 --extra-cflags="-arch armv7" --extra-ldflags="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk" --prefix=compiled/armv7 --enable-cross-compile --enable-nonfree --enable-gpl --disable-armv5te --disable-swscale-alpha --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-debug
and for armv7s :
./configure --prefix=armv7s --as="/usr/local/bin/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2" --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" --extra-cflags="-arch armv7s -mfpu=neon -miphoneos-version-min=6.0" --extra-ldflags="-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=6.0" --arch=arm --cpu=cortex-a9 --enable-pic
If any necessary information needed please do inform me and I will upload it A.S.A.P. Any help, comment, guideline are highly appreciated. Thanks !
Updated :
This is the error I received during the making process. I have no idea but hope that it helps in configuring out problem :CC libavdevice/alldevices.o
CC libavdevice/avdevice.o
CC libavdevice/avfoundation.o
libavdevice/avfoundation.m:44: error: initializer element is not constant
libavdevice/avfoundation.m:44: error: (near initialization for ‘avf_time_base_q.den’)
libavdevice/avfoundation.m:74:5: warning: "__MAC_OS_X_VERSION_MIN_REQUIRED" is not defined
libavdevice/avfoundation.m: In function ‘add_video_device’:
libavdevice/avfoundation.m:300: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:355: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:364: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m: In function ‘add_audio_device’:
libavdevice/avfoundation.m:407: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m: In function ‘get_video_config’:
libavdevice/avfoundation.m:432: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:442: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m: In function ‘get_audio_config’:
libavdevice/avfoundation.m:470: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:480: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m: In function ‘avf_read_header’:
libavdevice/avfoundation.m:534: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:539:5: warning: "__MAC_OS_X_VERSION_MIN_REQUIRED" is not defined
libavdevice/avfoundation.m:546: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:554:5: warning: "__MAC_OS_X_VERSION_MIN_REQUIRED" is not defined
libavdevice/avfoundation.m:575: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:596:5: warning: "__MAC_OS_X_VERSION_MIN_REQUIRED" is not defined
libavdevice/avfoundation.m:619:5: warning: "__MAC_OS_X_VERSION_MIN_REQUIRED" is not defined
libavdevice/avfoundation.m: In function ‘avf_read_packet’:
libavdevice/avfoundation.m:724: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:739: warning: ISO C90 forbids mixed declarations and code
libavdevice/avfoundation.m:776: warning: ISO C90 forbids mixed declarations and code
make: *** [libavdevice/avfoundation.o] Error 1 -
video not playing on iOS safari
21 octobre 2020, par Dean Van GreunenThis video plays perfectly on Chrome Desktop and Android Chrome, on the latest releases.


However it won't work on an iPad and an iPhone.




also here is the file info.




-
x264 encoding severe quality loss
1er septembre 2020, par SolskGaerI used this repo to encode a mjpeg stream to a h264 one, but the output is not so good. The stream is a series of screenshot of an iPhone. In the output stream, even the lines between two items in the settings app are gone. How do I improve the output stream quality ?
Here is the code snippet that x264-go use to init an encoder


func NewEncoder(w io.Writer, opts *Options) (e *Encoder, err error) {
 e = &Encoder{}

 e.w = w
 e.pts = 0
 e.opts = opts

 e.csp = x264c.CspI420

 e.nals = make([]*x264c.Nal, 3)
 e.img = NewYCbCr(image.Rect(0, 0, e.opts.Width, e.opts.Height))

 param := x264c.Param{}

 if e.opts.Preset != "" && e.opts.Profile != "" {
 ret := x264c.ParamDefaultPreset(&param, e.opts.Preset, e.opts.Tune)
 if ret < 0 {
 err = fmt.Errorf("x264: invalid preset/tune name")
 return
 }
 } else {
 x264c.ParamDefault(&param)
 }

 param.IWidth = int32(e.opts.Width)
 param.IHeight = int32(e.opts.Height)

 param.ICsp = e.csp
 param.BVfrInput = 0
 param.BRepeatHeaders = 1
 param.BAnnexb = 1

 param.ILogLevel = e.opts.LogLevel

 if e.opts.FrameRate > 0 {
 param.IFpsNum = uint32(e.opts.FrameRate)
 param.IFpsDen = 1

 param.IKeyintMax = int32(e.opts.FrameRate)
 param.BIntraRefresh = 1
 }

 if e.opts.Profile != "" {
 ret := x264c.ParamApplyProfile(&param, e.opts.Profile)
 if ret < 0 {
 err = fmt.Errorf("x264: invalid profile name")
 return
 }
 }

 // Allocate on create instead while encoding
 var picIn x264c.Picture
 ret := x264c.PictureAlloc(&picIn, e.csp, int32(e.opts.Width), int32(e.opts.Height))
 if ret < 0 {
 err = fmt.Errorf("x264: cannot allocate picture")
 return
 }
 e.picIn = picIn
 defer func() {
 // Cleanup if intialization fail
 if err != nil {
 x264c.PictureClean(&picIn)
 }
 }()

 e.e = x264c.EncoderOpen(&param)
 if e.e == nil {
 err = fmt.Errorf("x264: cannot open the encoder")
 return
 }

 ret = x264c.EncoderHeaders(e.e, e.nals, &e.nnals)
 if ret < 0 {
 err = fmt.Errorf("x264: cannot encode headers")
 return
 }

 if ret > 0 {
 b := C.GoBytes(e.nals[0].PPayload, C.int(ret))
 n, er := e.w.Write(b)
 if er != nil {
 err = er
 return
 }

 if int(ret) != n {
 err = fmt.Errorf("x264: error writing headers, size=%d, n=%d", ret, n)
 }
 }

 return
}



and the encoder option is defined as


opts := &x264.Options{
 Width: int(width)/2*2,
 Height: int(height)/2*2,
 FrameRate: 15,
 Tune: "zerolatency",
 Preset: "medium",
 Profile: "baseline",
 LogLevel: x264.LogNone,
 }



And I also used ffmpeg(though the api is pretty old)


package screencast

import (

 /*
 #include 
 #include 
 #include 
 #include 
 #include <libavcodec></libavcodec>avcodec.h>
 #include <libavformat></libavformat>avformat.h>
 #include <libavutil></libavutil>avutil.h>
 #include <libavutil></libavutil>opt.h>
 #include <libavutil></libavutil>channel_layout.h>
 #include <libavutil></libavutil>common.h>
 #include <libavutil></libavutil>imgutils.h>
 #include <libavutil></libavutil>mathematics.h>
 #include <libavutil></libavutil>samplefmt.h>

 typedef struct {
 int w, h;
 int pixfmt;
 char *preset[2];
 char *profile;
 int bitrate;
 int got;
 AVCodec *c;
 AVCodecContext *ctx;
 AVFrame *f;
 AVPacket pkt;
 } h264enc_t;

 static int h264enc_new(h264enc_t *m) {
 m->c = avcodec_find_encoder(AV_CODEC_ID_H264);
 m->ctx = avcodec_alloc_context3(m->c);
 m->ctx->width = m->w;
 m->ctx->height = m->h;
 m->ctx->pix_fmt = m->pixfmt;
 m->ctx->time_base = (AVRational){1,10};
 av_opt_set(m->ctx->priv_data, "preset", "slow", 0);
 av_opt_set(m->ctx->priv_data, "tune", "zerolatency", 0);
 av_opt_set(m->ctx->priv_data, "profile", "baseline", 0);
 av_opt_set(m->ctx->priv_data, "crf", "18.0.", 0);
 m->f = av_frame_alloc();
 m->f->format = m->ctx->pix_fmt;
 m->f->width = m->ctx->width;
 m->f->height = m->ctx->height;
 avcodec_open2(m->ctx, m->c, NULL);
 return av_image_alloc(m->f->data, m->f->linesize, m->ctx->width, m->ctx->height, m->ctx->pix_fmt, 32);
 }

 */
 "C"
 "errors"
 "image"
 "unsafe"
 //"log"
)

type H264Encoder struct {
 m C.h264enc_t
 Header []byte
 Pixfmt image.YCbCrSubsampleRatio
 W, H int
 pts int
}

func NewH264Encoder(w, h int) (m *H264Encoder, err error) {
 m = &H264Encoder{}
 m.m.w = (C.int)(w)
 m.m.h = (C.int)(h)
 m.W = w
 m.H = h
 m.Pixfmt = image.YCbCrSubsampleRatio420
 m.m.pixfmt = C.AV_PIX_FMT_YUV420P
 r := C.h264enc_new(&m.m)
 if int(r) < 0 {
 err = errors.New("open encoder failed")
 return
 }
 return
}

func (m *H264Encoder) Encode(img *image.YCbCr) (data []byte, err error) {
 var f *C.AVFrame
 if img == nil {
 f = nil
 } else {
 if img.SubsampleRatio != m.Pixfmt {
 err = errors.New("image pixfmt not match")
 return
 }
 if img.Rect.Dx() != m.W || img.Rect.Dy() != m.H {
 err = errors.New("image size not match")
 return
 }
 f = m.m.f
 f.data[0] = (*C.uint8_t)(unsafe.Pointer(&img.Y[0]))
 f.data[1] = (*C.uint8_t)(unsafe.Pointer(&img.Cb[0]))
 f.data[2] = (*C.uint8_t)(unsafe.Pointer(&img.Cr[0]))
 f.linesize[0] = (C.int)(img.YStride)
 f.linesize[1] = (C.int)(img.CStride)
 f.linesize[2] = (C.int)(img.CStride)
 }

 C.av_init_packet(&m.m.pkt)
 m.m.pkt.data = nil
 m.m.pkt.size = 0
 f.pts = (C.longlong)(m.pts)
 m.pts++
 r := C.avcodec_encode_video2(m.m.ctx, &m.m.pkt, f, &m.m.got)
 defer C.av_packet_unref(&m.m.pkt)
 if int(r) < 0 {
 err = errors.New("encode failed")
 return
 }
 if m.m.got == 0 {
 err = errors.New("no picture")
 return
 }
 if m.m.pkt.size == 0 {
 err = errors.New("packet size == 0")
 return
 }

 data = make([]byte, m.m.pkt.size)
 C.memcpy(
 unsafe.Pointer(&data[0]),
 unsafe.Pointer(m.m.pkt.data),
 (C.size_t)(m.m.pkt.size),
 )
 return data, nil
}



but got the same output. However, when I use the ffmpeg binary, the result was pretty good, so I guess I set wrong parameters, but I don't know which.
Any suggestion would be appreciated. If you have better way to achieve this, I'll appreciate it.


For your information : I must do this using golang.