
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (81)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5285)
-
>SOLVED My FFMPEG throws me unexpected errors while writing a Thumbnail to the songs
22 février 2019, par Harmonised7My issue was that my songs already had a thumbnail. Solution to overwrite thumbnail below !
I am using Node to execute my ffmpeg. I use this wrapper :
https://www.npmjs.com/package/ffmpeg
Everything was fine when I was using smaller versions of the thumbnails provided by Youtube, but when I attempted the HD ones, it suddenly started giving me an error. I’ve tried -pix_fmt yuv422p and Many other pixel formats, but nothing helped. Though ONE out of 100+ songs did tag successfully.
here is my code :
downloadTags(tags.thumbnail, `./thumbnails/${tags.title}.jpg`).then(thumbnail =>
{
video.addCommand('-i', `"${thumbnail}"`);
video.addCommand('-map', '0');
video.addCommand('-map', '1');
video.addCommand('-c', 'copy');
video.addCommand('-c:v:1', 'png');
video.addCommand('-disposition:v:0', 'attached_pic');
if(tags.title)
video.addCommand('-metadata', `title="${tags.title}"`);
if(tags.artist)
video.addCommand('-metadata', `artist="${tags.artist}"`);
if(tags.id)
video.addCommand('-metadata', `comment="https://www.youtube.com/watch?v=${tags.id}"`);
video.addCommand('-pix_fmt', `yuv422p`);
var output = 'downloaded'
if (outFolder)
{
output = outFolder;
if(!fs.existsSync(output)) fs.mkdirSync(output);
}
video.save(`"./${output}/${tags.title}.${tags.format}"`, function (error, file)
{
if (error)
{
resolve(error);
return
}
try
{
fs.unlinkSync(song);
}
catch(err)
{
console.log(err.code);
}
resolve();
});
});
}and here is my error :
E
RROR: Error: Command failed: ffmpeg -i "songs/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a" -y -i "./thumbnails/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].jpg" -map 0 -map 1 -c copy -c:v:1 png -disposition:v:0 attached_pic -metadata title="&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep]" -metadata artist="AReallyLongAndAwesomeNameThatIsBetterThanYoursInEveryPossibleWay" -metadata comment="https://www.youtube.com/watch?v=HprdvIIpR-I" "./written/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a"
ffmpeg version N-93214-g7e4d3dbe18 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20190212
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 47.102 / 58. 47.102
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002213366bb00] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'songs/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a':
Metadata:
major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
title : &I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep]
artist : Cider Party
encoder : Lavf58.18.104
comment : https://www.youtube.com/watch?v=HprdvIIpR-I
Duration: 00:05:24.80, start: 0.000000, bitrate: 127 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 120x90 [SAR 1:1 DAR 4:3], 90k tbr, 90k tbn, 90k tbc
Input #1, image2, from './thumbnails/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 1575 kb/s
Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 480x360 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #1:0 -> #0:2 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 00000221353d4fc0] deprecated pixel format used, make sure you did set range correctly
[ipod @ 00000221336703c0] Could not find tag for codec png in stream #2, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 --
Conversion failed!Keep in mind that All of my thumbnails retrieved are .jpg
Any suggestions ? Getting really desperate at this point...
-
My FFMPEG throws me unexpected errors while writing a Thumbnail to the songs
4 mars 2019, par Harmonised7I am using Node to execute my ffmpeg. I use this wrapper :
https://www.npmjs.com/package/ffmpeg
Everything was fine when I was using smaller versions of the thumbnails provided by Youtube, but when I attempted the HD ones, it suddenly started giving me an error. I’ve tried -pix_fmt yuv422p and Many other pixel formats, but nothing helped. Though ONE out of 100+ songs did tag successfully.
here is my code :
downloadTags(tags.thumbnail, `./thumbnails/${tags.title}.jpg`).then(thumbnail =>
{
video.addCommand('-i', `"${thumbnail}"`);
video.addCommand('-map', '0');
video.addCommand('-map', '1');
video.addCommand('-c', 'copy');
video.addCommand('-c:v:1', 'png');
video.addCommand('-disposition:v:0', 'attached_pic');
if(tags.title)
video.addCommand('-metadata', `title="${tags.title}"`);
if(tags.artist)
video.addCommand('-metadata', `artist="${tags.artist}"`);
if(tags.id)
video.addCommand('-metadata', `comment="https://www.youtube.com/watch?v=${tags.id}"`);
video.addCommand('-pix_fmt', `yuv422p`);
var output = 'downloaded'
if (outFolder)
{
output = outFolder;
if(!fs.existsSync(output)) fs.mkdirSync(output);
}
video.save(`"./${output}/${tags.title}.${tags.format}"`, function (error, file)
{
if (error)
{
resolve(error);
return
}
try
{
fs.unlinkSync(song);
}
catch(err)
{
console.log(err.code);
}
resolve();
});
});
}and here is my error :
E
RROR: Error: Command failed: ffmpeg -i "songs/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a" -y -i "./thumbnails/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].jpg" -map 0 -map 1 -c copy -c:v:1 png -disposition:v:0 attached_pic -metadata title="&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep]" -metadata artist="AReallyLongAndAwesomeNameThatIsBetterThanYoursInEveryPossibleWay" -metadata comment="https://www.youtube.com/watch?v=HprdvIIpR-I" "./written/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a"
ffmpeg version N-93214-g7e4d3dbe18 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20190212
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 47.102 / 58. 47.102
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002213366bb00] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'songs/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a':
Metadata:
major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
title : &I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep]
artist : Cider Party
encoder : Lavf58.18.104
comment : https://www.youtube.com/watch?v=HprdvIIpR-I
Duration: 00:05:24.80, start: 0.000000, bitrate: 127 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 120x90 [SAR 1:1 DAR 4:3], 90k tbr, 90k tbn, 90k tbc
Input #1, image2, from './thumbnails/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 1575 kb/s
Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 480x360 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #1:0 -> #0:2 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 00000221353d4fc0] deprecated pixel format used, make sure you did set range correctly
[ipod @ 00000221336703c0] Could not find tag for codec png in stream #2, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 --
Conversion failed!Keep in mind that All of my thumbnails retrieved are .jpg
Any suggestions ? Getting really desperate at this point...
-
Trying to use openH264 as an alternative to libX264 in FFMPEG C project
18 octobre 2019, par tishuI have an application that transcodes a video frame by frame using FFMPEG and x264 encoder. I am looking to release this application but the licensing of x264 made me switch to using openh264 instead.
I managed to compile everything smoothly (openh264 then FFMPEG with enable-openh264). I am now trying to correct the encoder setup in my C code as what worked for libx264 doesn’t work anymore. Unfortunately I found very limited C/C++ examples of FFMPEG/openh264, i would appreciate any link/hint.
I am using the following code (dec_ctx is the AVCodecContext of the video I am decoding)
enc_ctx->height = dec_ctx->height;
enc_ctx->width = dec_ctx->width;
enc_ctx->sample_aspect_ratio = dec_ctx->sample_aspect_ratio;
/* take first format from list of supported formats */
enc_ctx->pix_fmt = encoder->pix_fmts[0];
/* video time_base can be set to whatever is handy and supported by encoder */
enc_ctx->time_base = dec_ctx->time_base;
enc_ctx->gop_size = 120; /* emit one intra frame every twelve frames at most */
enc_ctx->max_b_frames = 16;
enc_ctx->scenechange_threshold = 0;
enc_ctx->rc_buffer_size = 0;
enc_ctx->me_method = ME_ZERO;
enc_ctx->ticks_per_frame = dec_ctx->ticks_per_frame * ifmt_ctx->streams[i]->time_base.den * ifmt_ctx->streams[i]->r_frame_rate.num/ifmt_ctx->streams[i]->r_frame_rate.den;
// Set Ultrafast profile. internal name for this preset is baseline
av_opt_set(enc_ctx->priv_data, "preset", "placebo", AV_OPT_SEARCH_CHILDREN);I get the following errors in the output with the [OpenH264] tag :
[OpenH264] this = 0x0000000019C126C0, Warning:bEnableFrameSkip = 0,bitrate can't be controlled for RC_QUALITY_MODE,RC_BITRATE_MODE and RC_TIMESTAMP_MODE without enabling skip frame.
Output #0, mp4, to 'C:\Dev\temp\geoVid.mp4':
Stream #0:0: Video: h264 (libopenh264), yuv420p, 720x480, q=2-31, 200 kb/s, 90k tbn, 180k tbc
Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp, 96 kb/s
[OpenH264] this = 0x0000000019C126C0, Warning:Actual input framerate fAverageFrameRate = 0.000000 is quite different from framerate in setting 60.000000, please check setting or timestamp unit (ms), start_Ts = 0
[OpenH264] this = 0x0000000019C126C0, Warning:Actual input framerate fAverageFrameRate = 0.000000 is quite different from framerate in setting 60.000000, please check setting or timestamp unit (ms), start_Ts = 0The output video file just plays black frames. Any hint or link to some doc would be appreciated. I have been trying to understand these errors but not too sure how to enable "skip frame" or why it is complaining about my input framerate (this is the same input as when I encode successfully with libx264)