Applies to: Hanwha Cameras
Summary
This article describes setting up a basic RTMP stream to YouTube. This allows a user to stream, on demand, based on the service's status.
Creating a Camera Profile
To create a camera profile:
- Log in to your YouTube Studio account: http://studio.youtube.com.
- Collect your stream key and stream URL.
- Open another tab in your browser.
- Enter the IP address of the camera and click Enter.
- Log in to the camera.
- Click on the gear icon at the top of the screen.
- Select Basic > Video Profile.
- Click Add.
- Enter a profile name.
- Create an H.264 codec for use with your stream.
-
Click Apply to save the changes to your new profile.
Your new profile appears in the profile list.
NOTE: The number of your profile is determined by how many lines it appears
from the top. - Click on User.
-
Create a User Account to connect to the stream.
IMPORTANT: Do not give the user account admin level rights. -
Click Apply to save the changes.
NOTE: You can use Video Lan Client to test the RTSP URL from the camera. See What are the RTSP URLs of Hanwha Devices? and How to stream via VLC with RTSP.
Using FFMPEG
To use FFMPEG:
- Download FFMPEG at ffmpeg.org and install it onto your PC.
- Download NSSM for the service creation at NSSM.
- Once both are installed, document the location of the FFMPEG.exe and NSSM.exe.
- Click the Windows Start button.
- Type Power Shell.
- Right-click on the application and select Run as Admin.
-
Use the Change Directory (cd) command in Powershell to navigate to the NSSM directory and enter the following command: “./nssm.exe install YOUTUBESTREAM".
NOTE: The text at the end of this command is the name of the Service. - Click Enter.
The NSSM service installer launches.
- Click the three-dot button and navigate to the FFMPEG.EXE.
-
Modify the string below with your proper stream information.
-f lavfi -i anullsrc -rtsp_transport udp -i rtsp://stream:password1@192.168.0.100:554/profile6/media.smp -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -map 1:v:0 -map 1:a:0 -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/STREAMKEYHERE Add your modified arguments string to NSSM.
Navigate to the Details and enter your information about the stream.
- Click Install Service.
The Service YOUTUBESTREAM Installed Successfully message appears.
The service YOUTUBESTREAM is now listed in Windows Services.
-
Select the service, then click Play.
The stream appears on your YouTube Studio Streaming Page.NOTE: To Uninstall the Service, from the command line, enter the following
command into the NSSM Win64 directory: ./nssm.exe remove_YOUTUBESTREAM
Comments
0 comments
Article is closed for comments.