PyLivestream icon indicating copy to clipboard operation
PyLivestream copied to clipboard

Multiple stream doesn't work. [Twitch , Youtube]

Open saleham5 opened this issue 1 year ago • 0 comments

Hey im trying to stream on Twitch and Youtube at the same time. im using this command python -m pylivestream.glob /VidoFiles youtube twitch pylivestream.json -glob "*.mp4"' but i keep getting the error

Automatic encoder selection failed for output stream #0:1. Default encoder for format tee (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:1

Automatic encoder selection failed for output stream #0:1. Default encoder for format tee (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:1


/usr/bin/ffmpeg -loglevel error -re -i  /VidoFiles /1.mp4 -codec:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 4500k -g 120.0 -maxrate 4500k -bufsize 2250k -strict experimental -flags:v +global_header -f tee -map 0:v -map 0:a:0 [f=flv]rtmp://a.rtmp.youtube.com/live2/xxxxxxxxxxxx|[f=flv]rtmp://mrs02.contribute.live-video.net/app/live_xxxxxxxxxxxxxxxxxxxxxxxxxx/live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


 /usr/bin/ffmpeg -loglevel error -re -i / /VidoFiles /2.mp4 -codec:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 4500k -g 120.0 -maxrate 4500k -bufsize 2250k -strict experimental -flags:v +global_header -f tee -map 0:v -map 0:a:0 [f=flv]rtmp://a.rtmp.youtube.com/live2/xxxxxxxxxxxxxxxxxxxxxx|[f=flv]rtmp://mrs02.contribute.live-video.net/app/live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


 /usr/bin/ffmpeg -loglevel error -re -i /VidoFiles /3.mp4 -codec:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 3000k -g 60.0 -maxrate 3000k -bufsize 1500k -strict experimental -flags:v +global_header -f tee -map 0:v -map 0:a:0 [f=flv]rtmp://a.rtmp.youtube.com/live2/xxxxxxxxxxxxxxxxxxxxxxxxxx|[f=flv]rtmp://mrs02.contribute.live-video.net/app/live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Automatic encoder selection failed for output stream #0:1. Default encoder for format tee (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:1
CompletedProcess(args='python -m pylivestream.glob /VidoFiles youtube twitch pylivestream.json -glob "*.mp4"', returncode=0)

Here is the JSON file

{
  "screencap_origin": [50,30],
  "screencap_size": [640, 480],
  "screencap_fps": 30,
  "camera_size": [640, 480],
  "camera_fps": 30,
  "audio_rate": 44100,
  "audio_bps": 128000,
  "preset": "veryfast",
  "video_codec": "libx264",
  "audio_codec": "aac",
  "exe": "ffmpeg",
  "ffprobe_exe": "ffprobe",
  "win32": {
    "video_format": "yuv420p",
    "vcap": "gdigrab",
    "acap": "dshow",
    "hcam": "dshow",
    "screen_chan": "desktop",
    "camera_chan": "video=Integrated Camera",
    "audio_chan": "audio=Internal Microphone"
  },
  "darwin": {
    "video_format": "uyvy422",
    "screen_chan": "1:0",
    "audio_chan": "default",
    "vcap": "avfoundation",
    "hcam": "avfoundation"
  },
  "linux": {
    "video_format": "yuv420p",
    "camera_chan": "/dev/video0",
    "screen_chan": ":0.0",
    "audio_chan": "default",
    "vcap": "x11grab",
    "acap": "pulse",
    "hcam": "v4l2"
  },
  "sites":{
    "localhost": {
      "keyframe_sec": 2,
      "url": "rtmp://localhost"
    },
    "file": {
      "keyframe_sec": 2,
      "video_kbps": 2000,
      "screencap_size": [640, 480]
    },
    "twitch": {
      "keyframe_sec": 2,
      "url": "rtmps://live-api-s.xxxxxxxxxxx",
      "streamid": "xxxx-xxxx-xxxx-xxxx"
    },
    "youtube": {
      "keyframe_sec": 2,
      "url": "rtmp://a.rtmp.youtube.com/live2",
      "streamid": "xxxx-xxxx-xxxx-xxxx"
    }
  }
}

What can i do?

saleham5 avatar May 27 '23 17:05 saleham5