
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 (70)
-
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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (10992)
-
MJPEG Stream works in Firefox but not in Chrome
11 décembre 2019, par MaorationWe have a system that contains cameras and we want to stream them to multiple clients.
Behind the scenes on the server we get connections from cameras, we keep everything related to that camera in a CameraContainer, which also includes a mpegtsToMjpegStream that extends Duplex (both Readable and Writable Stream).after a camera connects, we open an ffmpeg process to work on the incoming mpegts stream, and output an MJPEG stream :
'-map', '0:v', '-c:v', 'mjpeg','-f', 'mjpeg', `-`,
** we are doing this because we are also mapping to other outputs, like writing files.
On the ’serving’ side, we are currently testing a simple API to GET an mjpeg stream with a camera id :
async getCameraStream(@Param('cameraId') cameraId: string, @Res() res): Promise<any> {
const cameraContainer = this.cameraBridgeService.getCameraContainer(cameraId);
if (!cameraContainer) {
throw new Error(`Camera with id: ${cameraId} was not found`);
}
if (!cameraContainer.mpegtsToMjpegStream) {
throw new Error('ERROR: mpegtsToMjpegStream stream does not exist on this camera container');
}
const writable = new Writable({
write: (chunk, encoding, callback) => {
res.write(`Content-Type: image/jpeg\r\nContent-Length: ${chunk.length}\r\n\r\n`);
res.write(chunk);
res.write('\r\n--ffmpeg_streamer\r\n');
callback();
},
});
res.set('Content-Type', 'multipart/x-mixed-replace;boundary=ffmpeg_streamer');
res.write('--ffmpeg_streamer\r\n');
cameraContainer.mpegtsToMjpegStream.pipe(writable, { end: false });
res.once('close', () => {
if (cameraContainer.mpegtsToMjpegStream && writable) {
cameraContainer.mpegtsToMjpegStream.unpipe(writable);
}
res.destroy();
});
</any>
The problem is this code works very nicely when accessing the stream with Firefox- after 1-2 seconds we get a stable, high quality, low latency stream.
With Chrome however, the same code does not behave- the video output is corrupted, disappears into a black screen all the time, and we have to keep refreshing the page constantly just to view a few seconds of the stream until it disappears again.Any suggestions as to why this happens and how can I fix it ?
-
avformat_open_input for 24-bit audio fails intermittently with avfoundation due to "audio format is not supported"
27 septembre 2019, par NaderNaderMy application uses the ffmpeg APIs (avformat, avdevice, etc) to open a selected audio input for encoding. For audio inputs configured for 24-bit I can reliably open them the first time, but when I close and reopen that input later, the avformat_open_input() call fails due to "audio format is not supported". My testing shows that it never fails the first time after starting my, and has only about a 50% chance of success when reopening.
The failure only occurs when I configure my "Built-in Microphone" audio input for 24-bit integer. 16-bit integer and 32-bit float work reliably. Changing the number of channels and sample rate has no effect.
I have read the documentation and see that the proper way to free the resources after opening is to call avformat_close_input. The only way I have found to guarantee success is to only open the input once.
I have written a test program to recreate these failures.
int main() {
avdevice_register_all();
cout << "Running open audio test" << endl;
int i;
for(i = 0; i< 10; i++) {
AVDictionary* options = NULL;
AVInputFormat* inputFormat = av_find_input_format("avfoundation");
if (!inputFormat) {
cout << "avfoundation inputFormat=null" << endl;
}
AVFormatContext* formatContext = avformat_alloc_context();
int result = avformat_open_input(&formatContext, ":1", inputFormat, &options);
if (result < 0) {
char error[256];
av_strerror(result, error, sizeof(error));
cout << "result=" << result << " " << error << endl;
} else {
cout << "input opened successfully" << endl;
}
sleep(1);
avformat_close_input(&formatContext);
sleep(1);
}
return 0;
}I would expect the main loop to succeed each time but a typical output shows a high failure rate :
Running open audio test
input opened successfully
[avfoundation @ 0x7fdeb281de00] audio format is not supported
result=-5 Input/output error
[avfoundation @ 0x7fdeb2001400] audio format is not supported
result=-5 Input/output error
[avfoundation @ 0x7fdeb2001400] audio format is not supported
result=-5 Input/output error
input opened successfully
input opened successfully
input opened successfully
[avfoundation @ 0x7fdeb2068800] audio format is not supported
result=-5 Input/output error
input opened successfully
input opened successfullyI have tried increasing the sleep time between close and open to 5 seconds, but saw no difference in behavior. While this program runs, I can use the MacOS Audio MIDI Setup to change the microphone input configuration and watch the output change from all success to intermittent errors.
The source of the failure is https://github.com/FFmpeg/FFmpeg/blob/master/libavdevice/avfoundation.m#L672
It appears avfoundation.m internally is opening an input stream and grabbing an audio frame to determine the format, but the value returned is not valid sometimes, when the process has previously opened and closed that input.
Am I not closing the resources properly ? Do I have a hardware issue specific to my macbook ?
Additional Details :
Tested MacBook Pro with MacOS Mojave 10.14.6
Tested with Ffmpeg 3.4.1, 4.0, and 4.1list_devices :
[AVFoundation input device @ 0x7f80fff066c0] AVFoundation video devices:
[AVFoundation input device @ 0x7f80fff066c0] [0] FaceTime HD Camera
[AVFoundation input device @ 0x7f80fff066c0] [1] Capture screen 0
[AVFoundation input device @ 0x7f80fff066c0] AVFoundation audio devices:
[AVFoundation input device @ 0x7f80fff066c0] [0] Behringer Duplex
[AVFoundation input device @ 0x7f80fff066c0] [1] Built-in Microphone
[AVFoundation input device @ 0x7f80fff066c0] [2] USB Audio CODEC -
TCP or UDP ? Delays building up on production for video stream
31 janvier 2020, par Ben BeriI am creating a video stream from a camera with FFMPEG and nodejs stream
Duplex
class.this.ffmpegProcess = spawn('"ffmpeg"', [
'-i', '-',
'-loglevel', 'info',
/**
* MJPEG Stream
*/
'-map', '0:v',
'-c:v', 'mjpeg',
'-thread_type', 'frame', // suggested for performance on StackOverflow.
'-q:v', '20', // force quality of image. 2-31 when 2=best, 31=worst
'-r', '25', // force framerate
'-f', 'mjpeg',
`-`,
], {
shell: true,
detached: false,
});On local network, we are testing it with a few computers and every thing works very stable with latency of maximum 2 seconds.
However, we have imported the service to AWS production, when we connect the first computer we have a latency of around 2 seconds, but if another client connects to the stream, they both start delaying a lot, where the latency builds up to 10+ seconds, and in addition the video is very slow, as in the motion between frames.
Now I asked about TCP or UDP is because we are using TCP for the stream, which means that every packet that is sent is implementing the TCP syn-ack-synack protocol and sequence.
My question is, could TCP really be causing such an issue that the delays get up to 10 seconds with very slow motion ? because on local network it works very just fine.