
Recherche avancée
Médias (1)
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (100)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (8464)
-
Using libavcodec to read .mkv video file
10 mars 2020, par SlavTrying to read .mkv file and write it to .bmp, but resulting .bmp is black-and-white and consists of multiple mini-images of what supposed to be written :
int main()
{
av_register_all();
avformat_network_init();
avfilter_register_all();
//crashes on -Ofast without =NULL initialization:
AVFormatContext * format = NULL;
if ( avformat_open_input( & format, VIDEO_FILE, NULL, NULL ) != 0 ) {
cerr << "Could not open file " << VIDEO_FILE << endl;
return -1;
}
// Retrieve stream information
if ( avformat_find_stream_info( format, NULL ) < 0) {
cerr << "avformat_find_stream_info() failed." << endl;
return -1;
}
av_dump_format( format, 0, VIDEO_FILE, false );
AVCodec * video_dec = (AVCodec*)1;
AVCodec * audio_dec = (AVCodec*)1;
const auto video_stream_index = av_find_best_stream( format, AVMEDIA_TYPE_VIDEO, -1, -1, & video_dec, 0 );
const auto audio_stream_index = av_find_best_stream( format, AVMEDIA_TYPE_AUDIO, -1, -1, & audio_dec, 0 );
if ( video_stream_index < 0 ) {
cerr << "Failed to find video stream." << endl;
return -1;
}
if ( audio_stream_index < 0 ) {
cerr << "Failed to find audio stream." << endl;
return -1;
}
AVCodecParameters * videoParams = format->streams[ video_stream_index ]->codecpar;
cout << "Having " << videoParams->width << " | " << videoParams->height << " video." << endl;
av_read_play( format );
// create decoding context
AVCodecContext * video_ctx = avcodec_alloc_context3( video_dec );
AVCodecContext * audio_ctx = avcodec_alloc_context3( audio_dec );
if ( ! video_ctx || ! audio_ctx ) {
cerr << "Failed to avcodec_alloc_context3()" << endl;
return -1;
}
if ( video_dec->capabilities & AV_CODEC_CAP_TRUNCATED ) video_ctx->flags |= AV_CODEC_FLAG_TRUNCATED; // we do not send complete frames
/* For some codecs, such as msmpeg4 and mpeg4, width and height
MUST be initialized there because this information is not
available in the bitstream. */
avcodec_parameters_to_context( video_ctx, format->streams[ video_stream_index ]->codecpar );
avcodec_parameters_to_context( audio_ctx, format->streams[ audio_stream_index ]->codecpar );
if ( avcodec_open2( video_ctx, video_dec, NULL ) < 0 ) {
cout << "Failed to open video decoder." << endl;
return -1;
}
if ( avcodec_open2( audio_ctx, audio_dec, NULL ) < 0 ) {
cout << "Failed to open audio decoder." << endl;
return -1;
}
uint8_t* picture_buffer = (uint8_t*) (av_malloc( avpicture_get_size( AV_PIX_FMT_RGB24 , videoParams->width, videoParams->height ) ));
AVFrame* picture = av_frame_alloc();
avpicture_fill( (AVPicture *) picture, picture_buffer, AV_PIX_FMT_RGB24, video_ctx->width, video_ctx->height );
AVPacket packet;
av_init_packet( & packet );
int cnt = 0;
while ( av_read_frame( format, & packet ) >= 0 && cnt < 10 ) {
if ( packet.stream_index == video_stream_index ) {
int check;
const auto result = avcodec_decode_video2( video_ctx, picture, & check, & packet );
cout << "Bytes decoded " << result << " check " << check << endl;
std::string name = "debug/av/";
name += std::to_string( cnt ) + ".bmp";
cout << "Writing frame " << name << " with linesize " << picture->linesize[0] << " ..." << endl;
write_bmp( (uint8_t*) picture->data, videoParams->width, videoParams->height, name.c_str() );
av_frame_unref( picture );
++ cnt;
}
else if ( packet.stream_index == audio_stream_index ) {
cout << "Sound packet" << endl;
}
av_free_packet( & packet );
av_init_packet( & packet );
}
}How can I fix it ?
-
Anomalie #4495 (Nouveau) : migration 3.2.7 vers 3.3.0
24 mai 2020, par josiane alettotest 1-
j’ai installée en local un site qui était en SPIP 3.2.7 [24473] pour le migrer en SPIP 3.3.0-dev [24578].
fichier mesoptions.php avec- <span class="CodeRay"><span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_IMG_MAX_HEIGHT</span><span class="delimiter">'</span></span>,<span class="integer">1200</span>); <span class="comment">// largeur en pixels</span>
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_IMG_MAX_WIDTH</span><span class="delimiter">'</span></span>, <span class="integer">1024</span>); <span class="comment">// hauteur en pixels</span>
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_IMG_MAX_SIZE</span><span class="delimiter">'</span></span>, <span class="integer">650</span>); <span class="comment">// taille en kilo-octets</span>
- </span>
Des logos de taille superieure a _IMG_MAX_SIZE’, 650 ne sont plus dans IMG Pas non plus dans logo_erreur non plus.
par exemple rubon3 : 1630 × 648 pixels
Plugins :
Adaptive Images 1.9.2 -
Agenda 3.26.0 -
API de vérification 1.8.1 - stable
Centre image 0.10.4 - dev
Couleur de rubrique 2.3.8
Facteur 3.6.2 - stable
Formidable 3.34.3 - stable
Insérer Modèles 1.3.3 - stable
Massicot 0.8.1 -
Mini Calendrier 2.4.1 - stable
oEmbed 2.0.10 - stable
Owl Carousel 1.0.18
Carousel responsive avec support du multi-touch.
Palette 4.0.7
pdf.js 0.6.3
Picto mod avec FontAwesome 2.1.0
Saisies pour formulaires 3.11.1
SPIP Bonux 3.4.6
YAML 2.0.10
test2
Pour mieux voir J’ai recommencé installation /migration en désinstallant le plugin massicot et en le supprimant du repertoire plugin et en mettant dans mes_options.php
define(’_IMG_MAX_HEIGHT’,800) ; // largeur en pixels
define(’_IMG_MAX_WIDTH’, 500) ; // hauteur en pixels
define(’_IMG_MAX_SIZE’, 400) ; // taille en kilo-octetsje constate ; que les logos de taille >400Ko sont présent mais retaillé, rubon3 qui avait 1630 × 648 pixels a maintenant à 500 × 199 pixels 221 ko dans logo/IMG alors qu’il n’ y a pas massicot.
si je supprime ce rubon3 par logo de la rubrique et télécharge l’image originale j’obtiens une image retaillé avec du noir en plus. mais si je clique dessus l’image est retaillée mais ok et elle est bien en 500*199 dans IMG sans le noir.- les images migrées ont bien gardées leurs dimensions*.
test3
je telecharge le logo rubon3 de 1630 × 648 pixels comme un document d’un article —> il est enregistré directement en 500 × 199 pixels 221 ko . Ce mécanisme a changé, en mieux, car dans la version 3.2 j’avais un message "Les images doivent obligatoirement faire moins de 650 ko (ce fichier fait 847.5 ko)". -
ffmpeg, /dev/video0, -f decklink
20 mars 2019, par Camille GoudeseuneI’m trying to capture video from a PCI card, the Blackmagic DeckLink Mini Recorder, via ffmpeg, on a headless host running Ubuntu 18.04.2 LTS, hopefully with a command like
ffmpeg -f decklink -i /dev/video0 ...
How can I make that work ? I have two obstacles.
No /dev/video0
ffmpeg -i /dev/video0 ...
fails :/dev/video0: No such device or address
.
v4l2-ctl --list-devices
fails with the same error message.I built /dev/video0, and it looks okay :
mknod /dev/video0 c 81 0
chown root.video /dev/video0
chmod g+rw /dev/video0To compare this file with a working one, I ran
strace cat /dev/video0
on this host, and on another host (Ubuntu 14) with a working /dev/video0. The outputs began to differ here (good, then bad) :fstat(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/dev/video0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFCHR|0660, st_rdev=makedev(81, 0), ...}) = 0
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
----
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
openat(AT_FDCWD, "/dev/video0", O_RDONLY) = -1 ENXIO (No such device or address)So /dev/video0 is broken at a level lower than ffmpeg or v4l2 or even cat.
On Ubuntu 14,
man 8 MAKEDEV
suggests that the error message means that "the kernel does not have the driver configured or loaded."This Ubuntu 18 host lacks that manpage, but it does have a few
/snap/core/*/sbin/MAKEDEV
, all the same, so I tried/snap/core/6350/sbin/MAKEDEV -n -v video
It would have created over a hundred devices videoXX, radioXX, vtxXX, vbiXX. Those devices didn’t exist yet, so it seemed harmless to try it.
rm /dev/video0; /snap/core/6350/sbin/MAKEDEV video
That rebuilt /dev/video0, but "No such device" remains, from cat or ffmpeg.
No decklink
ffmpeg -f decklink ...
fails withUnknown input format: 'decklink'
.Neither black nor deck nor link is mentioned by
ffmpeg -devices
(fbdev, lavfi, oss, v4l2) andffmpeg -formats
(about 350), either for Ubuntu’s own version 3.4.4-0ubuntu0.18.04.1, or for version N-93330-g7ff89574c7 compiled from source on 2019 Mar 13 :git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-nonfree --disable-doc --disable-w32threads --enable-pthreads(Although
./configure --help
mentions--enable-decklink
, using that yielded "ERROR : DeckLinkAPI.h not found."updatedb && locate DeckLinkAPI.h
finds no file with that name, either.)The DeckLink PCI card is recognized by
hwinfo
andlspci
.lsmod
reports the loaded modulesblackmagic
andblackmagic_io
.Maybe the PCI card is installed ok, but ffmpeg just can’t reach it because I can’t configure it for that.
Edit : Rebooting didn’t fix anything.