
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (41)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (4451)
-
Evolution #4396 (Nouveau) : utiliser SPIP avec MySQL 8.0
25 octobre 2019, par Nicolas Krebs -La branche 8.0 de MySQL est sortie en 2018. À mon avis, il serait bon que SPIP puisse fonctionner avec, et que la compatibilité soit indiquée dans https://www.spip.net/fr_article4351.html .
Changelog : https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html
-
ffmpeg MKV to MP4 format conversion issues
28 septembre 2019, par Lucas LecceI converted a 3Gb MKV video file to MP4 format using the following ffmpeg command :
ffmpeg -i input.mkv -c: v libx264 -crf 23 -c: a aac -movflags faststart output.mp4
ffmpeg -i input.mkv -acodec copy -vcodec copy output.mp4
ffmpeg version N-95111-g87ddf9f1ef Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20190918
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-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 59.100 / 58. 59.100
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 59.100 / 7. 59.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, matroska,webm, from 'input.mkv':
Metadata:
title : claucha75
encoder : libebml v1.3.5 + libmatroska v1.4.8
creation_time : 2018-01-23T22:07:33.000000Z
Duration: 01:37:13.89, start: 0.000000, bitrate: 5044 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
title : claucha75
BPS : 4146894
BPS-eng : 4146894
DURATION : 01:37:12.952000000
DURATION-eng : 01:37:12.952000000
NUMBER_OF_FRAMES: 139851
NUMBER_OF_FRAMES-eng: 139851
NUMBER_OF_BYTES : 3023579528
NUMBER_OF_BYTES-eng: 3023579528
_STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
_STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(spa): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
title : Latino
BPS : 448000
BPS-eng : 448000
DURATION : 01:37:13.888000000
DURATION-eng : 01:37:13.888000000
NUMBER_OF_FRAMES: 182309
NUMBER_OF_FRAMES-eng: 182309
NUMBER_OF_BYTES : 326697728
NUMBER_OF_BYTES-eng: 326697728
_STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
_STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Metadata:
title : Ingles
BPS : 448000
BPS-eng : 448000
DURATION : 01:37:13.856000000
DURATION-eng : 01:37:13.856000000
NUMBER_OF_FRAMES: 182308
NUMBER_OF_FRAMES-eng: 182308
NUMBER_OF_BYTES : 326695936
NUMBER_OF_BYTES-eng: 326695936
_STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
_STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:3(spa): Subtitle: subrip
Metadata:
title : Sub. Latino
BPS : 58
BPS-eng : 58
DURATION : 01:27:56.723000000
DURATION-eng : 01:27:56.723000000
NUMBER_OF_FRAMES: 1048
NUMBER_OF_FRAMES-eng: 1048
NUMBER_OF_BYTES : 38641
NUMBER_OF_BYTES-eng: 38641
_STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
_STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:4(eng): Subtitle: subrip
Metadata:
title : Sub. Ingles
BPS : 72
BPS-eng : 72
DURATION : 01:32:29.880000000
DURATION-eng : 01:32:29.880000000
NUMBER_OF_FRAMES: 1820
NUMBER_OF_FRAMES-eng: 1820
NUMBER_OF_BYTES : 50243
NUMBER_OF_BYTES-eng: 50243
_STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
_STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
File 'output.mp4' already exists. Overwrite ? [y/N] y
[mp4 @ 000002935ee0ff00] track 1: codec frame size is not set
Output #0, mp4, to 'output.mp4':
Metadata:
title : claucha75
encoder : Lavf58.33.100
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 16k tbn, 1k tbc (default)
Metadata:
title : claucha75
BPS : 4146894
BPS-eng : 4146894
DURATION : 01:37:12.952000000
DURATION-eng : 01:37:12.952000000
NUMBER_OF_FRAMES: 139851
NUMBER_OF_FRAMES-eng: 139851
NUMBER_OF_BYTES : 3023579528
NUMBER_OF_BYTES-eng: 3023579528
_STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
_STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(spa): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
title : Latino
BPS : 448000
BPS-eng : 448000
DURATION : 01:37:13.888000000
DURATION-eng : 01:37:13.888000000
NUMBER_OF_FRAMES: 182309
NUMBER_OF_FRAMES-eng: 182309
NUMBER_OF_BYTES : 326697728
NUMBER_OF_BYTES-eng: 326697728
_STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
_STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=139851 fps=2149 q=-1.0 Lsize= 3275868kB time=01:37:13.85 bitrate=4600.0kbits/s speed=89.7x
video:2952714kB audio:319041kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.125715%The command produces a MP4 file. The file takes a long time to open and then it takes several more minutes for a frame to appear. The converted file is also missing audio.
Does anyone have an idea about the slow loading time and missing audio ?
-
Having trouble compiling ffmpeg code in command terminal
10 septembre 2019, par m00ncakeI am having a bit of trouble compiling my c++ code in my terminal. I have ffmpeg installed as shown below.
ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --enable-gpl --enable-version3 --disable-static --enable-shared --enable-small --enable-avisynth --enable-chromaprint --enable-frei0r --enable-gmp --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-librtmp --enable-libshine --enable-libsmbclient --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-libmysofa --enable-openal --enable-opencl --enable-opengl --enable-libdrm
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...However, when I compile my c++ code, currently trying to get NTP timestamps from private data in ffmpeg but I need to include their headers ? I have looked into ffmpeg’s
libavformat
folder and it does havertpdec.h
but when I compile it in the command line, i get this error. (trying to include this header forRTSPState
andRTSPStream
as well asRTPDemuxContext
)cf.cpp:11:10: fatal error: libavformat/rtsp.h: No such file or directory
#include <libavformat></libavformat>rtpdec.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.This is my code :
#include
#include
#include <iostream>
#include <fstream>
#include <sstream>
extern "C" {
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libavformat></libavformat>avio.h>
#include <libavformat></libavformat>rtpdec.h>
#include <libswscale></libswscale>swscale.h>
}
int main(int argc, char** argv) {
// Open the initial context variables that are needed
SwsContext *img_convert_ctx;
AVFormatContext* format_ctx = avformat_alloc_context();
AVCodecContext* codec_ctx = NULL;
int video_stream_index;
uint32_t* last_rtcp_ts;
double* base_time;
double* time;
// Register everything
av_register_all();
avformat_network_init();
//open RTSP
if (avformat_open_input(&format_ctx, "rtsp://admin:password@192.168.1.67:554",
NULL, NULL) != 0) {
return EXIT_FAILURE;
}
if (avformat_find_stream_info(format_ctx, NULL) < 0) {
return EXIT_FAILURE;
}
//search video stream
for (int i = 0; i < format_ctx->nb_streams; i++) {
if (format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
video_stream_index = i;
}
AVPacket packet;
av_init_packet(&packet);
//open output file
AVFormatContext* output_ctx = avformat_alloc_context();
AVStream* stream = NULL;
int cnt = 0;
//start reading packets from stream and write them to file
av_read_play(format_ctx); //play RTSP
// Get the codec
AVCodec *codec = NULL;
codec = avcodec_find_decoder(AV_CODEC_ID_H264);
if (!codec) {
exit(1);
}
// Add this to allocate the context by codec
codec_ctx = avcodec_alloc_context3(codec);
avcodec_get_context_defaults3(codec_ctx, codec);
avcodec_copy_context(codec_ctx, format_ctx->streams[video_stream_index]->codec);
std::ofstream output_file;
if (avcodec_open2(codec_ctx, codec, NULL) < 0)
exit(1);
img_convert_ctx = sws_getContext(codec_ctx->width, codec_ctx->height,
codec_ctx->pix_fmt, codec_ctx->width, codec_ctx->height, AV_PIX_FMT_RGB24,
SWS_BICUBIC, NULL, NULL, NULL);
int size = avpicture_get_size(AV_PIX_FMT_YUV420P, codec_ctx->width,
codec_ctx->height);
uint8_t* picture_buffer = (uint8_t*) (av_malloc(size));
AVFrame* picture = av_frame_alloc();
AVFrame* picture_rgb = av_frame_alloc();
int size2 = avpicture_get_size(AV_PIX_FMT_RGB24, codec_ctx->width,
codec_ctx->height);
uint8_t* picture_buffer_2 = (uint8_t*) (av_malloc(size2));
avpicture_fill((AVPicture *) picture, picture_buffer, AV_PIX_FMT_YUV420P,
codec_ctx->width, codec_ctx->height);
avpicture_fill((AVPicture *) picture_rgb, picture_buffer_2, AV_PIX_FMT_RGB24,
codec_ctx->width, codec_ctx->height);
while (av_read_frame(format_ctx, &packet) >= 0 && cnt < 1000) { //read ~ 1000 frames
RTSPState* rt = format_ctx->priv_data;
RTSPStream *rtsp_stream = rt->rtsp_streams[0];
RTPDemuxContext* rtp_demux_context = rtsp_stream->transport_priv;
uint32_t new_rtcp_ts = rtp_demux_context->last_rtcp_timestamp;
uint64_t last_ntp_time = 0;
if (new_rtcp_ts != *last_rtcp_ts) {
*last_rtcp_ts = new_rtcp_ts;
last_ntp_time = rtp_demux_context->last_rtcp_ntp_time;
uint32_t seconds = ((last_ntp_time >> 32) & 0xffffffff) - 2208988800;
uint32_t fraction = (last_ntp_time & 0xffffffff);
double useconds = ((double) fraction / 0xffffffff);
*base_time = seconds + useconds;
uint32_t d_ts = rtp_demux_context->timestamp - *last_rtcp_ts;
*time = *base_time + d_ts / 90000.0;
std::cout << "Time is: " << *time << std::endl;
}
std::cout << "1 Frame: " << cnt << std::endl;
if (packet.stream_index == video_stream_index) { //packet is video
std::cout << "2 Is Video" << std::endl;
if (stream == NULL) { //create stream in file
std::cout << "3 create stream" << std::endl;
stream = avformat_new_stream(output_ctx,
format_ctx->streams[video_stream_index]->codec->codec);
avcodec_copy_context(stream->codec,
format_ctx->streams[video_stream_index]->codec);
stream->sample_aspect_ratio =
format_ctx->streams[video_stream_index]->codec->sample_aspect_ratio;
}
int check = 0;
packet.stream_index = stream->id;
std::cout << "4 decoding" << std::endl;
int result = avcodec_decode_video2(codec_ctx, picture, &check, &packet);
std::cout << "Bytes decoded " << result << " check " << check
<< std::endl;
if (cnt > 100) //cnt < 0)
{
sws_scale(img_convert_ctx, picture->data, picture->linesize, 0,
codec_ctx->height, picture_rgb->data, picture_rgb->linesize);
std::stringstream file_name;
file_name << "test" << cnt << ".ppm";
output_file.open(file_name.str().c_str());
output_file << "P3 " << codec_ctx->width << " " << codec_ctx->height
<< " 255\n";
for (int y = 0; y < codec_ctx->height; y++) {
for (int x = 0; x < codec_ctx->width * 3; x++)
output_file
<< (int) (picture_rgb->data[0]
+ y * picture_rgb->linesize[0])[x] << " ";
}
output_file.close();
}
cnt++;
}
av_free_packet(&packet);
av_init_packet(&packet);
}
av_free(picture);
av_free(picture_rgb);
av_free(picture_buffer);
av_free(picture_buffer_2);
av_read_pause(format_ctx);
avio_close(output_ctx->pb);
avformat_free_context(output_ctx);
return (EXIT_SUCCESS);
}
</sstream></fstream></iostream>The command i use to compile my code :
g++ -w cf.cpp -o cf $(pkg-config --cflags --libs libavformat libswscale libavcodec)
I am a bit new to coding in FFmpeg.