#11527 closed defect (invalid)

When using tee to live stream to youtube - image that is streamed on youtube changes aspect ratio

Reported by: bojanv55 Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: tee
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
When using tee to stream image+audio to youtube, image aspect ratio is changed on youtube stream. If other tee destination fails during the process, image ratio is OK. Also if I do not use tee, image aspect ratio is normal. So it only happens when there are 2 destinations working and only on youtube live stream (local file is OK).

How to reproduce:

This fails:

"C:\Users\default.DESKTOP-TKUK8H2\Downloads\ffmpeg-master-latest-win64-gpl-shared\bin\ffmpeg.exe" -y -loop 1 -i "C:\Users\default.DESKTOP-TKUK8H2\Documents\coverhd1p.png" -i "http://livestream.me:8010/livestream" -c:v libx264 -preset ultrafast -pix_fmt yuv420p -minrate 6000k -maxrate 6000k -bufsize 12000k -b:v 6000k -r 30 -g 30 -keyint_min 60 -x264opts keyint=60:min-keyint=60:no-scenecut -s 1280x720 -tune zerolatency -b:a 128k -c:a aac -ar 48000 -strict experimental -drop_pkts_on_overflow 1 -attempt_recovery 1 -recover_any_error 1 -recovery_wait_time 1 -map 0:v -map 1:a -f tee "[f=flv:select=\'a:0,v:0\']rtmp://a.rtmp.youtube.com/live2/mycode|[f=flv:select=\'a:0\']output1.flv"

This works:

"C:\Users\default.DESKTOP-TKUK8H2\Downloads\ffmpeg-master-latest-win64-gpl-shared\bin\ffmpeg.exe" -y -loop 1 -i "C:\Users\default.DESKTOP-TKUK8H2\Documents\coverhd1p.png" -i "http://livestream.me:8010/livestream" -c:v libx264 -preset ultrafast -pix_fmt yuv420p -minrate 6000k -maxrate 6000k -bufsize 12000k -b:v 6000k -r 30 -g 30 -keyint_min 60 -x264opts keyint=60:min-keyint=60:no-scenecut -s 1280x720 -tune zerolatency -b:a 128k -c:a aac -ar 48000 -strict experimental -drop_pkts_on_overflow 1 -attempt_recovery 1 -recover_any_error 1 -recovery_wait_time 1 -map 0:v -map 1:a -f flv rtmp://a.rtmp.youtube.com/live2/mycode

https://i.postimg.cc/262QsfHF/wrong-aspect-ratio.jpg

C:\Users\default.DESKTOP-TKUK8H2>"C:\Users\default.DESKTOP-TKUK8H2\Downloads\ffmpeg-master-latest-win64-gpl-shared\bin\ffmpeg.exe" -version
ffmpeg version N-118905-gcbbc927a67-20250324 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 14.2.0 (crosstool-NG 1.27.0.18_7458341)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-libzmq --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --disable-libvvenc --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp --extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc --cxx=x86_64-w64-mingw32-g++ --ar=x86_64-w64-mingw32-gcc-ar --ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm --extra-version=20250324
libavutil      59. 60.100 / 59. 60.100
libavcodec     61. 33.102 / 61. 33.102
libavformat    61.  9.107 / 61.  9.107
libavdevice    61.  4.100 / 61.  4.100
libavfilter    10.  9.100 / 10.  9.100
libswscale      8. 13.103 /  8. 13.103
libswresample   5.  4.100 /  5.  4.100
libpostproc    58.  4.100 / 58.  4.100

Attachments (1)

wrong_aspect_ratio.jpg (183.7 KB ) - added by bojanv55 18 months ago.
How it looks on youtube

Download all attachments as: .zip

Change History (3)

by bojanv55, 18 months ago

Attachment: wrong_aspect_ratio.jpg added

How it looks on youtube

comment:1 by bojanv55, 18 months ago

I was missing "-flags +global_header"

Now it is ok...

comment:2 by MasterQuestionable, 18 months ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.