Reputation: 657
I want to stream to youtube and twitter in 1 ffmpeg process
i red this https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs
I do this command
/usr/bin/ffmpeg -re -i input.mp4 -deinterlace -c:v libx264 -pix_fmt yuv420p
-preset veryfast -tune zerolatency -profile:v main -c:a aac -b:a 128k -ac 2
-crf 19 -r 30 -g 60 -b:v 1369k -minrate 1369k -maxrate 1369k -bufsize 2738k
-ar 44100
-filter_complex "[0:v]split=2[s0]; [s0]scale=-2:1080[v0]"
-map "[v0]" -map 0:a
-f tee " [select='v:0,a':f=flv]rtmp://a.rtmp.youtube.com/live2/key | [select='v:0,a':f=flv]rtmps://va.pscp.tv:443/x/key "
and I get in command line this
[libx264 @ 0x55f7b71aae40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x55f7b71aae40] profile Main, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x55f7b71a8f40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x55f7b71a8f40] profile Main, level 4.0, 4:2:0, 8-bit
[tee @ 0x55f7b71a6480] No option found near "0,a:f=flv]rtmp://a.rtmp.youtube.com/live2/r9yy-wtdf-rmkp-22qa-c9sb"
[tee @ 0x55f7b71a6480] Slave muxer #0 failed: Invalid argument, continuing with 1/2 slaves.
[tee @ 0x55f7b71a6480] No option found near "0,a:f=flv]rtmps://va.pscp.tv:443/x/v52px1yfiwuh"
[tee @ 0x55f7b71a6480] All tee outputs failed.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
[aac @ 0x55f7b722fd80] Qavg: 298.166
[aac @ 0x55f7b722fd80] 2 frames left in the queue on closing
Conversion failed!
What is wrong with my command ?
Upvotes: 3
Views: 1095
Reputation: 93058
You'll need to escape the quotes: select=\'v:0,a\'
and select=\'v:0,a\'
Upvotes: 4