How to set youtube live title and description in ffmpeg - ffmpeg

I am using following code to live stream video in youtube.
ffmpeg -y -loop 1 -i "still.jpg" -i "audio.mp3" " -c:v libx264 -pix_fmt yuv420p -crf 21 -r 1 -g 30 -keyint_min 5 -x264opts "keyint=5:min-keyint=5:no-scenecut" -s 1280x720 -tune zerolatency -b:a 128k -c:a aac -ar 48000 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/steam-key.
I would like to set youtube live title and description in the above command. Is it possible?

Related

ffmpeg streaming to youtube

I've used the following command to stream mp4 file to youtube :
ffmpeg -re -i merge.mp4 \
-c:v libx264 -preset veryfast -maxrate 3000k \
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 \
-ar 44100 -f flv rtmp://a.rtmp.youtube.com/live2/<MYKEY>
I see the ffmpeg streams the data like that:
but yet the youtube streaming page shows nothing yet received:
Any idea what am I missing?

Why ffmpeg ignores output fps?

I have the following ffmpeg command that streams an input to an RTMP endpoint :
ffmpeg
-re
-i -
-r 30
-vf scale=852:480
-c:v libx264
-pix_fmt yuv420p
-profile:v main
-preset veryfast
-x264opts "nal-hrd=cbr:no-scenecut"
-minrate 3000
-maxrate 3000
-g 60
-c:a aac
-b:a 160k
-ac 2
-ar 44100
-f flv
Some RTMPURL/ Some RTMPKey
This command works but the output frame rate is not respected. It drops to 6 fps.
I need it to be always 30 fps.
Does anyone know why it's not respected please ?
Thanks

FFMPEG SCREEN RECORDING: How to get H265 (libx265) recording using ffmpeg with xorg?

I really would appreciate all the help I can get here.
I'm trying to use the libx265 codec for recording an xorg dummy screen. The command that currently works for H264 (libx264 codec) is:
ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720
-thread_queue_size 4096 -i :0.0+0,0 -f alsa -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v libx264 -preset fast
-profile:v main -level 3.1 -pix_fmt yuv420p -r 30 -crf 21 -g 60 -tune zerolatency -f mp4 capture.mp4
In trying to get H265 instead, I first changed the codec to libx265 like below:
ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720
-thread_queue_size 4096 -i :0.0+0,0 -f alsa -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v libx265 -preset fast
-profile:v main -level 3.1 -pix_fmt yuv420p -r 30 -crf 21 -g 60 -tune zerolatency -f mp4 capture.mp4
But that didn't do it. Although it didn't error, it was producing a file that was playing at twice the recorded speed (i.e. twice the speed of the clip that was recorded).
Then I tried using -x265-params to specify the parameters like this:
ffmpeg -y -v info -f x11grab -draw_mouse 0 -r 30 -s 1280x720
-thread_queue_size 4096 -i :0.0+0,0 -f alsa -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v libx264 -preset fast
-x265-params profile=main:level=3.1:crf=21 -pix_fmt yuv420p -r 30 -g 60 -tune zerolatency -f mp4 capture.mp4
And this gave me an error with the following message:
"output file #0 does not contain any stream ffmpeg"
I've tried all sorts of combinations, searched extensively online (for both how to set 265 parameters and on the output file error), but I'm not making a headway. I'm really new to all this. Can anyone please help (with the most simple terms and directions)?

How can I apply yadif filter to my command using -vf in ffmpeg

ffmpeg -i "udp://localhost:2117" -vf "movie= logo3.png [logo];[in]
[logo]overlay= 30:70 [out]" -c:a aac -ac 1 -strict -2 -c:v libx264 -maxrate
1500k -bufsize 1500k -g 40 -r 23 -preset veryfast -threads 1 -f flv
rtmp://localhost/live/OTA2
I'am using this command above for my streaming transcoding , I want apply yadif filter in side -vf " " but i am getting error , so maybe i don't know the syntax
so someone help me how to apply yadif filter to the current command
Better to use a filter_complex in this case.
ffmpeg -i "udp://localhost:2117"
-filter_complex "[0]yadif[main];movie=logo3.png[logo];[main][logo]overlay=30:70"
-c:v libx264 -maxrate 1500k -bufsize 1500k -g 40 -r 23 -preset veryfast -threads 1
-c:a aac -ac 1 -strict -2
-f flv rtmp://localhost/live/OTA2

How to generate TS streams from middle of a source video?

I am using ffmpeg to create m3u8 playlist for a video (actually a live video stream). I am using the following command:
ffmpeg -i /home/ubuntu/Download/1459530099245.mkv -c:a aac -strict experimental -ac 2 -ar 48k -ab 64k -c:v libx264 -s 480x270 -aspect 16:9 -b:v 400k -r 15 -g 45 -profile:v baseline -level 3.0 -f hls -hls_time 9 -hls_list_size 0 /home/ubuntu/Download/New Playlist.m3u8
It produces m3u8 file as well as ts files.
Question: simply, how can we produce m3u8 playlist and TS files for a particular duration of source video? E.g., I want to get playlist only for first 20 seconds or so?
You can use command -to. Just add -to 00:00:20 after input path
In your variant:
ffmpeg -i /home/ubuntu/Download/1459530099245.mkv -to 00:00:20 -c:a aac -strict experimental -ac 2 -ar 48k -ab 64k -c:v libx264 -s 480x270 -aspect 16:9 -b:v 400k -r 15 -g 45 -profile:v baseline -level 3.0 -f hls -hls_time 9 -hls_list_size 0 /home/ubuntu/Download/New Playlist.m3u8
More information here: http://www.bogotobogo.com/FFMpeg/ffmpeg_seeking_ss_option_cutting_section_video_image.php

Resources