1

I've a facility that runs on a Windows machine, that records the screen to disk, and it works well. It takes audio streams from two virtual sound cards and a stream from the display and produces a video file with two audio streams:

ffmpeg -y -rtbufsize 256M 
  -f dshow -i video="screen-capture-recorder" -thread_queue_size 512 
  -f dshow -i audio="Line 2 (Virtual Audio Cable)" 
  -f dshow -i audio="Line 3 (Virtual Audio Cable)" 
  -map 0:v -map 1:a -map 2:a -pix_fmt yuv420p "{0}"

I'm trying to upgrade this so it simultaneously records to disk and streams to youtube. YT doesn't support multiple audio streams so I'm attempting to put one stream in the left of a stereo and the other stream in the right (so the user can use their balance control to switch between them). That part doesn't work correctly at the moment (output works but is not L/R separated; it's L+L and R+R. I probably need to down to mono before I merge) but I plan to make another question for it because I doubt it's the reason YT is throwing an error here

Here's the upgraded command I'm using to tee the output to disk and YT:

ffmpeg -y -rtbufsize 256M 
  -f dshow -video_size 1264x944 -i video="screen-capture-recorder" -framerate 10 -thread_queue_size 512 
  -f dshow -i audio="Line 2 (Virtual Audio Cable)" 
  -f dshow -i audio="Line 3 (Virtual Audio Cable)" 
  -filter_complex "[1:a][2:a]amerge=inputs=2[aout]" 
  -map 0:v -map [aout]:a -c:v libx264 -c:a aac -b:v 3000k -maxrate 3000k -bufsize 6000k -g 20 -pix_fmt yuv420p -movflags +faststart 
  -f tee "[f=flv:onfail=ignore]rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx|c:\\temp\\test.mp4" 

It seems to work in terms of the disk version; everything is as I expect but YT says "Stream Starting" then after a while says:

Unsupported resolution for latency configuration You need to change the video resolution. The current resolution is (65535x65535), which is not supported for this configuration. The expected video resolution is (2560x1440).

The version written to disk is 1264x944 per VLC:

enter image description here

And a mediainfo dump:

General
Complete name                            : C:\temp\test.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 33.5 MiB
Duration                                 : 3 min 21 s
Overall bit rate                         : 1 393 kb/s
Writing application                      : Lavf58.29.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3 min 21 s
Bit rate                                 : 1 130 kb/s
Nominal bit rate                         : 3 000 kb/s
Width                                    : 1 264 pixels
Height                                   : 944 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 10.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.095
Stream size                              : 27.2 MiB (81%)
Writing library                          : x264 core 159
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=20 / keyint_min=2 / scenecut=40 / intra_refresh=0 / rc_lookahead=20 / rc=cbr / mbtree=1 / bitrate=3000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=3000 / vbv_bufsize=3000 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 3 min 18 s
Bit rate mode                            : Constant
Bit rate                                 : 265 kb/s
Channel(s)                               : 4 channels
Channel layout                           : C L R Cb
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 6.25 MiB (19%)
Default                                  : Yes
Alternate group                          : 1

What have I screwed up that makes YT think this is a 65536 video?

5
  • 1
    Show the complete log from your ffmpeg command. Don't forget to redact your stream key.
    – llogan
    May 10, 2020 at 16:59
  • Having this same issue using the tee muxer to split to YouTube and the segment muxer, I wonder if this is a bug with the tee muxer.
    – ninbura
    Apr 7, 2021 at 4:40
  • I never did resolve this; the requirement for it went away when a client quit using us. The recording system has since changed and ff upgraded from 3.3.3 to 4.something. I'll see if I can get some time to revisit it. In fairness I never did make any efforts to respond to the suggestion in the error message that the video should be 2560x1440 either (it was that specific and odd 1264 resolution for a reason)
    – Caius Jard
    Apr 7, 2021 at 5:30
  • This is still not resolved. I am getting the same warning on YouTube end, but its working fine on Facebook and disk Jul 25, 2022 at 7:03
  • I added this -flags +global_header and it's working fine then stackoverflow.com/questions/73105401/… Jul 25, 2022 at 10:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.