Angularjs 如何通过Node JS使用ffmpeg实时显示水印&;角JS

Angularjs 如何通过Node JS使用ffmpeg实时显示水印&;角JS,angularjs,node.js,ffmpeg,Angularjs,Node.js,Ffmpeg,我和ffmpeg一起工作。我已经使用ffmpeg的水印。在我的过程中,我保存了那个视频(用水印标记)&然后我就可以显示那个视频了。但我想实时显示水印。我怎样才能做到这一点?这个实时节目需要帮助 这是我的密码: try { var process = new ffmpeg('public/'+req.body.video); process.then(function (video) { console.l

我和ffmpeg一起工作。我已经使用ffmpeg的水印。在我的过程中,我保存了那个视频(用水印标记)&然后我就可以显示那个视频了。但我想实时显示水印。我怎样才能做到这一点?这个实时节目需要帮助

这是我的密码:

        try {
            var process = new ffmpeg('public/'+req.body.video);
            process.then(function (video) {
              console.log('The video is ready to be processed');
              var watermarkPath = 'public/images/logo.png',
                newFilepath = 'public/videos/watermarked/'+name,
                settings = {
                    position        : "SC"      // Position: NE NC NW SE SC SW C CE CW
                  , margin_nord     : null      // Margin nord
                  , margin_sud      : null      // Margin sud
                  , margin_east     : null      // Margin east
                  , margin_west     : null      // Margin west
                };
              var callback = function (error, files) {
                if(error){
                  console.log('ERROR: ', error);
                }
                else{
                  console.log('TERMINOU', files);
                  res.send('videos/watermarked/'+name)
                }
              }
              //add watermark
              video.fnAddWatermark(watermarkPath, newFilepath, settings, callback)

            }, function (err) {
              console.log('Error: ' + err);
            });
          } catch (e) {
            console.log(e.code);
            console.log(e.msg);
          }
var process = new ffmpeg('public/'+req.body.video);
                    process.then(function (video) {
                        // console.log('The video is ready to be processed');
                        var watermarkPath = 'public/images/logo_2.png',
                            newFilepath = 'public/videos/watermarked/'+name,
                            settings = {
                                position        : "SC"      // Position: NE NC NW SE SC SW C CE CW
                                , margin_nord     : null      // Margin nord
                                , margin_sud      : null      // Margin sud
                                , margin_east     : null      // Margin east
                                , margin_west     : null      // Margin west
                            };
                        var callback = function (error, files) {
                            if(error){
                                console.log('ERROR: ', error);
                            }
                            else{
                                // console.log('TERMINOU', files);
                                res.send('videos/watermarked/'+name)
                            }
                        }
                        //add watermark
                        video.fnAddWatermark(watermarkPath, newFilepath, settings, callback)

                    }, function (err) {
                        console.log('Error: ' + err);
                    });