torch2424 / live-stream-radio

24/7 live stream video radio station CLI / API 📹 📻
https://torch2424.github.io/live-stream-radio/
241 stars 64 forks source link

videoutput was not found or already used #97

Closed LauraWebdev closed 5 years ago

LauraWebdev commented 6 years ago

I have yet to investigate this further, but my 24/7 radio stopped two days ago with the following output:

████████████████████████████████████████████████████████████████████████████████
Starting stream! 🛠️
Streaming to: rtmp://a.rtmp.youtube.com/live2/{KEY}
Finding audio... 🎤
Playing the audio:
/home/radio/splatoon-radio/audio/Splatune2/Disc 1/31.mp3
Finding/Optimizing video... 📺
Playing the video:
/home/radio/splatoon-radio/video/dancev2.mp4
Artist: Grizzco Industries
Album: Splatoon 2 ORIGINAL SOUNDTRACK -Splatune2-
Song: That's a Wrap
Duration (seconds): 9

Spawned Ffmpeg with command:
ffmpeg -stream_loop -1 -i /home/radio/splatoon-radio/video/dancev2.mp4 -i /home/radio/splatoon-radio/audio/Splatune2/Disc 1/31.mp3 -f lavfi -re -i anullsrc -i /home/radio/splatoon-radio/overlay.png -filter_complex [1:a] adelay=3000|3000 [delayedaudio]; [delayedaudio][2:a] amix=inputs=2:duration=first:dropout_transition=3 [audiooutput]; [0:v] fps=fps=30 [inputvideo];[3:v][inputvideo] scale2ref [scaledoverlayimage][scaledvideo];[scaledvideo][scaledoverlayimage] overlay=x=0:y=0, drawtext=text='Grizzco Industries':fontfile=/home/radio/splatoon-radio/./fonts/Lato-Regular.ttf:fontsize=(w * 0.023333333333333334):bordercolor=#000000:borderw=1:fontcolor=#FFFFFF:y=(h * 0.71):x=(w * 0.07),drawtext=text='That's a Wrap':fontfile=/home/radio/splatoon-radio/./fonts/Lato-Regular.ttf:fontsize=(w * 0.016666666666666666):bordercolor=#000000:borderw=1:fontcolor=#FFFFFF:y=(h * 0.76):x=(w * 0.07) [videooutput] -acodec copy -acodec copy -map [videooutput] -map [audiooutput] -r 30 -g 60 -t 15 -pix_fmt yuv420p -x264-params keyint=60:min-keyint=60:scenecut=-1 -s 1280x720 -b:v 3000k -b:a 128k -ar 44100 -acodec aac -vcodec libx264 -preset ultrrafast -f flv rtmp://a.rtmp.youtube.com/live2/{KEY}

████████████████████████████████████████████████████████████████████████████████
ffmpeg stderr:
 ffmpeg version 4.0.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/radio/splatoon-radio/video/dancev2.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2018-10-07T11:57:32.000000Z
  Duration: 00:01:28.00, start: 0.000000, bitrate: 10348 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 10025 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2018-10-07T11:57:32.000000Z
      handler_name    : Alias Data Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      creation_time   : 2018-10-07T11:57:33.000000Z
      handler_name    : Alias Data Handler
Input #1, mp3, from '/home/radio/splatoon-radio/audio/Splatune2/Disc 1/31.mp3':
  Metadata:
    title           : That's a Wrap
    album           : Splatoon 2 ORIGINAL SOUNDTRACK -Splatune2-
    publisher       : Enterbrain / KADOKAWA
    genre           : Game Soundtrack
    RELEASE DATE    : Nov 29, 2017
    track           : 31/34
    disc            : 1/2
    artist          : Grizzco Industries
    album_artist    : Enterbrain / KADOKAWA
    composer        : Ryo Nagamatsu
    comment         : http://sittingonclouds.net
    date            : 2017
  Duration: 00:00:08.78, start: 0.025056, bitrate: 763 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
    Metadata:
      encoder         : LAME3.99r
    Stream #1:1: Video: png, rgb24(pc), 640x635 [SAR 2835:2835 DAR 128:127], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Cover (front)
Input #2, lavfi, from 'anullsrc':
  Duration: N/A, start: 0.000000, bitrate: 705 kb/s
    Stream #2:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Input #3, png_pipe, from '/home/radio/splatoon-radio/overlay.png':
  Duration: N/A, bitrate: N/A
    Stream #3:0: Video: png, rgba(pc), 1280x720 [SAR 2835:2835 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Output with label 'videooutput' does not exist in any defined filter graph, or was already used elsewhere.
ffmpeg stdout:

ffmpeg err:
 Error: ffmpeg exited with code 1: Output with label 'videooutput' does not exist in any defined filter graph, or was already used elsewhere.
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/live-stream-radio/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
ffmpeg encountered an error. 😨
Please see the stderror output above to fix the issue.
Oct 15 22:56:17 splatoon-radio bash[27217]: Using the config.json at: /home/radio/splatoon-radio/config.json
torch2424 commented 6 years ago

I'm thinking the song title: drawtext=text='That's a Wrap', maybe the apostrophe needed to be escaped?

That, or the filter_complex needs quotes around the command?