1

My Stream File..

stream.sh

#! /bin/bash

VBR="1500k"
FPS="30"
QUAL="ultrafast"
YOUTUBE_URL=" rtmp://a.rtmp.youtube.com/live2"
YOUTUBE_KEY="**********"
VIDEO_SOURCE="video.mp4"
AUDIO_SOURCE="Selfish.mp3"
AUDIO_ENCODER="aac"


ffmpeg \
 -stream_loop -1 \
 -re \
 -i "$VIDEO_SOURCE" \
 -thread_queue_size 512 \
 -stream_loop -1 \
 -re \
 -i "$AUDIO_SOURCE" \
 -c:v libx264 -preset $QUAL -r $FPS -g $(($FPS *2)) -b:v $VBR -bufsize 3000k -maxrate $VBR \
 -c:a $AUDIO_ENCODER -ar 44100 -b:a 128k -pix_fmt yuv420p \
 -f flv $YOUTUBE_URL/$YOUTUBE_KEY

Im sending audio from my client side.. But no audio coming to stream. But video is still working..

Output photo Preview Output

Devil
  • 11
  • 2
  • Please add the ffmpeg log to your post. Also, `-re` should not be used (it's only for simulation purpose as doc says) and they could be detrimental to your purpose. – kesh Apr 16 '22 at 15:32
  • @kesh the logs showing me that audio is going to stream but in stream there is no audio.. Only video is running.. Im kinda new in ffmpeg it would be greate if you help me – Devil Apr 16 '22 at 15:37

0 Answers0