Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (94)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (10321)

  • RTSP Stream Recording using FFMPEG

    9 juillet 2022, par Shanavas K Abdul Rahman

    I am not in to scripting. It would be really helpful if someone can help with a bash or python script on Raspbian v5 for my below requirement.

    


    I am trying to locally record Eufy Cam human detection using ffmpeg. I have managed to find the command to fetch the stream which is ffmpeg -hide_banner -y -loglevel verbose -rtsp_transport tcp -use_wallclock_as_timestamps 1 -i rtsp://192.168.xx.xx/live0 -vcodec copy -acodec copy -f segment -reset_timestamps 1 -segment_time 900 -segment_format mkv -strftime 1 "/media/pi/hdd/cam_name/camname$(date +"%Y-%m-%d-%H-%M-%S").mkv.

    


    Since these are battery operated cameras I cannot stream continuously. Camera generates stream only when it detects human as per my camera configuration. So when there is no human presence, ffmpeg return error "404 Stream Not Found" which is expected result. I want ffmpeg to reattempt in endless loop if previous attempts returns error 404 Stream Not Found.

    


    When human presence is detected, stream is being recorded to the mentioned location which works well. I need ffmpeg to reconnect even after successful stream fetch to seek for next motion recording. Successful stream download ends as follows.

    


    No more output streams to write to, finishing.

    


    :04.26 bitrate=N/A speed=0.559x    
[segment @ 0x2172d60] segment:'/media/pi/hdd/cam_name/camname2022-07-09-11-13-29.mkv' count:0 ended
[AVIOContext @ 0x2143630] Statistics: 16 seeks, 13 writeouts
frame=   31 fps=4.1 q=-1.0 Lsize=N/A time=00:00:04.26 bitrate=N/A speed=0.559x    
video:359kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (rtsp://192.168.100.16/live0):
  Input stream #0:0 (video): 34 packets read (373534 bytes); 
  Input stream #0:1 (audio): 42 packets read (7884 bytes); 
  Total: 76 packets (381418 bytes) demuxed
Output file #0 (/media/pi/Extreme 900/Gate_View/GateView2022-07-09-11-13-29.mkv):
  Output stream #0:0 (video): 31 packets muxed (367940 bytes); 
  Output stream #0:1 (audio): 42 packets muxed (7884 bytes); 
  Total: 73 packets (375824 bytes) muxed


    


    In summary, I am looking for a script with below conditions.

    


    IF terminal returns 404 Stream Not Found" OR "packets muxed THEN repeat same command in endless loop.

    


    I have several battery operated cameras. Please help with script.

    


    Thanks in advance.

    


    Regards,

    


    Shanavas Abdulrahman

    


  • conflicting of headers between ffmpeg and s3

    2 août 2021, par Juliette

    I have the code below in my server.js file for a web app that uses express for the backend and a built create react app that it serves.

    


    require('rootpath')();
const path = require('path');
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const cors = require('cors');

app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(cookieParser());

app.use(cors());


app.use(function(req, res, next) {
  res.header("Cross-Origin-Embedder-Policy", "require-corp");
  res.header("Cross-Origin-Opener-Policy", "same-origin");
  next();
});

// Have Node serve the files for our built React app
app.use(express.static(path.resolve(__dirname, 'build')));

// file api routes
app.use('/accounts', require('./accounts/accounts.controller'));

// file api routes
app.use('/files', require('./files/files.controller'));


// All other GET requests not handled before will return our React app
app.get('*', (req, res) => {
    res.sendFile(path.resolve(__dirname, 'build', 'index.html'));
});

// start server
const port = process.env.PORT || 2002;
app.listen(port, () => console.log('Server listening on port ' + port));


    


    The issue here is that I need this segment of code for my ffmpeg file upload to occur otherwise it throws a SharedArrayBuffer error :

    


       app.use(function(req, res, next) {
      res.header("Cross-Origin-Embedder-Policy", "require-corp");
      res.header("Cross-Origin-Opener-Policy", "same-origin");
      next();
    });


    


    However, when I leave this code in, another part of my program breaks down which gets presigned urls from s3 and plays audio. The issue whenever I play audios from my s3 bucket there is this :

    


    ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep


    


    The s3 code is this :

    


    function getTemporaryURL({ data }) {

  const customer_id = data['customer-id'];
  const sound_id = data['sound-id'];
  
  return new Promise((resolve, reject) => {
    //get presigned url

    var myBucket = process.env.NODE_APP_BUCKET_NAME;
    var myKey = "sounds/" + customer_id + "/" + sound_id + ".wav"; 
    const signedUrlExpireSeconds = 120;
    try {
      const url = s3.getSignedUrl('getObject', {
        Bucket: myBucket,
        Key: myKey,
        ResponseContentDisposition: 'attachment',
        Expires: signedUrlExpireSeconds
      });
      resolve(url)
    }
    catch {
      console.log('S3 Object does not exist');
      resolve('');
    }
  });
}


    


    How can I modify my server.js to accommodate both of my needs ?

    


  • yt-dlp get audio only link -> ffmpeg piped audio -> ffplay

    5 juin 2022, par james28909

    Ok, i have a perl script that i am trying to figure out why it is throwing an io error. First i use yt-dlg to get the link of only the audio - this works as expected and i can navigate to the link in a browser just fine. then i open a ffmpeg pipe in perl and then try to read the output from ffmpeg and eventually, if i can get this working, i will process the ffmpeg output then send to a named pipe.

    


    the problem comes from the ffmpeg when i am processing the data from the link obtained with yt-dlp, and i think it has to do with my while loop but i am not sure what. i have a named pipe called "input". i summon ffmpeg with the following :

    


    #/usr/bin/perl
use strict;
use warnings;

my $file = /path/to/named/pipe
my $read_len = 1024;

open (my $SOURCE_AUDIO, '-|', "ffmpeg -y -i \'$link\' -map 0 -c copy -ac 2 -f opus -ar 48000 pipe:1");
binmode($SOURCE_AUDIO);

# process the ffmpeg output.i have a function i want to implement here, 
# but i need to be able to parse ffmpeg output in set read lengths

while( read($SOURCE_AUDIO, my $buf, $read_len)){
print $file $buf;
};


    


    but before the end of the playback, somewhere around the end of the audio stream ffmpeg throws errors like this :

    


    [tls @ 0x5d0de00] Error in the pull function..2kbits/s speed=1.21x
[tls @ 0x5d0de00] IO error: Connection reset by peer
[tls @ 0x5d0de00] The specified session has been invalidated for some reason.
    Last message repeated 1 times
https://rr3---sn-(truncated): Input/output error
size=    1021kB time=00:01:18.36 bitrate= 106.7kbits/s speed=1.21x
video:0kB audio:1012kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.808163%


    


    i am not sure what is causing it to end early, or what is causing it to be terminated. i can download the file and re-encode it (if needed) and then play it flawlessly with ffplay, but i cannot, for the life of me, parse ffmpeg output and write it to a named pipe. any help sure would be appreciated. thanks

    


    P.S. i am using latest updated windows 11 and WSL's built in perl :

    


    This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
(with 50 registered patches, see perl -V for more detail)

Copyright 1987-2019, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.