
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (41)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)
Sur d’autres sites (4952)
-
Using GStreamer to receive and send h264 video (from OBS)
16 mars 2020, par IvoriusI’ve been trying to set up using GStreamer to get support for some input I can output from OBS.
OBS : rtp_mpegts to udp ://localhost:5000
http-launch 8080 webmmux streamable=true name=stream udpsrc uri=udp://localhost:5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T-ES, payload=(int)
33" ! gstrtpjitterbuffer latency=200 ! application/x-rtp ! rtpmp2tdepay ! video/mpegts ! mpegtsdemux ! video/x-h264 ! queue ! decodebin ! vp8enc ! stream. audiotestsrc ! vorbisenc ! stream.However, using this it seems to accept connections, but just closes them again after a while. Any clues on what I am doing wrong ? I am open to any format changes as long as they’re supported by OBS / ffmpeg.
As a bonus, how do I add support for audio as well ?
Background
I’ve found https://github.com/sdroege/http-launch, which works well in displaying a GStreamer video over http:
<video autoplay="autoplay" controls="">
<source src="https://localhost:8080" type="video/mp4" codecs="avc1.4D401E, mp4a.40.2">
You browser doesn't support element <code>video.
I’ve managed to set up a pipeline where I can use a GStreamer source to pipe into a http-launch
pipeline and display it on video :http-launch 8080 webmmux streamable=true name=stream udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! mpegtsdemu
x ! h264parse ! TIViddec2 ! videoconvert ! vp8enc ! stream. audiotestsrc ! vorbisenc ! stream.
gst-launch-1.0 -v videotestsrc ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000However, I don’t think OBS supports rpt over UDP. It uses ffmpeg to send these packets, which can stream rtp_mpegts. I’ve found some code snippets which claim to support the format, and stitch together the above pipeline.
-
Rotating a video during encoding with ffmpeg and libav API results in half of video corrupted
11 mai 2020, par Daniel KobeI'm using the C API for ffmpeg/libav to rotate a vertically filmed iphone video during the encoding step. There are other questions asking to do a similar thing but they are all using the CLI tool to do so.



So far I was able to figure out how to use the
AVFilter
to rotate the video, base off this example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/filtering_video.c


The problem is that half the output file is corrupt.




Here is the code for my encoding logic. Its written with GOLANG using CGO to interface with the C API.



// Encode encode an AVFrame and return it
func Encode(enc Encoder, frame *C.AVFrame) (*EncodedFrame, error) {
 ctx := enc.Context()

 if ctx.buffersrcctx == nil {
 // initialize filter
 outputs := C.avfilter_inout_alloc()
 inputs := C.avfilter_inout_alloc()
 m_pFilterGraph := C.avfilter_graph_alloc()
 buffersrc := C.avfilter_get_by_name(C.CString("buffer"))
 argsStr := fmt.Sprintf("video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", ctx.avctx.width, ctx.avctx.height, ctx.avctx.pix_fmt, ctx.avctx.time_base.num, ctx.avctx.time_base.den, ctx.avctx.sample_aspect_ratio.num, ctx.avctx.sample_aspect_ratio.den)
 Log.Info.Println("yakotest")
 Log.Info.Println(argsStr)
 args := C.CString(argsStr)
 ret := C.avfilter_graph_create_filter(&ctx.buffersrcctx, buffersrc, C.CString("my_buffersrc"), args, nil, m_pFilterGraph)
 if ret < 0 {
 Log.Info.Printf("\n problem creating filter %v\n", AVError(ret).Error())
 }

 buffersink := C.avfilter_get_by_name(C.CString("buffersink"))
 ret = C.avfilter_graph_create_filter(&ctx.buffersinkctx, buffersink, C.CString("my_buffersink"), nil, nil, m_pFilterGraph)
 if ret < 0 {
 Log.Info.Printf("\n problem creating filter %v\n", AVError(ret).Error())
 }

 /*
 * Set the endpoints for the filter graph. The filter_graph will
 * be linked to the graph described by filters_descr.
 */

 /*
 * The buffer source output must be connected to the input pad of
 * the first filter described by filters_descr; since the first
 * filter input label is not specified, it is set to "in" by
 * default.
 */
 outputs.name = C.av_strdup(C.CString("in"))
 outputs.filter_ctx = ctx.buffersrcctx
 outputs.pad_idx = 0
 outputs.next = nil

 /*
 * The buffer sink input must be connected to the output pad of
 * the last filter described by filters_descr; since the last
 * filter output label is not specified, it is set to "out" by
 * default.
 */
 inputs.name = C.av_strdup(C.CString("out"))
 inputs.filter_ctx = ctx.buffersinkctx
 inputs.pad_idx = 0
 inputs.next = nil

 ret = C.avfilter_graph_parse_ptr(m_pFilterGraph, C.CString("transpose=clock,scale=-2:1080"),
 &inputs, &outputs, nil)
 if ret < 0 {
 Log.Info.Printf("\n problem with avfilter_graph_parse %v\n", AVError(ret).Error())
 }

 ret = C.avfilter_graph_config(m_pFilterGraph, nil)
 if ret < 0 {
 Log.Info.Printf("\n problem with graph config %v\n", AVError(ret).Error())
 }
 }

 filteredFrame := C.av_frame_alloc()

 /* push the decoded frame into the filtergraph */
 ret := C.av_buffersrc_add_frame_flags(ctx.buffersrcctx, frame, C.AV_BUFFERSRC_FLAG_KEEP_REF)
 if ret < 0 {
 Log.Error.Printf("\nError while feeding the filter greaph, err = %v\n", AVError(ret).Error())
 return nil, errors.New(ErrorFFmpegCodecFailure)
 }

 /* pull filtered frames from the filtergraph */
 for {
 ret = C.av_buffersink_get_frame(ctx.buffersinkctx, filteredFrame)
 if ret == C.AVERROR_EAGAIN || ret == C.AVERROR_EOF {
 break
 }
 if ret < 0 {
 Log.Error.Printf("\nCouldnt find a frame, err = %v\n", AVError(ret).Error())
 return nil, errors.New(ErrorFFmpegCodecFailure)
 }

 filteredFrame.pts = frame.pts
 frame = filteredFrame
 defer C.av_frame_free(&filteredFrame)
 }

 if frame != nil {
 frame.pict_type = 0 // reset pict type for the encoder
 if C.avcodec_send_frame(ctx.avctx, frame) != 0 {
 Log.Error.Printf("%+v\n", StackErrorf("codec error, could not send frame"))
 return nil, errors.New(ErrorFFmpegCodecFailure)
 }
 }

 for {
 ret := C.avcodec_receive_packet(ctx.avctx, ctx.pkt)
 if ret == C.AVERROR_EAGAIN {
 break
 }
 if ret == C.AVERROR_EOF {
 return nil, fmt.Errorf("EOF")
 }
 if ret < 0 {
 Log.Error.Printf("%+v\n", StackErrorf("codec error, receiving packet"))
 return nil, errors.New(ErrorFFmpegCodecFailure)
 }

 data := C.GoBytes(unsafe.Pointer(ctx.pkt.data), ctx.pkt.size)
 return &EncodedFrame{data, int64(ctx.pkt.pts), int64(ctx.pkt.dts),
 (ctx.pkt.flags & C.AV_PKT_FLAG_KEY) != 0}, nil
 }

 return nil, nil
}




It seems like I need to do something with the scaling here but I'm struggling to find helpful information online.


-
VLC stops video before the end of video encoded with h264
12 mai 2020, par user2342558VLC stops video before the end of video and prints this in terminal :



[h264 @ 0x7ff318ce36c0] co located POCs unavailable
[h264 @ 0x7ff318ce36c0] mmco: unref short failure
[h264 @ 0x7ff318c7f0c0] co located POCs unavailable
[h264 @ 0x7ff318c9da60] mmco: unref short failure
[h264 @ 0x7ff318ce36c0] co located POCs unavailable
[h264 @ 0x7ff318cff780] mmco: unref short failure
[h264 @ 0x7ff318d37b00] co located POCs unavailable
[h264 @ 0x7ff318c7f0c0] co located POCs unavailable
[h264 @ 0x7ff318c9da60] mmco: unref short failure
[h264 @ 0x7ff318cff780] co located POCs unavailable
[h264 @ 0x7ff318d37b00] co located POCs unavailable
[h264 @ 0x7ff318c7f0c0] mmco: unref short failure
[h264 @ 0x7ff318ce36c0] co located POCs unavailable
[h264 @ 0x7ff318d1b900] co located POCs unavailable
[h264 @ 0x7ff318d37b00] mmco: unref short failure
[h264 @ 0x7ff318cff780] mmco: unref short failure
[h264 @ 0x7ff318d1b900] mmco: unref short failure
[h264 @ 0x7ff318c9da60] co located POCs unavailable
[h264 @ 0x7ff318ce36c0] co located POCs unavailable
[h264 @ 0x7ff318d37b00] mmco: unref short failure
[00007ff318c6a260] main decoder error: Timestamp conversion failed for 24718094: no reference clock
[00007ff318c6a260] main decoder error: Could not convert timestamp 0 for FFmpeg
[00007ff318c6a260] main decoder error: Timestamp conversion failed for 34926677: no reference clock
[00007ff318c6a260] main decoder error: Could not convert timestamp 0 for FFmpeg
[00007ff318c6a260] main decoder error: Timestamp conversion failed for 45796649: no reference clock
[00007ff318c6a260] main decoder error: Could not convert timestamp 0 for FFmpeg
[h264 @ 0x7ff318d1b900] co located POCs unavailable
[h264 @ 0x7ff318d37b00] mmco: unref short failure
[h264 @ 0x7ff318d37b00] co located POCs unavailable
[h264 @ 0x7ff318c7f0c0] mmco: unref short failure
[h264 @ 0x7ff318ce36c0] co located POCs unavailable
[h264 @ 0x7ff318cff780] mmco: unref short failure
[h264 @ 0x7ff318d1b900] co located POCs unavailable
[h264 @ 0x7ff318d37b00] mmco: unref short failure
[00007ff318c6a260] main decoder error: buffer deadlock prevented




I created the video file converting the original video with this command :



ffmpeg -i video.mp4 -b 1000000 video_mod.mp4




The same file is played correctly using Firefox.



I converted other video files with that command and Vlc can play them entirely.



How to solve this error ?



Thanks in advance !