Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (91)

  • À propos des documents

    21 juin 2013, par

    Que faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
    Document bloqué en file d’attente ?
    Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (15608)

  • ffmpeg batch process issue mac

    22 octobre 2023, par e e

    I'm using ffmpeg to batch process all files(with names containing spaces) in a directory. The script is like :

    


    echo my converter
read -p "Enter give folder: " folder
echo '//////////////////////START CONVERTING FROM FOLDER///////////////////////'

find $folder -type f -name "*[[:space:]]*" | while read file; do
    release="${file%%.*}"'_t.mp4';
    echo "$file";
    ffmpeg -i "$file" -c copy "$release" -loglevel error -stats
    echo $release;
done


    


    the script searches all the files in the address and ffmpeg one by one. However the first file will always fail due to some unknown issues :

    


    [mpegts @ 0x7fb8e9904a40] Continuity check failed for pid 17 expected 2 got 3
[mpegts @ 0x7fb8e9904a40] Continuity check failed for pid 0 expected 0 got 2
[mpegts @ 0x7fb8e9904a40] Continuity check failed for pid 4096 expected 0 got 2
[mpegts @ 0x7fb8e9904a40] Continuity check failed for pid 256 expected 2 got 7
[mpegts @ 0x7fb8e9904a40] Packet corrupt (stream = 0, dts = 203523000).
/Users/xy/Downloads/aaa/aa vv.ts: corrupt input packet in stream 0
[NULL @ 0x7fb8e9905a40] Decoding VUI



    


    If there is only one file, the process works fine.
If comment out the ffmpeg command, it echoes as expected :

    


    /Users/xy/Downloads/aaa/aa vv_t.mp4
/Users/xy/Downloads/aaa/aa vv_t_t.mp4
/Users/xy/Downloads/aaa/aa vv.ts
/Users/xy/Downloads/aaa/aa vv_t.mp4
/Users/xy/Downloads/aaa/cc ee.ts
/Users/xy/Downloads/aaa/cc ee_t.mp4


    


    it first find the target files and then converts into another with different file names.
Any suggestions, thank you !!

    


  • pthread_frame : allow per-field ThreadFrame owners.

    3 avril 2017, par Ronald S. Bultje
    pthread_frame : allow per-field ThreadFrame owners.
    

    This tries to handle cases where separate invocations of decode_frame()
    (each running in separate threads) write to respective fields in the
    same AVFrame->data[]. Having per-field owners makes interaction between
    readers (the referencing thread) and writers (the decoding thread)
    slightly more optimal if both accesses are field-based, since they will
    use the respective producer’s thread objects (mutex/cond) instead of
    sharing the thread objects of the first field’s producer.

    In practice, this fixes the following tsan-warning in fate-h264 :

    WARNING : ThreadSanitizer : data race (pid=21615)
    Read of size 4 at 0x7d640000d9fc by thread T2 (mutexes : write M1006) :
    #0 ff_thread_report_progress pthread_frame.c:569 (ffmpeg:x86_64+0x100f7cf54)
    [..]
    Previous write of size 4 at 0x7d640000d9fc by main thread (mutexes : write M1004) :
    #0 update_context_from_user pthread_frame.c:335 (ffmpeg:x86_64+0x100f81abb)

    • [DH] libavcodec/h264_slice.c
    • [DH] libavcodec/pthread_frame.c
    • [DH] libavcodec/thread.h
    • [DH] libavcodec/utils.c
  • unable to access a class function from its object instance

    23 mars 2021, par Alp4x

    I'm unable to access a class function from its object instance - the object is being initialized properly and the constructor runs perfectly as well - just not able to explicitly call a function from that class

    


    Code for my FFmpeg class :

    


    module.exports = class FFmpeg {
  constructor(rtpParameters) {
    this._rtpParameters = rtpParameters;
    this._process = undefined;
    this._observer = new EventEmitter();
    this._createProcess();
  }

  _createProcess() {
    const sdpString = createSdpText(this._rtpParameters);
    const sdpStream = convertStringToStream(sdpString);

    console.log("createProcess() [sdpString:%s]", sdpString);

    this._process = child_process.spawn("ffmpeg", this._commandArgs);

    if (this._process.stderr) {
      this._process.stderr.setEncoding("utf-8");

      this._process.stderr.on("data", (data) =>
        console.log("ffmpeg::process::data [data:%o]", data)
      );
    }

    if (this._process.stdout) {
      this._process.stdout.setEncoding("utf-8");

      this._process.stdout.on("data", (data) =>
        console.log("ffmpeg::process::data [data:%o]", data)
      );
    }

    this._process.on("message", (message) =>
      console.log("ffmpeg::process::message [message:%o]", message)
    );

    this._process.on("error", (error) =>
      console.error("ffmpeg::process::error [error:%o]", error)
    );

    this._process.once("close", () => {
      console.log("ffmpeg::process::close");
      this._observer.emit("process-close");
    });

    sdpStream.on("error", (error) =>
      console.error("sdpStream::error [error:%o]", error)
    );

    // Pipe sdp stream to the ffmpeg process
    sdpStream.resume();
    sdpStream.pipe(this._process.stdin);
  }

  kill() {
    console.log("kill() [pid:%d]", this._process.pid);
    this._process.kill("SIGINT");
  }

  get _commandArgs() {
    let commandArgs = [
      "-loglevel",
      "debug",
      "-protocol_whitelist",
      "pipe,udp,rtp",
      "-fflags",
      "+genpts",
      "-f",
      "sdp",
      "-i",
      "pipe:0",
    ];

    commandArgs = commandArgs.concat(this._videoArgs);
    commandArgs = commandArgs.concat(this._audioArgs);

    commandArgs = commandArgs.concat([
      "-flags",
      "+global_header",
      `${RECORD_FILE_LOCATION_PATH}/${this._rtpParameters.fileName}.webm`,
    ]);

    console.log("commandArgs:%o", commandArgs);

    return commandArgs;
  }

  get _videoArgs() {
    return ["-map", "0:v:0", "-c:v", "copy"];
  }

  get _audioArgs() {
    return [
      "-map",
      "0:a:0",
      "-strict", // libvorbis is experimental
      "-2",
      "-c:a",
      "copy",
    ];
  }
};


    


    My implementation of creation of this class' instance :

    


    async startRecord() {
    if (this._isRecording) return;

    this._isRecording = true;
    let recordInfo = {};
    const joinedPeers = this._getJoinedPeers();
    for (const peer of joinedPeers) {
      for (const producer of peer.data.producers.values()) {
        recordInfo[producer.kind] = await this.publishProducerRtpStream(
          peer,
          producer
        );
        recordInfo.fileName = Date.now().toString();

        peer.data.process = this.getProcess(recordInfo);
        setTimeout(async () => {
          console.log(peer.data.process);
          // I want to call peer.data.process.kill() HERE!
        }, 4000);
      }
    }
  }
  async getProcess(recordInfo) {
    return new FFmpeg(recordInfo);
  }


    


    I want to call the kill() function in FFmpeg and it shows undefined. Really don't understand how.

    


    Here's the log of the object instance (which doesn't have the "kill" function mentioned anywhere and maybe hence shows that .kill() is undefined)

    


    console logging the object created from the class FFmpeg (new FFmpeg)

    


    Would greatly appreciate any help.
Thanks !