
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (39)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (7966)
-
Filling raw pixels to AVPicture
21 août 2016, par Mohammad Abu MusaI am writing a screen recorder using Google native client, I have raw images coming from chrome, the issue
avpicture_fill
is not filling the pixels as it should.I already have all the required parameters
data
,size
,andtimestamp
yet it still fill the picture with nulls. What is the method to get the correct pixels copiedI think the same case is relevant to Android because I noticed some developers who mentioned something similar
I can share the code if that helps solving the issue
const uint8_t* data = static_cast<const>(frame.GetDataBuffer());
pp::Size size;
frame.GetSize(&size);
uint32_t buffersize = frame.GetDataBufferSize();
if (is_recording_) {
frames_count_++;
std::shared_ptr<framewrap> oframe(new FrameWrap);
oframe->Get()->format = AV_PIX_FMT_BGRA;
oframe->Get()->width = frame_size_.width();
oframe->Get()->height = frame_size_.height();
oframe->Get()->pts = frame.GetTimestamp();;
avpicture_fill((AVPicture*)oframe->Get(), (uint8_t*)data, PIX_FMT_RGB32, frame_size_.width(), frame_size_.height()); // fill image with input screenshot
</framewrap></const>below the error log I get before I get a
segmentation fault
`LOG: Init has been called for instance
LOG: The mount result is: (0 for success, -1 for failure)
LOG: Mount Result is : 0
LOG: Init libav
LOG: Init libav success
LOG: Pixel format: BGRA
LOG: Starting Recording
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error
LOG: Setting buffer size to: 5860000
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid
LOG: File Open for writing
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid
ERROR: [libav warning] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[libvpx-vp9 @ 0xfef52fa0] AVFrame.format is not set
ERROR: [libav warning] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[libvpx-vp9 @ 0xfef52fa0] AVFrame.format is not set[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[libvpx-vp9 @ 0xfef52fa0] AVFrame.width or height is not set
ERROR: [libav error] [libvpx-vp9 @ 0xfef52fa0] Failed to set VP8E_SET_NOISE_SENSITIVITY codec control: Unspecified internal error[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7c4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid[libvpx-vp9 @ 0xfef52fa0] AVFrame.format is not set[IMGUTILS @ 0xfffef7a4] Picture size 0x0 is invalid
LOG: Encoding frame 0 (size= 0)
LOG: Bytes written 0 -
icecast2, nodejs, ffmpeg, radio, ogg
25 juillet 2024, par UximyI have a problem which is that when I start icecast server on ubuntu and not only on ubuntu but also on windows regardless of the operating system, when I first go to the radio station in icecast2 http://localhost:8000/radio the music plays but after restarting the page in the browser, the player stops loading, I tried the solution with nocache in the browser in the address bar, nothing helps, I looked at many users configs, they did not encounter such problems, I will leave my config below, I also wrote a code on nodejs I will also leave it below, the problem plays the same that if I go to a direct icecast link, what I will do through the node js code + ffmpeg, also about the logs, nothing outputs even a hint of any error that is related to this problem


Config IceCast :


<icecast>
 <location>Earth</location>
 <admin>icemaster@localhost</admin>
 <hostname>localhost</hostname>

 <limits>
 <clients>100</clients>
 <sources>10</sources>
 524288
 60
 30
 10
 1
 65536
 </limits>

 <authentication>
 hackme
 hackme
 admin
 hackme
 </authentication>

 
 <port>8000</port>
 0.0.0.0
 
 
 
 <port>8443</port>
 0.0.0.0
 <ssl>1</ssl>
 

 
 <header value="*"></header>
 <header value="Origin, X-Requested-With, Content-Type, Accept"></header>
 <header value="GET, POST, OPTIONS"></header>
 <header value="no-cache, no-store, must-revalidate"></header>
 <header value="no-cache"></header>
 <header value="0"></header>
 

 
 <mount type="normal">
 /radio
 <password>mypassword</password>
 <public>1</public>
 100
 Anime Vibes
 Anime Vibes
 <genre>various</genre>
 audio/ogg
 65536
 
 
 <header value="*"></header>
 <header value="Origin, X-Requested-With, Content-Type, Accept"></header>
 <header value="GET, POST, OPTIONS"></header>
 <header value="no-cache, no-store, must-revalidate"></header>
 <header value="no-cache"></header>
 <header value="0"></header>
 
 </mount>

 <fileserve>1</fileserve>

 <paths>
 <logdir>/var/log/icecast2</logdir>
 <webroot>/etc/icecast2/web</webroot>
 <adminroot>/etc/icecast2/admin</adminroot>
 
 <alias source="/" destination="/status.xsl"></alias>
 
 /etc/icecast2/cert/icecast.pem
 
 </paths>

 <logging>
 <accesslog>access.log</accesslog>
 <errorlog>error.log</errorlog>
 <playlistlog>playlist.log</playlistlog>
 <loglevel>1</loglevel> 
 <logsize>10000</logsize> 
 <logarchive>1</logarchive>
 </logging>
</icecast>



Code Node.js :


const express = require('express');
const { spawn } = require('child_process');
const path = require('path');
const fs = require('fs');
const https = require('https');
const app = express();
const port = 3000;

const privateKey = fs.readFileSync('./cert/privateKey.key', 'utf8');
const certificate = fs.readFileSync('./cert/certificate.crt', 'utf8');

const credentials = {
 key: privateKey,
 cert: certificate
};

app.use(express.static(path.join(__dirname)));

// Check if playlist file exists
const playlistPath = path.join(__dirname, 'playlist.txt');
if (!fs.existsSync(playlistPath)) {
 console.error('Playlist file does not exist');
 process.exit(1);
}

console.log(`Playlist path: ${playlistPath}`);

// Start FFmpeg process to create continuous stream from playlist
const ffmpegProcess = spawn('ffmpeg', [
 '-re',
 '-f', 'concat',
 '-safe', '0',
 '-protocol_whitelist', 'file,http,https,tcp,tls',
 '-i', playlistPath,
 '-c:a', 'libvorbis',
 '-f', 'ogg',
 '-tls', '1',
 'icecast://source:mypassword@localhost:8443/radio'
]);

ffmpegProcess.stdout.on('data', (data) => {
 console.log(`FFmpeg stdout: ${data}`);
});

ffmpegProcess.stderr.on('data', (data) => {
 console.error(`FFmpeg stderr: ${data}`);
});

ffmpegProcess.on('close', (code) => {
 console.log(`FFmpeg process exited with code ${code}`);
});

app.get('/radio', (req, res) => {
 res.setHeader('Content-Type', 'audio/ogg');
 res.setHeader('Transfer-Encoding', 'chunked');

 const requestOptions = {
 hostname: 'localhost',
 port: 8443,
 path: '/radio',
 method: 'GET',
 headers: {
 'Accept': 'audio/ogg'
 },
 rejectUnauthorized: false
 };

 const request = https.request(requestOptions, (response) => {
 response.pipe(res);

 response.on('end', () => {
 res.end();
 });
 });

 request.on('error', (err) => {
 console.error(`Request error: ${err.message}`);
 res.status(500).send('Internal Server Error');
 });

 request.end();
});
https.globalAgent.options.ca = [certificate];
// Create HTTPS server
const httpsServer = https.createServer(credentials, app);

httpsServer.listen(port, () => {
 console.log(`Server is running at https://localhost:${port}`);
});



I hope for your help and any advice, thanks in advance


-
Latency in Gst-rtsp-server using appsrc
18 décembre 2015, par alasinI’m trying to setup my own appsrc based Gst-rtsp-server which captures frames through Directshow, encodes to h264 stream and broadcasts the stream over LAN. Using this example as a reference, I have something like this :
void need_data(GstElement *appsrc, guint unused, MyContext *ctx)
{
buffer = gst_buffer_new_allocate(NULL, size, NULL);
captureThread->setMutex();
gst_buffer_map (buffer, &info, GST_MAP_WRITE);
memcpy (info.data, captureThread->getFrame(), size);
gst_buffer_unmap (buffer, &info);
/* Increment the timestamp for 25 fps */
GST_BUFFER_PTS(buffer) = ctx->timestamp;
GST_BUFFER_DURATION(buffer) = gst_util_uint64_scale_int(1, GST_SECOND, 40);
ctx->timestamp += GST_BUFFER_DURATION(buffer);
g_signal_emit_by_name(appsrc, "push-buffer", buffer, &ret);
captureThread->unsetMutex();
}
void media_configure(GstRTSPMediaFactory *factory, GstRTSPMedia *media, gpointer user_data)
{
GstElement *element, *appsrc;
MyContext *ctx;
/* get the element used for providing the streams of the media */
element = gst_rtsp_media_get_element(media);
/* get our appsrc, we named it 'mysrc' with the name property */
appsrc = gst_bin_get_by_name_recurse_up(GST_BIN(element), "mysrc");
/* this instructs appsrc that we will be dealing with timed buffer */
gst_util_set_object_arg(G_OBJECT(appsrc), "format", "time");
/* configure the caps of the video */
g_object_set(G_OBJECT(appsrc), "caps",
gst_caps_new_simple("video/x-raw",
"format", G_TYPE_STRING, "NV12",
"width", G_TYPE_INT, 640,
"height", G_TYPE_INT, 480,
"framerate", GST_TYPE_FRACTION, 25, 1, NULL), NULL);
ctx = g_new0(MyContext, 1);
ctx->timestamp = 0;
/* make sure the data is freed when the media is gone */
g_object_set_data_full(G_OBJECT(media), "my-extra-data", ctx, (GDestroyNotify)g_free);
/* install the callback that will be called when a buffer is needed */
g_signal_connect(appsrc, "need-data", (GCallback)need_data, ctx);
gst_object_unref(appsrc);
gst_object_unref(element);
}
int main(int argc, char *argv[])
{
GMainLoop *loop;
GstRTSPServer *server;
GstRTSPMountPoints *mounts;
GstRTSPMediaFactory *factory;
/* This thread captures frames from dshow source at 30fps */
captureThread = new CaptureThread();
captureThread->Launch();
gst_init(&argc, &argv);
loop = g_main_loop_new(NULL, FALSE);
server = gst_rtsp_server_new();
/* get the mount points for this server, every server has a default object
* that be used to map uri mount points to media factories */
mounts = gst_rtsp_server_get_mount_points(server);
factory = gst_rtsp_media_factory_new();
gst_rtsp_media_factory_set_launch(factory,
"( appsrc name=mysrc ! x264enc speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 pt=96 )");
gst_rtsp_media_factory_set_shared(GST_RTSP_MEDIA_FACTORY(factory), TRUE);
//gst_rtsp_media_factory_set_latency(factory, 10);
g_signal_connect(factory, "media-configure", (GCallback)media_configure, NULL);
gst_rtsp_mount_points_add_factory(mounts, "/test", factory);
/* don't need the ref to the mounts anymore */
g_object_unref(mounts);
/* attach the server to the default maincontext */
gst_rtsp_server_attach(server, NULL);
g_print("stream ready at rtsp://127.0.0.1:8554/test\n");
g_main_loop_run(loop);
return 0;
}I’m able to test the live feed at 25fps from a client but there’s a constant lag offset of around 1 second. I’ve tried changing the fps, buffer timestamp and other things but the this lag still persists.
Anything that could help me remove this lag would be much appreciated