TATE video encoding help

The place for all discussion on gaming hardware
Post Reply
User avatar
Turom
Posts: 42
Joined: Fri Mar 11, 2016 12:15 pm
Location: France
Contact:

TATE video encoding help

Post by Turom »

Hello,

I'm currently trying to properly share TATE gameplay, but I have issues with video encoding, my knowledge is a bit limited concerning encoding shenanigans.

I output through a Framemeister and capture with an Elgato card in 720p60.

Here's the data of the original video from the Elgato:
Spoiler

Code: Select all

General
Format                         : MPEG-4
Codec ID                       : M4V 
File size                      : 891 MiB
Duration                       : 4mn 48s
Overall bit rate               : 25.9 Mbps
Recorded date                  : 2017-04-08
Encoded date                   : UTC 2017-04-08 21:33:54
Tagged date                    : UTC 2017-04-08 21:33:54

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                       : 4mn 48s
Bit rate                       : 26.3 Mbps
Width                          : 1 280 pixels
Height                         : 720 pixels
Display aspect ratio           : 16:9
Frame rate mode                : Constant
Frame rate                     : 60.000 fps
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Scan type                      : Progressive
Bits/(Pixel*Frame)             : 0.475
Stream size                    : 883 MiB (99%)
Writing library                : x264 core 148 r2643
Encoding settings              : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x3 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=1 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=12 / keyint_min=7 / scenecut=40 / intra_refresh=0 / rc_lookahead=0 / rc=abr / mbtree=0 / bitrate=26250 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=52500 / vbv_bufsize=52500 / nal_hrd=none / filler=0 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
Encoded date                   : UTC 2017-04-08 21:33:54
Tagged date                    : UTC 2017-04-08 21:33:54
Color range                    : Limited
Color primaries                : BT.709
Transfer characteristics       : BT.709
Matrix coefficients            : BT.709

Audio
ID                             : 2
Format                         : AAC
Format/Info                    : Advanced Audio Codec
Format profile                 : LC
Codec ID                       : 40
Duration                       : 4mn 48s
Bit rate mode                  : Constant
Bit rate                       : 224 Kbps
Channel(s)                     : 2 channels
Channel positions              : Front: L R
Sampling rate                  : 48.0 KHz
Compression mode               : Lossy
Stream size                    : 7.60 MiB (1%)
Encoded date                   : UTC 2017-04-08 21:33:54
Tagged date                    : UTC 2017-04-08 21:33:54
I tried uploading the result directly to Youtube and used the Youtube tool to rotate the video: https://www.youtube.com/watch?v=lL9pJKt8I1o

The result is nice as it's the exact same as the source video, 60FPS, sharp image. Though since the source video is 1280x720 centered, once rotated it's letterboxed, and Youtube doesn't have a crop tool.

For information here's the data of the video Youtube encoded:
Spoiler

Code: Select all

General
Format                         : MPEG-4
Format profile                 : Base Media
Codec ID                       : isom
File size                      : 40.1 MiB
Duration                       : 4mn 48s
Overall bit rate               : 1 168 Kbps
Movie name                     : TATE Youtube Rotation Test
Performer                      : Turom
Recorded date                  : 2017
Writing application            : Lavf55.49.100
Comment                        : https://www.youtube.com/watch?v=lL9pJKt8I1o

Video
ID                             : 1
Format                         : AVC
Format/Info                    : Advanced Video Codec
Format profile                 : [email protected]
Format settings, CABAC         : Yes
Format settings, ReFrames      : 3 frames
Codec ID                       : avc1
Codec ID/Info                  : Advanced Video Coding
Duration                       : 4mn 48s
Bit rate                       : 1 031 Kbps
Width                          : 406 pixels
Height                         : 720 pixels
Display aspect ratio           : 0.564
Frame rate mode                : Constant
Frame rate                     : 60.000 fps
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Scan type                      : Progressive
Bits/(Pixel*Frame)             : 0.059
Stream size                    : 35.4 MiB (88%)
Color range                    : Limited
Color primaries                : BT.709
Transfer characteristics       : BT.709
Matrix coefficients            : BT.709

Audio
ID                             : 2
Format                         : AAC
Format/Info                    : Advanced Audio Codec
Format profile                 : LC
Codec ID                       : 40
Duration                       : 4mn 48s
Bit rate mode                  : Constant
Bit rate                       : 126 Kbps
Channel(s)                     : 2 channels
Channel positions              : Front: L R
Sampling rate                  : 44.1 KHz
Compression mode               : Lossy
Stream size                    : 4.31 MiB (11%)
So I tried to crop the original Elgato video in Sony Vegas since I usually use it for my editing needs, though I couldn't render with x264vfw, which I use for standard resolutions video. Looks like x264vfw doesn't accept my 720x888 custom resolution. Though there may be an option to allow it, I use default settings with it since I don't know what all its options really do.

Then I tried using the MP4 default encoder within Vegas and the result isn't as good as I could hope: https://www.youtube.com/watch?v=saBIWlViJMc

The video quality is correct and I got the ratio I want, though it doesn't look 60FPS at all even though I selected 60FPS in the encoding options, and there's some flickering on the scores/ships.

Here are my encoding settings and the output video information:
Spoiler
Image

Code: Select all

General
Format                         : MPEG-4
Format profile                 : Base Media / Version 2
Codec ID                       : mp42
File size                      : 1.37 GiB
Duration                       : 4mn 48s
Overall bit rate               : 40.7 Mbps
Encoded date                   : UTC 2017-04-26 20:02:36
Tagged date                    : UTC 2017-04-26 20:02:36

Video
ID                             : 2
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                       : 4mn 48s
Bit rate                       : 40.4 Mbps
Width                          : 720 pixels
Height                         : 888 pixels
Display aspect ratio           : 0.811
Frame rate mode                : Constant
Frame rate                     : 60.000 fps
Standard                       : NTSC
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Scan type                      : Progressive
Bits/(Pixel*Frame)             : 1.052
Stream size                    : 1.35 GiB (99%)
Encoded date                   : UTC 2017-04-26 20:02:36
Tagged date                    : UTC 2017-04-26 20:02:36
Color range                    : Limited
Color primaries                : BT.601 NTSC
Transfer characteristics       : BT.601
Matrix coefficients            : BT.601

Audio
ID                             : 1
Format                         : AAC
Format/Info                    : Advanced Audio Codec
Format profile                 : LC
Codec ID                       : 40
Duration                       : 4mn 48s
Bit rate mode                  : Constant
Bit rate                       : 384 Kbps
Channel(s)                     : channel0
Channel(s)_Original            : 2 channels
Channel positions              : Front: L R
Sampling rate                  : 48.0 KHz
Compression mode               : Lossy
Stream size                    : 13.2 MiB (1%)
Encoded date                   : UTC 2017-04-26 20:02:36
Tagged date                    : UTC 2017-04-26 20:02:36
What am I doing wrong here, any tips/ideas?
User avatar
Fudoh
Posts: 13044
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: TATE video encoding help

Post by Fudoh »

You want a pillarboxed 1280x720p (or 1920x1080p) video at the end of your processing.

If you want to use x264vfw as your encoder, you can do the cropping/rotation/pillarboxing in virtualdub. It accepts your captures through a simply avisynth one-liner (directshowsource(...)).

Crop your video, rotate, resize to either 720p or 1080p height and add the borders. For optimal rescaling, use next neighbour to do an integer upscale (3x) and downsize using precise bilinear to your target size.
User avatar
Turom
Posts: 42
Joined: Fri Mar 11, 2016 12:15 pm
Location: France
Contact:

Re: TATE video encoding help

Post by Turom »

Fudoh wrote:You want a pillarboxed 1280x720p (or 1920x1080p) video at the end of your processing.

If you want to use x264vfw as your encoder, you can do the cropping/rotation/pillarboxing in virtualdub. It accepts your captures through a simply avisynth one-liner (directshowsource(...)).

Crop your video, rotate, resize to either 720p or 1080p height and add the borders. For optimal rescaling, use next neighbour to do an integer upscale (3x) and downsize using precise bilinear to your target size.
Thank you for your answer!

Pillarboxing the video would indeed be an easy solution to get a standard resolution, what I liked with the custom resolution though was how great the video played in vertical mode on a mobile/tablet. I'll try and see if x264vfw encoding fixes the framerate, else I'll give VirtualDub a try, maybe I'll have more luck with it keeping proper 60FPS output.

I'll mess a bit with it and update on the results.
User avatar
Turom
Posts: 42
Joined: Fri Mar 11, 2016 12:15 pm
Location: France
Contact:

Re: TATE video encoding help

Post by Turom »

Just an update to let you know that I managed to get excellent results with VirtualDub. I managed to get X264 60FPS TATE format video with custom resolution, since the X264 codec just needs the width and the height of the output to be divisible by 2, no other limitation. Other editing tools were just messing things up with unnecessary tweaks, where VirtualDub does exactly what you want and nothing more, thanks for advising this tool, I'll stick with it now!

Here are two examples of result:

https://www.youtube.com/watch?v=ahC0ZptAquU

https://www.youtube.com/watch?v=KTV77k8SDuY

Videos don't have pillarboxes so it's totally viewable on mobile/tablet device in vertical format, which is what I wanted.
User avatar
Fudoh
Posts: 13044
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: TATE video encoding help

Post by Fudoh »

looks good! What's your upload resolution for these ? YT shows them as 480p60, but resolution is higher than that, right ?
User avatar
Turom
Posts: 42
Joined: Fri Mar 11, 2016 12:15 pm
Location: France
Contact:

Re: TATE video encoding help

Post by Turom »

Thanks! :D

You're right, the source files are 720x888, here's the intro sample metadata:
Spoiler

Code: Select all

General
Complete name                  : XXXX\Layer Section - Framemeister - 2017-04-08 22-32-56.avi
Format                         : AVI
Format/Info                    : Audio Video Interleave
File size                      : 13.3 MiB
Duration                       : 39 s 617 ms
Overall bit rate               : 2 824 kb/s
Writing library                : VirtualDub build 35491/release

Video
ID                             : 0
Format                         : AVC
Format/Info                    : Advanced Video Codec
Format profile                 : [email protected]
Format settings, CABAC         : Yes
Format settings, RefFrames     : 4 frames
Codec ID                       : H264
Duration                       : 39 s 617 ms
Bit rate                       : 1 263 kb/s
Width                          : 720 pixels
Height                         : 888 pixels
Display aspect ratio           : 0.811
Frame rate                     : 60.000 FPS
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Scan type                      : Progressive
Bits/(Pixel*Frame)             : 0.033
Stream size                    : 5.97 MiB (45%)
Writing library                : x264 core 148 r2694bm 3b70645
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=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Audio
ID                             : 1
Format                         : PCM
Format settings, Endianness    : Little
Format settings, Sign          : Signed
Codec ID                       : 1
Duration                       : 39 s 617 ms
Bit rate mode                  : Constant
Bit rate                       : 1 536 kb/s
Channel(s)                     : 2 channels
Sampling rate                  : 48.0 kHz
Bit depth                      : 16 bits
Stream size                    : 7.25 MiB (54%)
Alignment                      : Aligned on interleaves
Interleave, duration           : 17  ms (1.01 video frame)
Interleave, preload duration   : 500  ms
According to Youtube metadata, they converted it in 578x720 :

Code: Select all

Video ID:KTV77k8SDuY
Dimensions:578 x 720
Resolution:578 x 720@60
Optimal Resolution:578 x 720@60
Volume:47%
Relative Loudness:NaN db
Stream Host:r5---sn-25glene7
Stream Type:https
CPN:CWHW-DF6q972-jkc
Mime Type:video/mp4; codecs="avc1.4d401f"
Post Reply