在nginx-rtmp上的实时流之后未调用exec_record_done

问题描述

我不知道为什么这里没有叫exec_record_doneon_record_done调用,但exec_没有被调用。我已经检查了脚本文件,并且烫发一切正常。 Nginx日志中没有关于exec_record_done的任何内容...有任何进一步调试的想法或建议吗?

application live {
        live on; # Allows live input

        # for each received stream,transcode for adaptive streaming
        # This single ffmpeg command takes the input and transforms
        # the source into 4 different streams with different bitrates
        # and qualities. # these settings respect the aspect ratio.
        exec_push  /usr/local/bin/ffmpeg -i rtmp://localhost:1935/$app/$name -async 1 -vsync -1
                    -c:v libx264 -c:a aac -b:v 256k  -b:a 256k  -vf "scale=480:trunc(ow/a/2)*2"  -tune zerolatency -preset superfast -crf 23 -f flv rtmp://localhost:1935/show/$name_low
                    #-c:v libx264 -c:a aac -b:v 768k  -b:a 256k -vf "scale=720:trunc(ow/a/2)*2"  -tune zerolatency -preset superfast -crf 23 -f flv rtmp://localhost:1935/show/$name_mid
                    #-c:v libx264 -c:a aac -b:v 1024k -b:a 256k -vf "scale=960:trunc(ow/a/2)*2"  -tune zerolatency -preset superfast -crf 23 -f flv rtmp://localhost:1935/show/$name_high
                    -c:v libx264 -c:a aac -b:v 1920k -b:a 256k -vf "scale=1280:trunc(ow/a/2)*2" -tune zerolatency -preset superfast -crf 23 -f flv rtmp://localhost:1935/show/$name_hd720
                    -c copy -f flv rtmp://localhost:1935/show/$name_src;

      on_publish http://docker.for.mac.localhost:3000/_h/on_publish;
      on_publish_done http://docker.for.mac.localhost:3000/_h/on_publish_done;
      on_record_done http://docker.for.mac.localhost:3000/_h/on_record_done;

      # exec_record_done /usr/local/bin/ffmpeg -i $path
      #     -c:v libx264 -crf 21 -preset veryfast -g 25 -sc_threshold 0
      #     -c:a aac -b:a 256k -ac 2
      #     -f hls -hls_time 6 -hls_playlist_type event /mnt/persist0/vod/$basename/$basename.m3u8;
      #exec_record_done /usr/local/bin/rec2hls $path /mnt/persist0/vod $basename http://docker.for.mac.localhost:3000/_h/on_transcode_done/?key=$basename;
      exec_record_done bash -c "/usr/local/bin/rec2hls $path /mnt/persist0/vod $basename http://docker.for.mac.localhost:3000/_h/on_transcode_done/?key=$basename";
      drop_idle_publisher 10s;

      recorder rec1 {
        record all manual;
        #record_suffix flv;
        record_path /mnt/persist0/rec;
        record_append on;
        # record_unique on; # for debug mainly so we can see whats happening
        # ^^^ Resume same file in case of dropouts.  At first rec filename will always be unique as per how our watch_key (and the publish redirect URL) is generated
      }

    }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)