
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (88)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (8441)
-
Import BMP file into quicktime .mov file ?
23 juillet 2015, par Neal DavisI am creating a quicktime container .mov file from one BMP file ; I am doing this in two ways :
- using the quicktime COM object API for .NET C# under windows
- using ffmpeg command line (rawvideo codec)
Both resulting .MOV files open with quicktime player pro just fine and they look identical to my eyes. Both resulting .MOV files are either the same size as the original BMP or a larger.
However when viewing the track properties under QT Player PRO of movie file number 1. track format = BMP ; when viewing track properties of number 2. track format = NONE.
Is there likely a difference - since in 1. above I do not set a track properties format ? In other words is there likely any changes being made to the BMP bits in number 1 above (like compression, or alpha, or ???) ?
-
libavcodec : ffprobe on file encoded with FFV1 codec reports "read_quant_table error"
20 novembre 2016, par Ali AlidoustI’m using the following code to encode a series of frames into an mkv or avi file with FFV1 encoding :
HRESULT Session::createContext(LPCSTR filename, UINT width, UINT height, UINT fps_num, UINT fps_den) {
LOG("Exporting to file: ", filename);
AVCodecID codecId = AV_CODEC_ID_FFV1;
this->pixelFormat = AV_PIX_FMT_YUV420P;
this->codec = avcodec_find_encoder(codecId);
RET_IF_NULL(this->codec, "Could not create codec", E_FAIL);
this->oformat = av_guess_format(NULL, filename, NULL);
RET_IF_NULL(this->oformat, "Could not create format", E_FAIL);
this->oformat->video_codec = codecId;
this->width = width;
this->height = height;
this->codecContext = avcodec_alloc_context3(this->codec);
RET_IF_NULL(this->codecContext, "Could not allocate context for the codec", E_FAIL);
this->codecContext->codec = this->codec;
this->codecContext->codec_id = codecId;
this->codecContext->pix_fmt = pixelFormat;
this->codecContext->width = this->width;
this->codecContext->height = this->height;
this->codecContext->time_base.num = fps_den;
this->codecContext->time_base.den = fps_num;
this->codecContext->gop_size = 1;
RET_IF_FAILED_AV(avformat_alloc_output_context2(&fmtContext, this->oformat, NULL, NULL), "Could not allocate format context", E_FAIL);
RET_IF_NULL(this->fmtContext, "Could not allocate format context", E_FAIL);
this->fmtContext->oformat = this->oformat;
this->fmtContext->video_codec_id = codecId;
this->stream = avformat_new_stream(this->fmtContext, this->codec);
RET_IF_NULL(this->stream, "Could not create new stream", E_FAIL);
this->stream->time_base = this->codecContext->time_base;
RET_IF_FAILED_AV(avcodec_parameters_from_context(this->stream->codecpar, this->codecContext), "Could not convert AVCodecContext to AVParameters", E_FAIL);
if (this->fmtContext->oformat->flags & AVFMT_GLOBALHEADER)
{
this->codecContext->flags |= CODEC_FLAG_GLOBAL_HEADER;
}
av_opt_set_int(this->codecContext->priv_data, "coder", 0, 0);
av_opt_set_int(this->codecContext->priv_data, "context", 1, 0);
av_opt_set_int(this->codecContext->priv_data, "slicecrc", 1, 0);
//av_opt_set_int(this->codecContext->priv_data, "slicecrc", 1, 0);
//av_opt_set_int(this->codecContext->priv_data, "pix_fmt", pixelFormat, 0);
RET_IF_FAILED_AV(avcodec_open2(this->codecContext, this->codec, NULL), "Could not open codec", E_FAIL);
RET_IF_FAILED_AV(avio_open(&this->fmtContext->pb, filename, AVIO_FLAG_WRITE), "Could not open output file", E_FAIL);
RET_IF_NULL(this->fmtContext->pb, "Could not open output file", E_FAIL);
RET_IF_FAILED_AV(avformat_write_header(this->fmtContext, NULL), "Could not write header", E_FAIL);
frame = av_frame_alloc();
RET_IF_NULL(frame, "Could not allocate frame", E_FAIL);
frame->format = this->codecContext->pix_fmt;
frame->width = width;
frame->height = height;
return S_OK;
}
HRESULT Session::writeFrame(IMFSample * pSample) {
IMFMediaBuffer *mediaBuffer = NULL;
BYTE *pDataNV12 = NULL;
DWORD length;
RET_IF_FAILED(pSample->ConvertToContiguousBuffer(&mediaBuffer), "Could not convert IMFSample to contagiuous buffer", E_FAIL);
RET_IF_FAILED(mediaBuffer->GetCurrentLength(&length), "Could not get buffer length", E_FAIL);
RET_IF_FAILED(mediaBuffer->Lock(&pDataNV12, NULL, NULL), "Could not lock the buffer", E_FAIL);
BYTE *pDataYUV420P = new BYTE[length];
this->convertNV12toYUV420P(pDataNV12, pDataYUV420P, this->width, this->height);
RET_IF_FAILED(av_image_fill_arrays(frame->data, frame->linesize, pDataYUV420P, pixelFormat, this->width, this->height, 1), "Could not fill the frame with data from the buffer", E_FAIL);
LOG_IF_FAILED(mediaBuffer->Unlock(), "Could not unlock the buffer");
frame->pts = av_rescale_q(this->pts++, this->codecContext->time_base, this->stream->time_base);
AVPacket pkt;
av_init_packet(&pkt);
pkt.data = NULL;
pkt.size = 0;
RET_IF_FAILED_AV(avcodec_send_frame(this->codecContext, frame), "Could not send the frame to the encoder", E_FAIL);
delete[] pDataYUV420P;
if (SUCCEEDED(avcodec_receive_packet(this->codecContext, &pkt))) {
RET_IF_FAILED_AV(av_interleaved_write_frame(this->fmtContext, &pkt), "Could not write the received packet.", E_FAIL);
}
av_packet_unref(&pkt);
return S_OK;
}
HRESULT Session::endSession() {
LOG("Ending session...");
LOG("Closing files...")
LOG_IF_FAILED_AV(av_write_trailer(this->fmtContext), "Could not finalize the output file.");
LOG_IF_FAILED_AV(avio_close(this->fmtContext->pb), "Could not close the output file.");
LOG_IF_FAILED_AV(avcodec_close(this->codecContext), "Could not close the codec.");
av_free(this->codecContext);
LOG("Done.")
return S_OK;
}The problem is that the generated file is not playable in either VLC or MPC-HC. However, MPC-HC reports following info in file properties :
General
Unique ID : 202978442142665779317960161865934977227 (0x98B439D9BE859109BD5EC00A62A238CB)
Complete name : T:\Test.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 24.6 MiB
Duration : 147ms
Overall bit rate : 1 401 Mbps
Writing application : Lavf57.57.100
Writing library : Lavf57.57.100
Video
ID : 1
Format : FFV1
Format version : Version 0
Codec ID : V_MS/VFW/FOURCC / FFV1
Duration : 147ms
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 1 000.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Compression mode : Lossless
Default : Yes
Forced : No
DURATION : 00:00:00.147000000
coder_type : Golomb RiceSomething to note is that it reports 1000 FPS which is weird since I’ve set
AVCodecContext::time_base
in the code.UPDATE 1 :
I managed to set the correct fps by setting
time_base
property of the stream :this->stream->time_base.den = fps_num;
this->stream->time_base.num = fps_den;VLC plays the output file but it shows VLC logo instead of the video, as if there is no video stream in the file.
UPDATE 2 :
Cleaned up the code. Now if I set
codecId = AV_CODEC_ID_MPEG2VIDEO
the output file is valid and is played in both VLC and MPC-HC. Usingffprobe
on the file with FFV1 encoding yields the following result :C:\root\apps\ffmpeg>ffprobe.exe t:\test.avi
ffprobe version 3.2 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[ffv1 @ 00000000006b83a0] read_quant_table error
Input #0, avi, from 't:\test.avi':
Metadata:
encoder : Lavf57.56.100
Duration: 00:00:04.94, start: 0.000000, bitrate: 107005 kb/s
Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv420p, 1280x720, 107717 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc -
Normalize Fish Eye Video
19 novembre 2016, par Optonom ScientificI use more advance super fish eye lens. Unfortunately, I couldn’t find any technical properties of this lens.
I want to dewrap with
ffmpeg
software with this command :ffmpeg -i left.MP4 -vf lenscorrection=cx=0.055:cy=0.005:k1=-.2:k2=-.2 new1.mp4
In lenscorrection filter there are four parameters.
How can I find right value for my lens ?