
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (77)
-
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 (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (10773)
-
streaming an mkv file while processing with ffmpeg
2 avril 2019, par Phani RithvijWhat I want to do :
- I want to play an mkv video in Firefox.
- But Firefox doesn’t support the mkv format.
So I’ve searched a lot and found that,
I could stream instead of playing the video following these steps.- mkv can be converted to an m3u8 using FFmpeg
- The m3u8 points towards ts segment files
- then use hls.js on the browser side to play the video
But the catch is I want to do this programmatically.
What I actually want to do :
Steps
-
the client uploads a huge (>1 GB) mkv file to the client’s server (server is the client’s machine itself)
-
after the upload is done,
-
client requests to play the video.
-
the server starts transcoding and sends the client the m3u8 stream immediately instead of making the client wait for the transcoding to complete.
-
the client should be able to seek the video. (the most IMPORTANT part)
It is possible as Emby and Plex both have implemented it.
I was able to get this to work in chrome as it supports playing some mkv files.
I wrote a node js server that acceptsRange
header and pseudo-streams the video.But as I’ve mentioned Firefox says NO to mkv.
So I tried the hls thing but I couldn’t quite get the command to generate the stream and also play on the fly.
I started this on a command line
ffmpeg -i ../stream.mkv -hls_list_size 0 -acodec copy -vcodec copy file.m3u8
and a simple
http-server
on another shell instanceMy index.html file
<code class="echappe-js"><script src='http://stackoverflow.com/feeds/tag/hls.js'></script><script><br />
var video = document.getElementById('video');<br />
if(Hls.isSupported()) {<br />
var hls = new Hls();<br />
hls.loadSource('file.m3u8');<br />
hls.attachMedia(video);<br />
hls.on(Hls.Events.MANIFEST_PARSED,function() {<br />
video.play();<br />
});<br />
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {<br />
video.src = 'file.m3u8';<br />
video.addEventListener('loadedmetadata',function() {<br />
video.play();<br />
});<br />
}<br />
</script>and while it was running I went ahead and requested the server.
I was able to get the video but It only seeks as far it’s converted into the ts files.
And it’s random and the video length keeps increasing. It won’t play sometimes and after the FFmpeg is done converting to m3u8 the video plays if I refresh the webpage.
I think this has to do with the continuous overwriting of the m3u8 file.
is there a way to predetermine the file contents of m3u8 and fill it up ?I want to be able to seek even further and somehow spawn another FFmpeg process
to start from that timestamp of the video ? How could I approach the seeking part ?So what I’d like to do again is
- I want to request the server to play a video file
- It spawns a child process FFmpeg that does the transcoding
- Sends the client the stream
- The client should be able to seek to the end and it should play the thing.
-
RTSP stream to ffmpeg problems
14 octobre 2022, par maeekI'm writing a web application for managing and viewing streams from ONVIF ip-cameras.

It's written in nodejs. The idea is to run a child process in node and pipe output to node, then send the buffer to client and render it on canvas. I have a working solution for sending data to client and rendering it on canvas using websockets but it only works on one of my cameras.

I own 2 IP cameras and both of them have rtsp server.

One of them(let's name it camX) kind of works with this ffmpeg command (sometimes it just stops, maybe due to packet losses) :

ffmpeg -rtsp_transport tcp -re -i -f mjpeg pipe:1



But the other one(camY) returns
Nonmatching transport in server reply
and exits.

I discovered that the camY transport is
unicast
but ffmpeg doesn't support this particular lower_transport as I read on ffmpeg forum.

So I started looking for a solution. My first idea was to use
openRTSP
which works fine with both streams.
I looked at the documentation and came up with this command :

openRTSP -4 -c | ffmpeg -re -i pipe:0 -f mjpeg pipe:1

-4
parameter returns stream to pipe in mp4 format

And here's another problem I ran into, ffmpeg returns :

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x559a4b6ba900] moov atom not found 
pipe:0: Invalid data found when processing input



Is there any way to make this work ?
I tried various solutions I found, but none of them worked.


EDIT


As @Gyan suggested I used
-i
parameter instead of-4
but it didn't solve my problem.

My command :


openRTSP -V -i -c -K | ffmpeg -loglevel debug -re -i pipe:0 -f mjpeg pipe:1
 
Created receiver for "video/H264" subsession (client ports 49072-49073)
Setup "video/H264" subsession (client ports 49072-49073)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
AVIFileSink::setWord(): SeekFile64 failed (err 29)
Outputting to the file: "stdout"
[avi @ 0x5612944268c0] Format avi probed with size=2048 and score=100
[avi @ 0x56129442f7a0] use odml:1
Started playing session
Receiving streamed data (signal with "kill -HUP 15028" or "kill -USR1 15028" to terminate)...
^C
[AVIOContext @ 0x56129442f640] Statistics: 16904 bytes read, 0 seeks
pipe:0: Invalid data found when processing input



As you can see openRTSP command return err 29 but in meantime it outputs some data to pipe.

When I terminate the command ffmpeg shows that it read some data but couldn't process it.

Here's the function that produces that error :


void AVIFileSink::setWord(unsigned filePosn, unsigned size) {
 do {
 if (SeekFile64(fOutFid, filePosn, SEEK_SET) < 0) break;
 addWord(size);
 if (SeekFile64(fOutFid, 0, SEEK_END) < 0) break; // go back to where we were

 return;
 } while (0);

 // One of the SeekFile64()s failed, probable because we're not a seekable file
 envir() << "AVIFileSink::setWord(): SeekFile64 failed (err "
 << envir().getErrno() << ")\n";
}



In my opinion it looks like it won't be able to seek file because it's a stream not a static file.

Any suggestion for a workaround ?

-
Using ffmpeg in node, without using fluent-ffmpeg
16 mai 2018, par drexdeltaI am using ffmpeg without using fluent-ffmpeg. I am using ’child_process’ from node.
First of all I verified how can I pass more than one arguments to the child process command. and I verified it given below code.
I used copy command like this
cp vid1.mp4 vid2.mp4
which successfully copied vid1 into vid2.
const execFile = require('child_process').execFile;
const child = execFile('cp', ['vid1.mp4', 'vid3.mp4'], (error, stdout, stderr) => {
if (error) {
console.error('stderr: =============================', stderr);
throw error;
}
console.log('stdout: ==========================', stdout);
});
console.log('here');Above code is content of the ’index.js’(default entry point in node). And running this with node . , which copies vid1 into vid3 successfully.
Now, I want to do watermarking to the given video. For that I am using this tutorial. Currently link to the actual tutorial is broken, you can see it here.
This is the command that I am using
ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=10:10" output.mp4
Now the same command I am using like this ,
const execFile = require('child_process').execFile;
const child = execFile('ffmpeg', ['-i', 'input.mp4' , '-i' , 'logo.png' , '-filter_complex' , '"overlay=10:10"' , 'output.mp4' ], (error, stdout, stderr) => {
if (error) {
console.error('stderr: =============================', stderr);
throw error;
}
console.log('stdout: ==========================', stdout);
});
console.log('here');and I am getting an error , that ,
No such filter : ’"overlay’ Error initializing complex filters. Invalid
argument/Users/neerpatel/Desktop/testProjects/childProcess/index.js:7
throw error ;
^Error : Command failed : ffmpeg -i input.mp4 -i logo.png
-filter_complex "overlay=10:10" output.mp4You can clearly see that the same command that runs in terminal directly, doesn’t work when I pass it in child process. Why does it happen ?
Moreover, I wanted to add tag ’watermarking’ , but I can’t create tag since my reputation is below 1500. please, someone do it.
UPDATE :
I used EXEC , instead of execFile . and it worked like charm, but parent file kept waiting for child process. Child process never returns END signal. and this is my code.const exec = require('child_process').exec;
const child = exec('ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=10:10" output.mp4', (error, stdout, stderr) => {
if (error) {
console.error('stderr: =============================', stderr);
throw error;
}
console.log('stdout: ==========================', stdout);
});
console.log('here');