
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (66)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
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" (...)
Sur d’autres sites (10878)
-
Call to avformat_find_stream_info prevents decoding of simple PNG image ?
10 avril 2014, par kloffyI am running into a problem decoding a simple PNG image with libav. The
decode_ok
flag after the call toavcodec_decode_video2
is set to0
, even though the packet contains the entire image. Through some experimentation, I have managed to pinpoint the issue and it seems related to callingavformat_find_stream_info
. If the call is removed, the example runs successfully. However, I would like to use the same code for other media, and callingavformat_find_stream_info
is recommended in the documentation.The following minimal example illustrates the behavior (unfortunately still a bit lengthy) :
#include <iostream>
extern "C"
{
#include <libavformat></libavformat>avformat.h>
#include <libavcodec></libavcodec>avcodec.h>
}
// Nothing to see here, it's just a helper function
AVCodecContext* open(AVMediaType mediaType, AVFormatContext* formatContext)
{
auto ret = 0;
if ((ret = av_find_best_stream(formatContext, mediaType, -1, -1, nullptr, 0)) < 0)
{
std::cerr << "Failed to find video stream." << std::endl;
return nullptr;
}
auto codecContext = formatContext->streams[ret]->codec;
auto codec = avcodec_find_decoder(codecContext->codec_id);
if (!codec)
{
std::cerr << "Failed to find codec." << std::endl;
return nullptr;
}
if ((ret = avcodec_open2(codecContext, codec, nullptr)) != 0)
{
std::cerr << "Failed to open codec context." << std::endl;
return nullptr;
}
return codecContext;
}
// All the interesting bits are here
int main(int argc, char* argv[])
{
auto path = "/path/to/test.png"; // Replace with valid path to PNG
auto ret = 0;
av_log_set_level(AV_LOG_DEBUG);
av_register_all();
avcodec_register_all();
auto formatContext = avformat_alloc_context();
if ((ret = avformat_open_input(&formatContext, path, NULL, NULL)) != 0)
{
std::cerr << "Failed to open input." << std::endl;
return -1;
}
av_dump_format(formatContext, 0, path, 0);
//*/ Info is successfully found, but interferes with decoding
if((ret = avformat_find_stream_info(formatContext, nullptr)) < 0)
{
std::cerr << "Failed to find stream info." << std::endl;
return -1;
}
av_dump_format(formatContext, 0, path, 0);
//*/
auto codecContext = open(AVMEDIA_TYPE_VIDEO, formatContext);
AVPacket packet;
av_init_packet(&packet);
if ((ret = av_read_frame(formatContext, &packet)) < 0)
{
std::cerr << "Failed to read frame." << std::endl;
return -1;
}
auto frame = av_frame_alloc();
auto decode_ok = 0;
if ((ret = avcodec_decode_video2(codecContext, frame, &decode_ok, &packet)) < 0 || !decode_ok)
{
std::cerr << "Failed to decode frame." << std::endl;
return -1;
}
av_frame_free(&frame);
av_free_packet(&packet);
avcodec_close(codecContext);
avformat_close_input(&formatContext);
av_free(formatContext);
return 0;
}
</iostream>The format dump before
avformat_find_stream_info
prints :Input #0, image2, from '/path/to/test.png' : Duration : N/A, bitrate : N/A Stream #0:0, 0, 1/25 : Video : png, 25 tbn
The format dump after
avformat_find_stream_info
prints :Input #0, image2, from '/path/to/test.png' : Duration : 00:00:00.04, start : 0.000000, bitrate : N/A Stream #0:0, 1, 1/25 : Video : png, rgba, 512x512 [SAR 3780:3780 DAR 1:1], 1/25, 25 tbr, 25 tbn, 25 tbc
So it looks like the search yields potentially useful information. Can anybody shed some light on this problem ? Other image formats seem to work fine. I assume that this is a simple user error rather than a bug.
Edit : Debug logging was already enabled, but the PNG decoder does not produce a lot of output. I have also tried setting a custom logging callback.
Here is what I get without the call to
avformat_find_stream_info
, when decoding succeeds :Statistics : 52125 bytes read, 0 seeks
And here is what I get with the call to
avformat_find_stream_info
, when decoding fails :Statistics : 52125 bytes read, 0 seeks
detected 8 logical cores
The image is 52125 bytes, so the whole file is read. I am not sure what the logical cores are referring to.
-
ffmpeg conversion commandline needed [migrated]
8 avril 2014, par user3506221I want to ask for help on converting a mpg videofile recorded from TV
to a mp4 format my SAT Receiver can play, (mp4).
Below are the format infos of source and target output by ffmpeg -i :
All done on Linux.source :
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 9500 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/starget :
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 720x406 [SAR 1:1 DAR 360:203], 1894 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)ffmpeg -i ./source.mpg
ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 24 2014 17:15:07 with gcc 4.8 (SUSE Linux)
configuration : —shlibdir=/usr/lib —prefix=/usr —mandir=/usr/share/man —libdir=/usr/lib —enable-shared —disable-static —enable-debug —disable-stripping —extra-cflags='-fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' —enable-gpl —enable-x11grab —enable-version3 —enable-pthreads —enable-avfilter —enable-libpulse —enable-libvpx —enable-libopus —enable-libass —enable-libx265 —enable-libmp3lame —enable-libvorbis —enable-libtheora —enable-libspeex —enable-libxvid —enable-libx264 —enable-libschroedinger —enable-libgsm —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-postproc —enable-libdc1394 —enable-librtmp —enable-libfreetype —enable-avresample —enable-libtwolame —enable-libvo-aacenc —enable-gnutls
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
[NULL @ 0x82baf20] start time is not set in estimate_timings_from_pts
Input #0, mpeg, from './Rossini.mpg' :
Duration : 01:49:08.19, start : 0.252622, bitrate : 4815 kb/s
Stream #0:0[0x1bf] : Data : dvd_nav_packet
Stream #0:1[0x1e0] : Video : mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 9500 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x83] : Audio : ac3, 48000 Hz, stereo, fltp, 448 kb/s
At least one output file must be specifiedffmpeg -i ./target.mp4
ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 24 2014 17:15:07 with gcc 4.8 (SUSE Linux)
configuration : —shlibdir=/usr/lib —prefix=/usr —mandir=/usr/share/man —libdir=/usr/lib —enable-shared —disable-static —enable-debug —disable-stripping —extra-cflags='-fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gsm' —enable-gpl —enable-x11grab —enable-version3 —enable-pthreads —enable-avfilter —enable-libpulse —enable-libvpx —enable-libopus —enable-libass —enable-libx265 —enable-libmp3lame —enable-libvorbis —enable-libtheora —enable-libspeex —enable-libxvid —enable-libx264 —enable-libschroedinger —enable-libgsm —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-postproc —enable-libdc1394 —enable-librtmp —enable-libfreetype —enable-avresample —enable-libtwolame —enable-libvo-aacenc —enable-gnutls
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './target.mp4' :
Metadata :
major_brand : mp42
minor_version : 0
compatible_brands : isommp42
creation_time : 2014-03-31 22:03:51
Duration : 01:20:35.84, start : 0.000000, bitrate : 1992 kb/s
Stream #0:0(und) : Video : h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 720x406 [SAR 1:1 DAR 360:203], 1894 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
Metadata :
creation_time : 2014-03-31 22:03:51
handler_name : Mainconcept MP4 Video Media Handler
Stream #0:1(und) : Audio : aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
Metadata :
creation_time : 2014-03-31 22:03:51
handler_name : Mainconcept MP4 Sound Media Handler
At least one output file must be specified -
Does ffmpeg version 0.7 support -codec copy option ? [migrated]
2 avril 2014, par Boris ŠuškaI have to use ffmpeg version 0.7.15 to merge video (without audio) and audio file into one video file with audio. I would like to use command ffmpeg without re-encoding.
I used this with newer version of ffmpeg command
ffmpeg -y -i "video.mp4" -i "audio.mp4" -c:v copy -c:a copy -strict experimental -map 0:v:0 -map 1:a:0 "output.mp4"
I need similar command for version 0.7.15, this is not working :
ffmpeg -y -i "video.mp4" -i "audio.mp4" -vcodec copy -acodec copy -strict experimental -map 0:v:0 -map 1:a:0 "output.mp4"
but this command works :
ffmpeg -y -i "video.mp4" -i "audio.mp4" -vcodec libx264 -acodec aac -strict experimental -map 0:v:0 -map 1:a:0 "output.mp4"
Does ffmpeg version 0.7.x support
-vcodec copy
and-acodec copy
or something similar ? If no which first version supports this ?Update :
-vcodec copy -acodec copy
is not working for version 0.7.15 means if I have two files :-rwxrwxrwx 1 vagrant vagrant 2066268 Apr 1 11:41 audio.mp4
-rwxrwxrwx 1 vagrant vagrant 33172453 Apr 1 11:41 video.mp4and I run
ffmpeg
command with-vcodec copy
and-acodec copy
options I get this output :ffmpeg version 0.7.15, Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 22 2013 07:18:58 with gcc 4.4.5
configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-01-01 01:05:45
Duration: 00:04:19.92, start: 129.960000, bitrate: 1021 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080, 25 tbr, 90k tbn, 50 tbc
Metadata:
creation_time : 2014-01-01 01:05:45
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'audio.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-01-01 01:03:43
Duration: 00:04:20.10, start: 130.054966, bitrate: 63 kb/s
Stream #1.0(und): Audio: aac, 44100 Hz, stereo, s16
Metadata:
creation_time : 2014-01-01 01:03:43
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-01-01 01:05:45
encoder : Lavf52.111.0
Stream #0.0(und): Video: libx264, yuv420p, 1920x1080, q=2-31, 25 tbn, 25 tbc
Metadata:
creation_time : 2014-01-01 01:05:45
Stream #0.1(und): Audio: libfaac, 44100 Hz, stereo
Metadata:
creation_time : 2014-01-01 01:03:43
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1 [sync #0.0]
Press [q] to stop, [?] for help
frame= 0 fps= 0 q=-1.0 Lsize= 2038kB time=00:00:00.00 bitrate= 0.0kbits/s
video:0kB audio:1994kB global headers:0kB muxing overhead 2.229202%and new
output.mp4
file is tooo small and contains only audio :-rwxrwxrwx 1 vagrant vagrant 2066268 Apr 1 11:41 audio.mp4
-rwxrwxrwx 1 vagrant vagrant 2087185 Apr 2 08:07 output.mp4
-rwxrwxrwx 1 vagrant vagrant 33172453 Apr 1 11:41 video.mp4Output of newer version of
ffmpeg
(Windows version here) looks like this :ffmpeg version N-58288-g80e5859 Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 19 2013 18:06:56 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --en
able-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame -
-enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 53.100 / 52. 53.100
libavcodec 55. 43.101 / 55. 43.101
libavformat 55. 21.100 / 55. 21.100
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-01-01 01:05:45
Duration: 00:02:09.96, start: 0.000000, bitrate: 2042 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 2039 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
Metadata:
creation_time : 2014-01-01 01:05:45
handler_name : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'audio.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-01-01 01:03:43
Duration: 00:02:10.05, start: 0.000000, bitrate: 127 kb/s
Stream #1:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2014-01-01 01:03:43
handler_name : SoundHandler
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
encoder : Lavf55.21.100
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080, q=2-31, 2039 kb/s, 25 fps, 90k tbn, 90k tbc (default)
Metadata:
creation_time : 2014-01-01 01:05:45
handler_name : VideoHandler
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 125 kb/s (default)
Metadata:
creation_time : 2014-01-01 01:03:43
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 3249 fps=0.0 q=-1.0 Lsize= 34438kB time=00:02:10.05 bitrate=2169.2kbits/s
video:32354kB audio:1994kB subtitle:0 global headers:0kB muxing overhead 0.262659%and
output.mp4
file size is higher than only video file and contains video and audio streams-rwxrwxrwx 1 vagrant vagrant 2066268 Apr 1 11:41 audio.mp4
-rwxrwxrwx 1 vagrant vagrant 35264183 Apr 2 08:15 output.mp4
-rwxrwxrwx 1 vagrant vagrant 33172453 Apr 1 11:41 video.mp4