Jellyfin Forum
All transcoded videos upside down - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: All transcoded videos upside down (/t-all-transcoded-videos-upside-down)



All transcoded videos upside down - Maximilian W - 2024-03-29

Hi yall..   
All of my  4k@120mbps,  4k@80mbps,  1080p@60mbps   are working correctly.

All quality below 60mbps for example like,  1080p@40mbps,  1080p@20mbps,  1080p@10mbps etc etc       are all upside down... 


I have rtx 4080 and using the nvidia hardware acceleration decoding..  


***When I switch over to VAAPI, the orientation is correct!!  So its something wrong with the nvidia decoding/encoding..****


i AM AT MY WITS END.. PLEASE HELP



Below is my log:   thanks!!!!   you can see in the sidedata, it says   "displaymatrix: rotation of -180.00 degrees"    I wonder if that is the issue?  but how do I fix this? 

-----------------------------------------------------------------------------------------------------------------------------------


/videos/d77fd711-5223-f357-4f13-1c786ea913da/hls1/main/136.ts
{"Protocol":0,"Id":"d77fd7115223f3574f131c786ea913da","Path":"E:\\Video Storage\\Gopro Footage\\GX030035.mp4","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mov,mp4,m4a,3gp,3g2,mj2","Size":8772780032,"Name":"GX030035","IsRemote":false,"ETag":"66fd784605a8c0a346c74c0f3ea34b0e","RunTimeTicks":11702523904,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"hevc","CodecTag":"hvc1","Language":"eng","ColorRange":null,"ColorSpace":"bt709","ColorTransfer":"bt709","ColorPrimaries":"bt709","DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/60000","CodecTimeBase":null,"Title":null,"VideoRange":"SDR","VideoRangeType":"SDR","VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"4K HEVC SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":59693274,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":2160,"Width":3840,"AverageFrameRate":59.94006,"RealFrameRate":59.94006,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuvj420p","Level":153,"IsAnamorphic":null},{"Codec":"aac","CodecTag":"mp4a","Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/48000","CodecTimeBase":null,"Title":"\u000BGoPro AAC  ","VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"\u000BGoPro AAC  - English - Stereo - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"stereo","BitRate":189334,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":"LC","Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":null,"CodecTag":"tmcd","Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/60000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":null,"NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":null,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":4,"AspectRatio":null,"Index":2,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null},{"Codec":"bin_data","CodecTag":"gpmd","Language":"eng","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Comment":null,"TimeBase":"1/1000","CodecTimeBase":null,"Title":null,"VideoRange":null,"VideoRangeType":null,"VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":null,"NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":64882,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"Type":4,"AspectRatio":null,"Index":3,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":59971880,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}
ffmpeg -analyzeduration 200M -ss 00:06:48.000 -init_hw_device cuda=cu:0 -filter_hw_device cu -hwaccel cuda -hwaccel_output_format cuda -c:v hevc_cuvid -autorotate 0 -i file:"E:\Video Storage\Gopro Footage\GX030035.mp4" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -preset p1 -b:v 39810666 -maxrate 39810666 -bufsize 79621332 -g:v:0 180 -keyint_min:v:0 180 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_cuda=format=yuv420p" -codec:a:0 copy -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 136 -hls_segment_filename "A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c.m3u8"
ffmpeg version 6.0.1-Jellyfin Copyright © 2000-2023 the FFmpeg developers
  built with gcc 13-win32 (GCC)
  configuration: --prefix=/opt/ffmpeg --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Jellyfin --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-ptx-compression --disable-w32threads --enable-pthreads --enable-shared --enable-lto --enable-gpl --enable-version3 --enable-schannel --enable-iconv --enable-libxml2 --enable-zlib --enable-lzma --enable-gmp --enable-chromaprint --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libwebp --enable-libvpx --enable-libzimg --enable-libx264 --enable-libx265 --enable-libsvtav1 --enable-libdav1d --enable-libfdk-aac --enable-opencl --enable-dxva2 --enable-d3d11va --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:E:\Video Storage\Gopro Footage\GX030035.mp4':
  Metadata:
    major_brand    : mp41
    minor_version  : 538120216
    compatible_brands: mp41
    creation_time  : 2023-09-24T18:05:37.000000Z
    firmware        : H22.01.02.10.00
  Duration: 00:19:30.25, start: 0.000000, bitrate: 59971 kb/s
  Stream #0:0[0x1](eng): Video: hevc (Main) (hvc1 / 0x3163766Nerd-face, yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59693 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
    Metadata:
      creation_time  : 2023-09-24T18:05:37.000000Z
      handler_name    : GoPro H.265
      vendor_id      : [0][0][0][0]
      encoder        : GoPro H.265 encoder
      timecode        : 13:56:02:27
    Side data:
      displaymatrix: rotation of -180.00 degrees
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time  : 2023-09-24T18:05:37.000000Z
      handler_name    : GoPro AAC 
      vendor_id      : [0][0][0][0]
      timecode        : 13:56:02:27
  Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time  : 2023-09-24T18:05:37.000000Z
      handler_name    : GoPro TCD 
      timecode        : 13:56:02:27
  Stream #0:3[0x4](eng): Data: bin_data (gpmd / 0x646D7067), 64 kb/s (default)
    Metadata:
      creation_time  : 2023-09-24T18:05:37.000000Z
      handler_name    : GoPro MET 
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, hls, to 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c.m3u8':
  Metadata:
    encoder        : Lavf60.3.100
  Stream #0:0: Video: h264 (Main), cuda(pc, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 39810 kb/s, 59.94 fps, 90k tbn (default)
    Metadata:
      encoder        : Lavc60.3.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 39810666/0/39810666 buffer size: 79621332 vbv_delay: N/A
      displaymatrix: rotation of -180.00 degrees
  Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
frame=    0 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=  0x   
frame=  129 fps=0.0 q=34.0 size=N/A time=00:00:02.17 bitrate=N/A speed=3.65x   
[hls @ 000002a034df6b40] Opening 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c136.ts' for writing
frame=  266 fps=241 q=34.0 size=N/A time=00:00:04.48 bitrate=N/A speed=4.07x   
[hls @ 000002a034df6b40] Opening 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c137.ts' for writing
frame=  407 fps=254 q=33.0 size=N/A time=00:00:06.82 bitrate=N/A speed=4.26x   
[hls @ 000002a034df6b40] Opening 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c138.ts' for writing
frame=  547 fps=260 q=33.0 size=N/A time=00:00:09.15 bitrate=N/A speed=4.35x   
frame=  686 fps=263 q=33.0 size=N/A time=00:00:11.49 bitrate=N/A speed=4.41x   
[hls @ 000002a034df6b40] Opening 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c139.ts' for writing
frame=  827 fps=266 q=34.0 size=N/A time=00:00:13.82 bitrate=N/A speed=4.45x   
[hls @ 000002a034df6b40] Opening 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c140.ts' for writing
frame=  965 fps=267 q=33.0 size=N/A time=00:00:16.14 bitrate=N/A speed=4.47x   
[hls @ 000002a034df6b40] Opening 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c141.ts' for writing
[q] command received. Exiting.
[hls @ 000002a034df6b40] Opening 'A:\JELLYFIN\SERVER SETUP\transcodes\bbe92d0b5bb657abf175fdec69ae702c142.ts' for writing
frame= 1098 fps=269 q=34.0 Lsize=N/A time=00:00:18.30 bitrate=N/A speed=4.48x   
video:89449kB audio:439kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown




-----------------------------------------------------------------------------------------------------------------------------


RE: All transcoded videos upside down - nyanmisaka - 2024-03-29

This is a known issue. We are working on it.