exec_record_done not being called after live stream on nginx-rtmp

Viewed 714

I can't figure out why exec_record_done isn't being called here. on_record_done gets called but not the exec_. I've checked the script files and perms are all ok. There's nothing in the nginx logs about exec_record_done... Any ideas or suggestions to debug further?

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
      }

    }
0 Answers
Related