
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
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
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (53)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (11694)
-
Overwriting destination file in PowerShell
2 mai 2019, par user10204157I am running the following script
ffmpeg -i $Args[0] -vcodec copy -acodec copy -movflags +faststart $Args[1]
Which essentially is overwriting the original file, how can I force this to override so my powershell script doesn’t error out ?
File ’./cache/videos/1556749678654.mp4’ already exists. Overwrite ? [y/N] Not overwriting - exiting
Edit
I am executing this script as follows within node.jsvar spawn = require("child_process").spawn,
child;
response.data.pipe(file);
child = spawn("powershell.exe", [
"./script.ps1",
`./cache/videos/${tempFileName + "."}${videoType}`,
` ./cache/converted_videos/${tempFileName + "."}${videoType}`
]); -
mux / remux / box in memory h264 frames to mp4 via C / C++ (no ffmpeg cmdline)
28 février 2019, par Vans SI have looked at various tutorials and I am still struggling to correctly frame raw h264 into an mp4 container. The problem is the stream does not have an end (live) and is in memory, a lot of the examples available of muxers assume the streams are located on disk as files.
I have tried and looked at
http://www.ffmpeg.org/doxygen/trunk/doc_2examples_2remuxing_8c-example.html
https://ffmpeg.org/doxygen/trunk/muxing_8c-source.html
and countless other examples.This is what I have now :
AVFormatContext *outFmtCtx = NULL;
AVFormatContext *inFmtCtx = NULL;
std::vector g_p;
static int read_packet(void *opaque, uint8_t *pBuf, int nBuf) {
printf("read_packet %d\n", g_p.size());
memcpy(pBuf, &g_p[0], g_p.size());
return g_p.size();
}
static int write_packet(void *opaque, uint8_t *buf, int buf_size) {
printf("write_packet %d %lld\n", buf_size, timestamp_micro());
return buf_size;
}
static int64_t seek_packet(void *opaque, int64_t offset, int whence) {
printf("seek_packet\n");
exit(0);
return 0;
}
void create_mp4() {
av_log_set_level(AV_LOG_DEBUG);
//alloc memory buffer
uint8_t *avioc_buffer = NULL;
int avioc_buffer_size = 8 * 1024 * 1024;
avioc_buffer = (uint8_t *)av_malloc(avioc_buffer_size);
if (!avioc_buffer) {
printf("failed make avio buffer\n");
exit(1);
}
AVIOContext* pIOCtx = avio_alloc_context(avioc_buffer, avioc_buffer_size, 1,
NULL/*outptr*/, &read_packet, &write_packet, &seek_packet);
if (!pIOCtx) {
printf("failed make avio context\n");
exit(1);
}
inFmtCtx = avformat_alloc_context();
inFmtCtx->pb = pIOCtx;
inFmtCtx->iformat = av_find_input_format("h264");
avformat_open_input(&inFmtCtx, "", inFmtCtx->iformat, NULL);
AVOutputFormat* outFmt = av_guess_format("mp4", NULL, NULL);
avformat_alloc_output_context2(&outFmtCtx, outFmt, NULL, NULL);
//set the AIO buffer to the memory one
outFmtCtx->pb = pIOCtx;
//outFmtCtx->flags = AVFMT_FLAG_CUSTOM_IO;//pIOCtx;
AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_H264);
AVStream * outStrm = avformat_new_stream(outFmtCtx, codec);
avcodec_get_context_defaults3(outStrm->codec, codec);
outStrm->id = 0;
outStrm->codec->coder_type = AVMEDIA_TYPE_VIDEO;
outStrm->codec->codec_id = AV_CODEC_ID_H264;
outStrm->codec->bit_rate = 8000000;
outStrm->codec->width = 1280;
outStrm->codec->height = 720;
outStrm->codec->time_base.den = 60;
outStrm->codec->time_base.num = 1;
outStrm->codec->gop_size = 0xffffffff;
outStrm->codec->pix_fmt = AV_PIX_FMT_NV12;
outStrm->duration = 0;
//Allow it to play immediately
AVDictionary* options = nullptr;
av_dict_set( &options, "movflags", "empty_moov+default_base_moof+frag_keyframe", 0 );
avformat_write_header(outFmtCtx, &options);
printf("mp4 muxer created\n");
}
//set the first raw h264 frame from capture
g_p = raw_h264_frame;
AVPacket pkt;
//call av_read_frame (infinite loop here on read_packet)
int wret = av_read_frame(inFmtCtx, &pkt);I get an infinite loop on read_packet after calling av_read_frame, I tried to construct the packets myself by also doing
AVPacket pkt;
av_init_packet(&pkt);
if (nFrame == 0) {
pkt.flags |= AV_PKT_FLAG_KEY;
}
pkt.stream_index = 0;
pkt.data = &raw_h264_frame[0];
pkt.size = raw_h264_frame.size();
//pkt.dts = AV_NOPTS_VALUE;
//pkt.pts = AV_NOPTS_VALUE;
pkt.dts = nFrame;
pkt.pts = nFrame;
int ret = av_interleaved_write_frame(outFmtCtx, &pkt);
if (ret < 0) {
printf("error av_write_frame\n");
exit(1);
}But this does not work either. Some help would be greatly appreciated or guidance where to look (perhaps drop libFFMPEG and look elsewhere, etc).
VLC errors look like :
mp4 warning: out of bound child �
mp4 warning: out of bound child �
mp4 warning: no chunk defined
mp4 warning: STTS table of 0 entries
mp4 warning: cannot select track[Id 0x1]or
mp4 warning: no chunk defined
mp4 warning: STTS table of 0 entries
mp4: Fragment sequence discontinuity detected 1 != 0
avcodec warning: thread type 1: disabling hardware acceleration
main warning: picture is too late to be displayed (missing 14 ms)
main warning: picture is too late to be displayed (missing 14 ms)
main warning: picture is too late to be displayed (missing 14 ms) -
Working with content-type quicktime in ffmpeg throwing error `moov not found`
6 mai 2019, par user10204157So my program is setup to download a video and stream it into a file. These videos are .mp4 and .mov.
The problem is that .mov files do not work and I think it’s just the way I am streaming the file. But I am not sure. Because .mp4 files work without any errors. But when I use .mov files I get an error saying
Powershell Errors : [mov,mp4,m4a,3gp,3g2,mj2 @ 000002707b9cb700] moov atom not found
Which is coming from this powershell script :
ffmpeg -i $Args[0] -vcodec copy -acodec copy -movflags +faststart $Args[1]
The code that calls this script is as follows :
streamVideos_PROMISES.push(
axios({
method: "get",
url: video.url,
responseType: "stream"
})
);
}
});
Promise.all(streamVideos_PROMISES)
.then(function(response) {
response.map(response_item => {
let tempFileName = new Date().valueOf();
let videoType = response_item.headers["content-type"].split("/")[1];
if (videoType === "quicktime") videoType = "mov"; <---Maybe the issue?
const file = fs.createWriteStream(
`./cache/videos/${tempFileName + "."}${videoType}`
);
var spawn = require("child_process").spawn,
child;
response_item.data.pipe(file);
child = spawn("powershell.exe", [
"./scripts/ffmpeg_convert.ps1",
`./cache/videos/${tempFileName + "."}${videoType}`,
` ./cache/converted_videos/${tempFileName + "."}${videoType}`
]);
child.stdout.on("data", function(data) {
console.log("Powershell Data: " + data);
});
child.stderr.on("data", function(data) {
console.log("Powershell Errors: " + data);
});
child.on("exit", function() {
console.log("Finished converting thumbnails");
return thumbsupply.generateThumbnail(
`./cache/converted_videos/${tempFileName + "."}${videoType}`,
{
mimetype: response_item.headers["content-type"]
}
);
});
child.stdin.end(); //end input
});
})
.catch(err => {
console.log(err);
res.status(500).json({ Error: "Could not generate thumbnail" });
});note
Theresponse_item.headers["content-type"].split("/")
for .mov is quicktime, so I assumed that I could interchange the extensions...Which is probably wrong.Edit
So I manually typed in the$args
as follows :ffmpeg -i "./cache/videos/1556897345129.mov" -vcodec copy -acodec copy -movflags +faststart "./cache/converted_videos/are_you_kidding_me.mov"
and it works.
Edit 2
child = spawn("powershell.exe", [
"./scripts/ffmpeg_convert.ps1",
"./cache/videos/1556897345129.mov", <-- Using the string literal works.
` ./cache/converted_videos/${tempFileName + "."}${videoType}`
]);