
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (90)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...) -
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" (...) -
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 (...)
Sur d’autres sites (16114)
-
ffmpeg av_read_frame "Invalid data found"
26 mai 2017, par DweebsUnitedI am using ffmpeg to cut part of a file, following the remux example provided. However, I am having issues reading from files. I am given a file descriptor as input and an output filename, and can successfully set up the output file, read the stream info, copy all the streams, etc, etc. On the first call to av_read_frame though, I get an "Invalid data found when processing input" error. I have tried this with many different video files, and have not been able to get a single one to process correctly.
Here is my code. I get no errors anywhere, except av_read_frame, which gives Invalid data found no matter what video file I give it.
char path[512];
sprintf(path, "pipe:%d", fileno(fp));
AVOutputFormat *ofmt = NULL;
AVFormatContext *ifmt_ctx = avformat_alloc_context(), *ofmt_ctx = NULL;
AVPacket pkt;
int ret, i;
av_register_all();
avcodec_register_all();
if ((ret = avformat_open_input(&ifmt_ctx, path, av_find_input_format("mp4"), NULL)) < 0) {
LOG("Could not open input file '%s'", path);
goto end;
}
if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) < 0) {
LOG("Failed to retrieve input stream information", "");
goto end;
}
avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, out_filename);
if (!ofmt_ctx) {
LOG("Could not create output context\n");
ret = AVERROR_UNKNOWN;
goto end;
}
ofmt = ofmt_ctx->oformat;
for (i = 0; i < ifmt_ctx->nb_streams; i++) {
AVStream *in_stream = ifmt_ctx->streams[i];
AVStream *out_stream = avformat_new_stream(ofmt_ctx, in_stream->codec->codec);
if (!out_stream) {
LOG("Failed allocating output stream\n");
goto end;
}
ret = avcodec_parameters_copy(out_stream->codecpar, in_stream->codecpar);
if (ret < 0) {
LOG("Failed to copy context from input to output stream codec context\n");
goto end;
}
out_stream->codecpar->codec_tag = 0;
}
if (!(ofmt->flags & AVFMT_NOFILE)) {
ret = avio_open(&ofmt_ctx->pb, out_filename, AVIO_FLAG_WRITE);
if (ret < 0) {
LOG("Could not open output file '%s'", out_filename);
goto end;
}
}
ret = avformat_write_header(ofmt_ctx, NULL);
if (ret < 0) {
LOG("Error occurred when opening output file\n");
goto end;
}
// int indexs[8] = {0};
// int64_t start_from = 8*AV_TIME_BASE;
ret = av_seek_frame(ifmt_ctx, -1, from_seconds*AV_TIME_BASE, AVSEEK_FLAG_ANY);
if (ret < 0) {
LOG("Error seek\n");
goto end;
}
int64_t *dts_start_from;
int64_t *pts_start_from;
dts_start_from = (int64_t *) malloc(sizeof(int64_t) * ifmt_ctx->nb_streams);
memset(dts_start_from, 0, sizeof(int64_t) * ifmt_ctx->nb_streams);
pts_start_from = (int64_t *) malloc(sizeof(int64_t) * ifmt_ctx->nb_streams);
memset(pts_start_from, 0, sizeof(int64_t) * ifmt_ctx->nb_streams);
while (1) {
AVStream *in_stream, *out_stream;
ret = av_read_frame(ifmt_ctx, &pkt);
if (ret < 0)
break;
in_stream = ifmt_ctx->streams[pkt.stream_index];
out_stream = ofmt_ctx->streams[pkt.stream_index];
if (av_q2d(in_stream->time_base) * pkt.pts > end_seconds) {
av_packet_unref(&pkt);
break;
}
if (dts_start_from[pkt.stream_index] == 0)
dts_start_from[pkt.stream_index] = pkt.dts;
if (pts_start_from[pkt.stream_index] == 0)
pts_start_from[pkt.stream_index] = pkt.pts;
/* copy packet */
pkt.pts = ::av_rescale_q_rnd(pkt.pts - pts_start_from[pkt.stream_index], in_stream->time_base, out_stream->time_base, (AVRounding) (AV_ROUND_NEAR_INF |
AV_ROUND_PASS_MINMAX));
pkt.dts = ::av_rescale_q_rnd(pkt.dts - dts_start_from[pkt.stream_index], in_stream->time_base, out_stream->time_base, (AVRounding) (AV_ROUND_NEAR_INF |
AV_ROUND_PASS_MINMAX));
if (pkt.pts < 0) {
pkt.pts = 0;
}
if (pkt.dts < 0) {
pkt.dts = 0;
}
pkt.duration = (int) av_rescale_q((int64_t) pkt.duration, in_stream->time_base, out_stream->time_base);
pkt.pos = -1;
ret = av_interleaved_write_frame(ofmt_ctx, &pkt);
if (ret < 0) {
LOG("Error muxing packet\n");
break;
}
av_packet_unref(&pkt);
}
free(dts_start_from);
free(pts_start_from);
av_write_trailer(ofmt_ctx);
end:
LOG("END");
avformat_close_input(&ifmt_ctx);
/* close output */
if (ofmt_ctx && !(ofmt->flags & AVFMT_NOFILE))
avio_closep(&ofmt_ctx->pb);
avformat_free_context(ofmt_ctx);
if (ret < 0 && ret != AVERROR_EOF) {
LOG("-- Error occurred: %s\n", av_err2str(ret));
return 1;
}Thank you for any help, I’m still getting used to ffmpeg. Did I miss some setting on the input ? Am I not setting something up that I need to be ? This problem is really stumping me.
-
"Invalid data found when processing input" no matter the FFMPEG configuration
25 mars 2017, par Jamie BonnettI’ve been stumped on this for a while now, no matter the configuration if use in NodeJS I always get the same error "Error : ffmpeg exited with code 1".
Here’s my code :
var http = require('http');
var fs = require('fs');
var ffmpeg = require('fluent-ffmpeg');
var server = http.createServer(function(req, res) {
var seektime = 100;
var pathToMovie = __dirname + '/src/video.mp4';
var stat = fs.statSync(pathToMovie);
res.writeHead(200, {
'Content-Type': 'video/mp4',
'Content-Length': stat.size
});
var proc = new ffmpeg(pathToMovie)
.seekInput(seektime)
.withVideoBitrate(1024)
.withVideoCodec('libx264')
.withAspect('16:9')
.withFps(24)
.toFormat('mp4');
var ffstream = proc.pipe(res, {end:true});
ffstream.on('data', function(chunk) {
console.log('ffmpeg just wrote ' + chunk.length + ' bytes');
});
});
server.listen(8000);I have no idea what to do now. Any ideas ?
Thanks,
Jamie -
ffmpeg, ffprobe : don’t "merge" side data into packet data by default
9 mars 2017, par wm4ffmpeg, ffprobe : don’t "merge" side data into packet data by default
Preparation for potentially disabling merged side data by default in the
libs. Do this in particular because it affects fate tests.The changed tests either reflect added packet side data, or the changed
packet size due to merged side data removal reducing the packet size.- [DH] ffmpeg_opt.c
- [DH] ffprobe.c
- [DH] libavformat/tests/seek.c
- [DH] tests/ref/fate/gaplessenc-itunes-to-ipod-aac
- [DH] tests/ref/fate/gaplessenc-pcm-to-mov-aac
- [DH] tests/ref/fate/gaplessinfo-itunes1
- [DH] tests/ref/fate/gaplessinfo-itunes2
- [DH] tests/ref/fate/mov-aac-2048-priming
- [DH] tests/ref/seek/cache-pipe
- [DH] tests/ref/seek/extra-mp3
- [DH] tests/ref/seek/lavf-ts
- [DH] tests/ref/seek/mkv-codec-delay