
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (73)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (8281)
-
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".


-
FFmpeg HLS streaming - Why the program date time of older segment changing when re-streaming after discontinuity
9 novembre 2020, par Suriya KrishFollowing is the ffmpeg command to stream the data.


ffmpeg -re -f avfoundation 
-framerate 30 -i 0 
-codec:v h264_videotoolbox -x264-params keyint=120:scenecut=0 
-codec:a copy -f hls 
-hls_list_size 60 
-hls_time 10 
-hls_flags delete_segments 
-hls_flags +append_list 
-hls_flags +discont_start 
-hls_flags +program_date_time 
-strftime 1 
-strftime_mkdir 1 
-hls_segment_filename 
'%Y%m%dT%H%M%S%z.ts' playlist.m3u8



Following is the playlist.m3u8 content which generated for few seconds.


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-DISCONTINUITY
#EXT-X-DISCONTINUITY
#EXTINF:10.000000,
#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:07:53.000+0530
20201109T220753+0530.ts
#EXTINF:10.000000,
#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:08:03.000+0530
20201109T220803+0530.ts
#EXT-X-ENDLIST



When the re-stream happens(in case of restarting the streaming service), the program date time of older segments(before #EXT-X-DISCONTINUITY) also get changed like below, which is unexpected.


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-DISCONTINUITY
#EXT-X-DISCONTINUITY
#EXTINF:10.000000,
#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:12:50.633+0530
20201109T220753+0530.ts
#EXTINF:10.000000,
#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:13:00.633+0530
20201109T220803+0530.ts
#EXT-X-DISCONTINUITY
#EXTINF:10.000000,
#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:13:12.000+0530
20201109T221312+0530.ts
#EXTINF:5.400000,
#EXT-X-PROGRAM-DATE-TIME:2020-11-09T22:13:22.000+0530
20201109T221322+0530.ts
#EXT-X-ENDLIST



Why the program date time of older segment should change ? Should we add any arguments in ffmpeg command to handle this ?


-
how too download this link with ffmpeg
27 décembre 2020, par Behrad kabirii want download video with this command in ffmpeg :


ffmpeg -i https://msx.namava.ir/hvod/2020/12/e9936676-eea2-44bd-b17b-dc5e58fd000d/v_854.mp4/index-v1-a1.m3u8?x=EgvsRR7zZLXNoaz49v4D05BwcjHwPaNSOtkB9y98QGOIB_EyAhV_hc44Z4McLT_FTwzBWxpaK1WlNgSBkLd415LU1jRGz0yFNhciw_SDSwgj6OlAQCARiRIb9UU8XMh_dMXKr4KncBfgwnYLMOlUn6zfSa3ltot63vKiuw0CUpU1 -vcodec copy output.mp4


but recive this eror :


[https @ 00000242dbcfeec0] HTTP error 420
https://msx.namava.ir/hvod/2020/12/e9936676-eea2-44bd-b17b-dc5e58fd000d/v_854.mp4/index-v1-a1.m3u8?x=EgvsRR7zZLXNoaz49v4D05BwcjHwPaNSOtkB9y98QGOIB_EyAhV_hc44Z4McLT_FTwzBWxpaK1WlNgSBkLd415LU1jRGz0yFNhciw_SDSwgj6OlAQCARiRIb9UU8XMh_dMXKr4KncBfgwnYLMOlUn6zfSa3ltot63vKiuw0CUpU1 : Server returned 4XX Client Error, but not one of 400,1,3,4


please help me