0

I want to add audio to my ffmpeg cli bellow

ffmpeg -framerate 25 -video_size 1920x1080 -f x11grab -i :0.0 -vf format=yuv420p http://localhost:8080/feed.ffm

I tried -acodec libmp3lame, -c:a libmp3lame but it does not seam to work

0 day
  • 21
  • 1
  • 6

1 Answers1

1

You have to provide an audio input. Assuming ALSA:

ffmpeg -framerate 25 -video_size 1920x1080 -f x11grab -i :0.0 -f alsa -sample_rate 48000 -channels 2 -i hw:0 -c:v libx264 -c:a aac -vf format=yuv420p http://localhost:8080/feed.ffm

See FFmpeg ALSA input documentation and FFmpeg Wiki: ALSA.

llogan
  • 121,796
  • 28
  • 232
  • 243