
Recherche avancée
Autres articles (53)
-
MediaSPIP en mode privé (Intranet)
17 septembre 2013, parÀ partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (4161)
-
Capturing frames from an h264 stream with gst/ffmpeg
13 août 2021, par Yuval.SightecI want to save (as jpegs) or reach the data of the frames streaming from my usb camera.
Meaning that I want to use the h.264 hardware encoding (I running it on nvdia jetson) in order to get a sequence of compressed files (I prefer not save it on the disc and get an array, if possible).
Can I do that ?



So far I tried this :



gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-h264,framerate=30/1,stream-format=byte-stream ! decodebin ! videorate ! video/x-raw,framerate=30/1 ! videoconvert ! jpegenc ! multifilesink location=img_%04d.jpg




but I get an internal data flow error from v4l2src0 element, and an error from gst_base_src_loop() after the pipeline was set to PLAYING.



Can anybody please help me ?



b.t.w- It doesnt have to be neccecerly h.264 encoding, it also can be mpeg encoding or something else : I want to use the fact that it is pictures of a video, frames, in order to get smaller size frames.



Thank you so much !


-
Go / Cgo - How to access a field of a Cstruct - could not make it
15 août 2021, par ChrisGI develope an application in Go for transcode an audio file from one format to another one :


I use the goav library that use Cgo to bind the FFmpeg C-libs :
https://github.com/giorgisio/goav/



The goav library ;
package avformat
has a typedef that cast the original FFmpeg lib C-Struct AVOutputFormat :

type ( 
 OutputFormat C.struct_AVOutputFormat
)



In my code i have a variable called
outputF
of the typeOutputFormat
that is aC.struct_AVOutputFormat
.

The
C
realAVOutputFormat
struct has fields :

name, long_name, mime_type, extensions, audio_codec, video_codec, subtitle_codec,..



and many fields more.


See : https://ffmpeg.org/doxygen/2.6/structAVOutputFormat.html



I verified the situation by
fmt.Println(outputF)
and reached :

{0x7ffff7f23383 0x7ffff7f23907 0x7ffff7f13c33 0x7ffff7f23383 86017 61 0 128 <nil> 0x7ffff7f8cfa0 <nil> 3344 0x7ffff7e3ec10 0x7ffff7e3f410 0x7ffff7e3ecc0 <nil> 0x7ffff7e3dfc0 <nil> <nil> <nil> <nil> <nil> <nil> 0 0x7ffff7e3e070 0x7ffff7e3e020 <nil>}
</nil></nil></nil></nil></nil></nil></nil></nil></nil></nil>


The audio codec field is on position
5
and contains86017


I verified the field name by using the package
reflect
:

val := reflect.Indirect(reflect.ValueOf(outputF))
fmt.Println(val)
fmt.Println("Fieldname: ", val.Type().Field(4).Name)

Output:
Fieldname: audio_codec




I try to access the field
audio_codec
of the originalAVOutputFormat
using :

fmt.Println(outputF.audio_codec)
ERROR: outputF.audio_codec undefined (cannot refer to unexported field or method audio_codec)


fmt.Println(outputF._audio_codec)
ERROR: outputF._audio_codec undefined (type *avformat.OutputFormat has no field or method _audio_codec)





As i read in the Cgo documentation :
Within the Go file, C's struct field names that are keywords in Go can be accessed by prefixing them with an underscore : if x points at a C struct with a field named "type", x._type accesses the field. C struct fields that cannot be expressed in Go, such as bit fields or misaligned data, are omitted in the Go struct, replaced by appropriate padding to reach the next field or the end of the struct.




But I have no idea what im doing wrong.


Edit :
Okay for sure no underscore is required as audio_codec is not a keyword in Go. This i understood for now. But still there is the question why im not able to access the CStruct field "audio_codec".


-
Go / Cgo - How to access a field of a Cstruct ?
17 août 2021, par ChrisGI develope an application in Go for transcode an audio file from one format to another one :


I use the goav library that use Cgo to bind the FFmpeg C-libs :
https://github.com/giorgisio/goav/



The goav library ;
package avformat
has a typedef that cast the original FFmpeg lib C-Struct AVOutputFormat :

type ( 
 OutputFormat C.struct_AVOutputFormat
)



In my code i have a variable called
outputF
of the typeOutputFormat
that is aC.struct_AVOutputFormat
.

The
C
realAVOutputFormat
struct has fields :

name, long_name, mime_type, extensions, audio_codec, video_codec, subtitle_codec,..



and many fields more.


See : https://ffmpeg.org/doxygen/2.6/structAVOutputFormat.html



I verified the situation by
fmt.Println(outputF)
and reached :

{0x7ffff7f23383 0x7ffff7f23907 0x7ffff7f13c33 0x7ffff7f23383 86017 61 0 128 <nil> 0x7ffff7f8cfa0 <nil> 3344 0x7ffff7e3ec10 0x7ffff7e3f410 0x7ffff7e3ecc0 <nil> 0x7ffff7e3dfc0 <nil> <nil> <nil> <nil> <nil> <nil> 0 0x7ffff7e3e070 0x7ffff7e3e020 <nil>}
</nil></nil></nil></nil></nil></nil></nil></nil></nil></nil>


The audio codec field is on position
5
and contains86017


I verified the field name by using the package
reflect
:

val := reflect.Indirect(reflect.ValueOf(outputF))
fmt.Println(val)
fmt.Println("Fieldname: ", val.Type().Field(4).Name)

Output:
Fieldname: audio_codec




I try to access the field
audio_codec
of the originalAVOutputFormat
using :

fmt.Println(outputF.audio_codec)
ERROR: outputF.audio_codec undefined (cannot refer to unexported field or method audio_codec)


fmt.Println(outputF._audio_codec)
ERROR: outputF._audio_codec undefined (type *avformat.OutputFormat has no field or method _audio_codec)





As i read in the Cgo documentation :
Within the Go file, C's struct field names that are keywords in Go can be accessed by prefixing them with an underscore : if x points at a C struct with a field named "type", x._type accesses the field. C struct fields that cannot be expressed in Go, such as bit fields or misaligned data, are omitted in the Go struct, replaced by appropriate padding to reach the next field or the end of the struct.




But I have no idea what im doing wrong.


Edit :
Okay for sure no underscore is required as audio_codec is not a keyword in Go. This i understood for now. But still there is the question why im not able to access the CStruct field "audio_codec".