Bug #4628
Transcoding aspect ratio - 4.3 Version
100%
Description
Only in unstable 4.3 since 488 (for sure) Inputing like stream an SD channel (720x576) the encoding modifies original aspect ratio reducing height and increasing lenght. Any kind of transcoding profile used
Files
History
Updated by saen acro about 7 years ago
DAR and SAR values of stream is continuous or there is a interlaced image?
Updated by Carmelo Milazzo about 7 years ago
Of course DAR and SAR are continuous and happen not only with a stream but with every stream in that resolution i indicated 720x576 when transcoded with H264 in container mpegts/avlib
Updated by saen acro about 7 years ago
Can you attach short record of PASS and TRANSCODED profiles?
Updated by Carmelo Milazzo about 7 years ago
PASS non give any problem ... not change resolution problem is when is activated H264 transcoding ... tested any kind of preset (fast, ultrafast and so on) and just inputed a lower video rate... not changed nothing else.... this bug not happens in 4.2 with same settings...
Updated by Carmelo Milazzo about 7 years ago
later i put record.. anyway some additional info... running on ubuntu 16.04 and ubuntu 17.04 same effect... running matroska container appear correct aspect/ratio with same video and audio profiles...
Updated by rpluto . about 7 years ago
I also have this behavior, in 4.3-500, i also Confirm Carmelo, matroska/avlib for me solve the aspect radio, but now in my player shows like this, please see the image attached
Updated by rpluto . about 7 years ago
- File stream-atv2.mkv stream-atv2.mkv added
- File BA8FA5EC-29F6-4179-B0F8-E14A75CF2628.jpeg BA8FA5EC-29F6-4179-B0F8-E14A75CF2628.jpeg added
- File 5A4F517E-D17D-454C-B3E5-DC197969A495.jpeg 5A4F517E-D17D-454C-B3E5-DC197969A495.jpeg added
Here is goes
Thx
Updated by rpluto . about 7 years ago
Correct file
Please ignore the other
Updated by saen acro about 7 years ago
- File Заснемане.PNG Заснемане.PNG added
Rafael Silva wrote:
Here is goes
Thx
What exactly is problem with this video?
General ID : 1 (0x1) Complete name : C:\Users\Saen\Desktop\stream-atv2.mkv Format : MPEG-TS File size : 15.2 MiB Duration : 14 s 600 ms Overall bit rate mode : Variable Overall bit rate : 8 684 kb/s FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty Video ID : 256 (0x100) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings, CABAC : Yes Format settings, RefFrames : 4 frames Codec ID : 27 Duration : 14 s 720 ms Bit rate : 7 802 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 FPS Standard : Component Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.151 Stream size : 13.7 MiB (90%) Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 257 (0x101) Menu ID : 1 (0x1) Format : AC-3 Format/Info : Audio Coding 3 Format settings, Endianness : Big Codec ID : 129 Duration : 15 s 904 ms Bit rate mode : Constant Bit rate : 448 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Bit depth : 16 bits Compression mode : Lossy Delay relative to video : -1 s 424 ms Stream size : 870 KiB (6%) Service kind : Complete Main Menu ID : 4096 (0x1000) Menu ID : 1 (0x1) Duration : 14 s 600 ms List : 256 (0x100) (AVC) / 257 (0x101) (AC-3) Service name : Nos/12246H/National Geographic HD Service provider : Tvheadend 4.3-472~g8fc3520 Service type : digital television
and where is hardware acceleration?
see attachment
Updated by Carmelo Milazzo about 7 years ago
Anyway is much worst if used container not matroska... avlib mp4
Updated by rpluto . about 7 years ago
Mediainfo file
Updated by rpluto . about 7 years ago
saen acro wrote:
Rafael Silva wrote:
Here is goes
Thx
What exactly is problem with this video?
[...]and where is hardware acceleration?
see attachment
Wrong file, please se the another one (correct one).
I can try change to hardware acceleration, but I have the same results
Updated by Carmelo Milazzo about 7 years ago
Accordingly with Rafael... I tried hardware acceleration and not change absolutely nothing
Updated by saen acro about 7 years ago
General Unique ID : 23141128046024423173300529612919350093 (0x1168D1B37DD687E030E0F0BCF77F234D) Complete name : C:\Users\Saen\Desktop\stream-atv2 (correct one).mkv Format : Matroska Format version : Version 4 / Version 2 File size : 5.73 MiB Movie name : Nos/12246H/National Geographic HD Writing application : Lavf57.71.100 Writing library : Lavf57.71.100 IsTruncated : Yes SERVICE_NAME : Nos/12246H/National Geographic HD / Nos/12246H/National Geographic HD SERVICE_PROVIDER : Tvheadend 4.3-472~g8fc3520 / Tvheadend 4.3-472~g8fc3520 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3 Format settings, CABAC : Yes Format settings, RefFrames : 4 frames Codec ID : V_MPEG4/ISO/AVC Width : 1 920 pixels Original width : 682 pixels Height : 1 080 pixels Original height : 384 pixels Display aspect ratio : 3.160 Original display aspect ratio : 16:9 Frame rate mode : Constant / Constant Frame rate : 25.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive / Progressive Default : Yes Forced : No Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : A_AAC Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy / Lossy Delay relative to video : -1 s 600 ms Default : Yes Forced : No
Video is Truncated it is container problem.
Updated by Carmelo Milazzo about 7 years ago
if is a container problem why I observe same problem with container mpeg-ts/av-lib?
With matroska same devices recognize video correctly but never happen with mpeg-ts/av-lib container... always wrong format
Updated by rpluto . about 7 years ago
- File stream-atv2-mediainfo.txt stream-atv2-mediainfo.txt added
- File stream-atv2-mediainfo.txt stream-atv2-mediainfo.txt added
- File 4D95F99E-2919-4523-804F-5D6F38F1C927.jpeg 4D95F99E-2919-4523-804F-5D6F38F1C927.jpeg added
Other container mp4 and hw active
Updated by rpluto . about 7 years ago
- File stream-atv2.mp4 stream-atv2.mp4 added
Send twice the mediainfo, here goes the video
Updated by rpluto . about 7 years ago
For me this is the awkward part
Codec ID : V_MPEG4/ISO/AVC
Width : 1 920 pixels
Original width : 682 pixels
Height : 1 080 pixels
Original height : 384 pixels
Display aspect ratio : 3.160
Original display aspect ratio : 16:9
Updated by rpluto . about 7 years ago
Carmelo Milazzo wrote:
if is a container problem why I observe same problem with container mpeg-ts/av-lib?
With matroska same devices recognize video correctly but never happen with mpeg-ts/av-lib container... always wrong format
For me always get wrong independent of container I choose
Updated by rpluto . about 7 years ago
MP4 mediainfo txt
General
Complete name : stream-atv2.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/iso6/mp41)
File size : 7.39 MiB
Duration : 20s 96ms
Overall bit rate mode : Variable
Overall bit rate : 3 083 Kbps
Movie name : Nos/12246H/National Geographic HD
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
Writing application : Lavf57.71.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 20s 96ms
Bit rate : 5 461 bps
Width : 1 920 pixels
Original width : 682 pixels
Height : 1 080 pixels
Original height : 384 pixels
Display aspect ratio : 16:9
Original display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 22.840 fps
Minimum frame rate : 0.576 fps
Maximum frame rate : 25.014 fps
Original frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.000
Stream size : 13.4 KiB (0%)
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 20s 85ms
Bit rate mode : Variable
Bit rate : 5 187 bps
Nominal bit rate : 62.2 Kbps
Maximum bit rate : 128 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Frame rate : 46.875 fps (1024 spf)
Compression mode : Lossy
Stream size : 12.7 KiB (0%)
Default : Yes
Alternate group : 1
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
Updated by Carmelo Milazzo about 7 years ago
Dear Rafael if you open a matroska container with VLC it reconstruct correctly the original video format but this not happen even with VLC if you use a MPEG-TS/av-lib container
Updated by rpluto . about 7 years ago
Carmelo Milazzo wrote:
Dear Rafael if you open a matroska container with VLC it reconstruct correctly the original video format but this not happen even with VLC if you use a MPEG-TS/av-lib container
Confirm my player (iPad) also see that way, that’s why i say before that matrosca/avlib is Ok
But this client (atv2, kodi 14.2) won’t see it same way and always get green bars also, and is why I think is related.
Updated by saen acro about 7 years ago
- File Заснемане2.PNG Заснемане2.PNG added
General ID : 1 (0x1) Complete name : C:\Users\Saen\Desktop\Премиера_-Откраднат-живот_-Чуждо-тяло-NOVA2017-09-19.ts Format : MPEG-TS File size : 1.44 GiB Duration : 1 h 9 min Overall bit rate mode : Variable Overall bit rate : 2 936 kb/s Video ID : 256 (0x100) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : [email protected] Format settings, CABAC : No Format settings, RefFrames : 4 frames Format settings, GOP : M=3, N=12 Codec ID : 27 Duration : 1 h 9 min Width : 900 pixels <<<<<<<<<<< wrong value 576 ??? Height : 720 pixels Display aspect ratio : 5:4 Frame rate : 25.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Audio ID : 257 (0x101) Menu ID : 1 (0x1) Format : AAC Format/Info : Advanced Audio Codec Format version : Version 4 Format profile : LC Muxing mode : ADTS Codec ID : 15 Duration : 1 h 9 min Bit rate mode : Variable Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Delay relative to video : -40 ms Language : Bulgarian Menu ID : 4096 (0x1000) Menu ID : 1 (0x1) Duration : 1 h 9 min List : 256 (0x100) (AVC) / 257 (0x101) (AAC, Bulgarian) Language : / Bulgarian Service name : Премиера: Откраднат живот: Чуждо тяло Service provider : Tvheadend 4.3-485~gf5337ad Service type : digital television
this is sd record input and output is same 5:4
Width value is wrong video profile attached.
Is deinterlace change something
Updated by Carmelo Milazzo about 7 years ago
Tried also me.. deinterlace not change.. matroska is ok if seen on intelligent player otherwise taken ffmpeg remain same problem of bad aspect/ratio
Updated by saen acro about 7 years ago
In Kodi is easy to set 16:9 output for every video, its not most elegant choice but... .
Updated by Carmelo Milazzo about 7 years ago
Can also make a second transcoding on same machine with ffmpeg but is a dirty solution making 2 times same work with cpu. Is like to move a box 2 times for not telling first worker where to put :-D
Updated by Nick Noone about 7 years ago
I am experiencing the same issue with MPEG-TS container over in Australia, Matroska container keeps the correct AR.
Updated by Nick Noone about 7 years ago
- File matroska.mkv matroska.mkv added
- File mpegts.ts mpegts.ts added
I should say similar issue, when using MPEGTS the AR is set to 5:4, when using MKV the AR is set to 16:9. The only thing that changed in this capture was the container type, source video is 16:9
MPEG-TS:
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 5:4
MKV:
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Updated by philip hewitt almost 7 years ago
- File hd-H264source-transcoded.png hd-H264source-transcoded.png added
- File sd-mpeg2source-transcoded.png sd-mpeg2source-transcoded.png added
- File codec params.png codec params.png added
- File profile params.png profile params.png added
Dont know if this helps but I have taken 2 screenshots from within kodi/krypton that shows the aspect ratio issue. Both the HD and SD sources were put through the same transcode settings on tvheadend (4.3-714). Settings can be seen in screenshots "profile params" and "codec params"
Screenshot 1 - BBC one HD - hd-H264source-transcoded.png
this shows full frame being transcoded and aspect ratio (AR) being reported as 1.78
Screenshot 2 - BBC one SD - sd-mpeg2source-transcoded.png
this shows the frame being transcoded and aspect ratio (AR) being reported as 1.22
Both the SD and HD sources are broadcast in 16:9 AR so it seems that TVHeadend is no longer reporting the AR properly in the container to the client?
Would love for this to be fixed as setting kodi to "stretch 16:9" isnt an ideal option as sometimes we have broadcast of old movies in 4:3 format inside a 16:9 frame, so that stretch would completely mess up the AR again.
Please help!?
Updated by philip hewitt almost 7 years ago
- File hd-H264source-original.png hd-H264source-original.png added
- File sd-mpeg2source-original.png sd-mpeg2source-original.png added
to add to the above here are some original "passthrough" samples of the same channels showing the resolutions and aspect ratios
Updated by Jaroslav Kysela almost 7 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|e59a07579e1a0833519b68d39f817ee7ebe836f7.
Updated by Jaroslav Kysela almost 7 years ago
There are no code changes in the transcoding in the latest weeks. If this is a different bug, create another report and upload the affected mpeg-ts stream for an analysis.