
Recherche avancée
Autres articles (67)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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" (...) -
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 (6335)
-
when concatenating video segments ffmpeg shows error : "Media type mismatch between the parsed_overlay_20"
27 janvier 2018, par user2642511773/5000
I’m trying to apply a scaling and chromakey effect to different segments of a video and then combine those segments again into one.To improve the time and performance I have developed a program that creates all the filters in a single command.
The plan is simple, I have a video * .mov recorded with a green screen and a background * .jpg,
- I first prepare a couple of backgrounds with blur effect from the JPG image
- I then apply chromakey to make the green part of the video transparent
- I trim the video to which I applied the chromakey in several time segments and to each segment I applied a scale and crop and I overlay it to one of the backgrounds prepared in step 1
- Concatenate all segments already processed.
When I execute the resulting command it gives me the error
the command is this :
ffmpeg -i "C:\ffmpeg\pruebas\FFBlue_ProjectsFiles\chroma\green1.mov" -i C:\ffmpeg\pruebas\FFBlue_ProjectsFiles\fondos\sc.jpg -filter_complex " [1:v]scale=iw*3:-1,crop=w=iw/3:h=ih/3:y=(ih-oh)/3:x=((iw-ow)/2)+(ow/2-ow/3),boxblur=7:2[fondo_3IZQ] ; [1:v]scale=iw*4:-1,crop=w=iw/4:h=ih/4:y=(ih-oh)/3:x=(in_w-out_w)/2,boxblur=6:2[fondo_4CEN] ; [1:v]scale=iw*5:-1,crop=w=iw/5:h=ih/5:y=(ih-oh)/3:x=((iw-ow)/2)+(ow/2-ow/3),boxblur=5:2[fondo_5IZQ] ; [0]chromakey=color=#83BD46:similarity = 0.1 : blend = 0.05,selectivecolor=reds=0 0 0 -1:yellows=0 0.1 0 -0.5:greens=0 0 -1 0:whites=0 0 0 -0.7 [vid] ; [vid] trim=start=0:duration=0,setpts=PTS-STARTPTS,scale=iw*4:-1,crop=w=iw/4:h=ih/4:y=(ih-oh)/3:x=((iw-ow)/2)+(ow/2-ow/3)[vid_0] ; [fondo_4CEN][vid_0]overlay[toma_0] ; [vid] trim=start=0:duration=3.41933,setpts=PTS-STARTPTS,scale=iw*3:-1,crop=w=iw/3:h=ih/3:y=(ih-oh)/3:x=(in_w-out_w)/2[vid_1] ; [fondo_3IZQ][vid_1]overlay[toma_1] ; [vid] trim=start=3.41932988166809:duration=2.85067,setpts=PTS-STARTPTS,scale=iw*5:-1,crop=w=iw/5:h=ih/5:y=(ih-oh)/3:x=(in_w-out_w)/2[vid_2] ; [fondo_5IZQ][vid_2]overlay[toma_2] ; [toma_0] [toma_1] [toma_2] concat=n=3:v=1:a=1:unsafe=1 [v_concatenado][a_concatenado]" -map [v_concatenado] -map [a_concatenado] "C:\ffmpeg\pruebas\FFBlue_ProjectsFiles\chroma\green1_FINAL.mov"
when I execute it ffmpeg says :
[Parsed_overlay_20 @ 0000000000404100] Media type mismatch between the 'Parsed_o
verlay_20' filter output pad 0 (video) and the 'Parsed_concat_26' filter input p
ad 1 (audio)
[AVFilterGraph @ 0000000003527a00] Cannot create the link overlay:0 -> concat:1
Error initializing complex filters.
Invalid argument -
Prepare mp4 videos for Media Source Extensions API using ffmpeg
6 février 2018, par lerThis command produce init.mp4 + bunch of m4s files, i’m trying to play them using MSE :
ffmpeg -i <input file="file" /> -f hls -hls_segment_type fmp4 -c:v copy playlist.m3u8
This is the client side code i’m using :
var socket = io();
var video = document.querySelector('video');
var mimeCodec = 'video/mp4; codecs="avc1.64000d,mp4a.40.2"';
if ('MediaSource' in window && MediaSource.isTypeSupported(mimeCodec)) {
var mediaSource = new MediaSource;
video.src = URL.createObjectURL(mediaSource);
mediaSource.addEventListener('sourceopen', sourceOpen);
} else {
console.error('Unsupported MIME type or codec: ', mimeCodec);
}
function sourceOpen (_) {
var mediaSource = this;
var sourceBuffer = mediaSource.addSourceBuffer(mimeCodec);
sourceBuffer.mode = 'sequence';
socket.on('broadcast', function (newPiece) {
// here i'm getting the buffer of the video == buffer
sourceBuffer.addEventListener('updateend', function (_) {
video.play().then(function() { }).catch(function(error) { });
});
sourceBuffer.appendBuffer(buffer); // when the seconde video comes i append it's buffer
})
};Everything works fine when i send
init.mp4
file followed byplaylist0.m4s, playlist1.m4s, playlist2.m4s, ....
.
But when i try to playinit.mp4
file followed immediately 6,7,8 not 0,1,2 meaningplaylist6.m4s, playlist7.m4s, playlist8.m4s, ....
, it didn’t work.
I don’t know why, this supposed to be live video, the viewer that is watching the live from the beginning getsinit.mp4, playlist0.m4s, playlist1.m4s, playlist2.m4s, ....
.
Someone that came after 5 minutes gets something like thisinit.mp4, playlist32.m4s, playlist33.m4s, playlist34.m4s, ....
and so on, but so far it works only for the viewer that get’sinit.mp4, playlist0.m4s, playlist1.m4s, playlist2.m4s, ....
. the video can’t play for the others -
Play HLS segments through Media source extensions
11 février 2018, par lerI got a list of
m4s
andinit.mp4
from this FFMPEG commandffmpeg -i bunny.mp4 -f hls -hls_segment_type fmp4 -c:v copy playlist.m3u8
I send those chunks using
Socket
and try to play them through MSE.
When i send them in this order :init.mp4 + playlist0.m4s + playlist1.m4s ...
They play without any problem, But when i want to start from the chunk number 3 meaning
init.mp4 + playlist3.m4s
for example i get this error :video frame with PTS 0us has negative DTS -80000us after applying timestampOffset, handling any discontinuity, and filtering against append window.
I want to be able to start from any chunk, currently the only way to play the video is to star by
init.mp4 + playlist0.m4s
meaningplaylist0.m4s
becauseinit.mp4
contain just headers of the video, This is the client code i’m using :var socket = io();
var video = document.querySelector('video');
var mimeCodec = 'video/mp4; codecs="avc1.64000d,mp4a.40.2"'; // true
if ('MediaSource' in window && MediaSource.isTypeSupported(mimeCodec))
{
var mediaSource = new MediaSource;
video.src = URL.createObjectURL(mediaSource);
mediaSource.addEventListener('sourceopen', function () {
var mediaSource = this;
var sourceBuffer = mediaSource.addSourceBuffer(mimeCodec);
sourceBuffer.mode = 'segments';
sourceBuffer.addEventListener('updateend', function (_) { video.play().then(function() { }).catch(function(error) { }); });
socket.on('broadcast', function (chunk) {
downloadData(chunk.uri, function(arrayBuffer) {
sourceBuffer.appendBuffer(arrayBuffer);
});
});
});
} else {
console.error('Unsupported MIME type or codec: ', mimeCodec);
}
function downloadData(url, cb) {
var xhr = new XMLHttpRequest;
xhr.open('get', url);
xhr.responseType = 'arraybuffer';
xhr.onload = function () {
cb(new Uint8Array(xhr.response));
};
xhr.send();
}