Skip to content

ThirteeNov

My personal blog about coding and internet

Menu
  • About me
  • About Zofia Kreasi
  • Cart
  • Checkout
  • Making an airplane game from scratch in Unity
  • My account
  • Privacy Policy
  • Privacy Policy – zkLeaderboard
  • Sample Page
  • Shop
  • Tutorials on Learning JavaScript
  • ZKAccounts – Privacy Policy
Menu

How to stream your desktop screen to YouTube using just only ffmpeg – No Need OBS!

Posted on March 12, 2025April 23, 2025 by Habibie

If you are used to use OBS, well, if you just only want to stream your computer desktop screen to YoTube, you can just use ffmpeg.

Make sure you have ffmpeg downloaded and you can run it via CMD. Google it about how to install ffmpeg in Windows and how to run it in CMD.

Once you can run it using command prompt program, then run this command:

ffmpeg -f gdigrab -framerate 30 -i desktop -f lavfi -i anullsrc -c:v libx264 -preset veryfast -maxrate 2000k -bufsize 4000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMINGKEY

Make sure you change YOURSTREAMINGKEY with your actual key.

That command will stream your desktop without audio. The command to stream desktop audio is more complicated. But instead, I prefer to play an mp3 file while streaming my desktop. The command is this:

ffmpeg -f gdigrab -framerate 30 -i desktop -stream_loop -1 -i "C:/myaudio.mp3" -c:v libx264 -preset veryfast -maxrate 2000k -bufsize 4000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMINGKEY

Just in case you want to stream only a window of your application, such as Notepad, here is the code:

ffmpeg -f gdigrab -framerate 30 -i title=Untitled - Notepad -stream_loop -1 -i "C:/myaudio.mp3" -c:v libx264 -preset veryfast -maxrate 2000k -bufsize 4000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMINGKEY

Notes:

  • Replace Untitled - Notepad with the exact title of the Notepad window (as shown in the window’s title bar).
  • If your Notepad document has a name, e.g., notes.txt - Notepad, use that full title.
  • Enclose the title in quotes if it contains spaces (e.g., title="notes.txt - Notepad").
Post Views: 206
ciihuy2020

Welcome!

  • My YouTube Channel
  • My GitHub Page
  • About me

Categories

  • 3DVista
  • Android
  • Apache
  • C#
  • Cordova
  • Electron & Node JS
  • HTML5, CSS & JavaScript
  • iOS
  • Let's Make Unity Games
  • Misc
  • Photoshop
  • PHP
  • Python
  • Uncategorized
  • Unity
  • WordPress

Recent Posts

  • Make objects like wires and cables easily in Unity using Ciihuy Curved Mesh
  • [SOLVED] Can’t Add Custom Domain to Blogger After Losing CNAME Verification
  • iOS App Icon Generator by CiihuyCom
  • Advanced Blinking Marker Script to show objects position in your game canvas
  • Ciihuy Images Merger – Fast & Easy Online Image Combiner
© 2025 ThirteeNov | Powered by Superbs Personal Blog theme