Hi quality audio coding (more than AAC 320)?

andivax

New Member
Hi!
I am using AAC 320 at this moment.
Is it possible to stream and RECORD with uncompressed audio (wav 44100 32 bits)?

Thank you!
 

rockbottom

Active Member
Yep for your recording. No to streaming.

Here's the settings I use to record H265 with 24/48 PCM, you can change & test different Audio & Video encoders to suit your needs.

These are the custom Video Encoder Settings I'm using too.

preset=hq profile=main tier=high rc=constqp rc-lookahead=32 init_qpP=18 init_qpB=18 init_qpI=18 bf=2 b_ref_mode=disabled

HEVC PCM Capture.JPG
 
Last edited:

rockbottom

Active Member
Media info for a recording from 8/25.

===================== General =====================
Count : 323
Countof stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Unique ID : 283065311560974380214830178673171923682
Unique ID : 283065311560974380214830178673171923682 (0xD4F4655EA2706A0B17624023039C82E2)
Countof video streams : 1
Countof audio streams : 1
Video formats : HEVC
Video_Format_WithHint_List : HEVC
Codecs Video : V_MPEGH/ISO/HEVC
Audio formats : PCM
Audio_Format_WithHint_List : PCM
Audio codecs : PCM
Complete name : K:\NVENC HQ FRAME DROP TEST\2020-08-25_17-57-51.mkv
Folder name : K:\NVENC HQ FRAME DROP TEST
File name : 2020-08-25_17-57-51
File extension : mkv
Format : Matroska
Format : Matroska
Format URL : http://packs.matroska.org/
Format extensionsusually us : mkv mk3d mka mks
Commercial name : Matroska
Formatversion : Version 4 / Version 2
Codec : Matroska
Codec : Matroska
Codec URL : http://packs.matroska.org/
Codec extensionsusually use : mkv mk3d mka mks
File size : 28854242788
File size : 26.9 GB
File size : 27 GB
File size : 27 GB
File size : 26.9 GB
File size : 26.87 GB
Duration (ms) : 13968832
Duration (ms) : 3h 52mn
Duration (ms) : 3h 52mn 48s 832ms
Duration (ms) : 3h 52mn
Duration (ms) : 03:52:48.832
Duration (ms) : 03:53:16:32
Duration (ms) : 03:52:48.832 (03:53:16:32)
Overall bit rate : 16524928
Overall bit rate : 16.5 Mbps
Frame rate : 60.119
Frame rate : 60.119 fps
Frame count : 839792
File creation date : UTC 2020-08-25 21:57:51.686
File creation date (local) : 2020-08-25 17:57:51.686
File last modification date : UTC 2020-08-26 01:50:41.620
File last modification date : 2020-08-25 21:50:41.620
Writing application : Lavf58.29.100
Writing application : Lavf58.29.100
Writing library : Lavf58.29.100 / Lavf58.29.100
Writing library : Lavf58.29.100 / Lavf58.29.100
ErrorDetectionType : Per level 1

===================== Video =====================
Count : 335
Countof stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
StreamOrder : 0
Id : 1
Id : 1
Unique ID : 1
Format : HEVC
Format info : High Efficiency Video Coding
Format URL : http://www.itu.int
Commercial name : HEVC
Formatprofile : Main@L4.1@Main
Internet media type : video/H265
Codec Id : V_MPEGH/ISO/HEVC
Codec : V_MPEGH/ISO/HEVC
Codec : V_MPEGH/ISO/HEVC
Codecprofile : Main@L4.1@Main
Duration (ms) : 13968828
Duration (ms) : 3h 52mn
Duration (ms) : 3h 52mn 48s 828ms
Duration (ms) : 3h 52mn
Duration (ms) : 03:52:48.828
Duration (ms) : 03:53:16:32
Duration (ms) : 03:52:48.828 (03:53:16:32)
Width : 1920
Width : 1 920 pixels
Height : 1080
Height : 1 080 pixels
Stored_Height : 1088
Sampled_Width : 1920
Sampled_Height : 1080
Pixel aspect ratio : 1.000
Display aspect ratio : 1.778
Display aspect ratio : 16:9
Frame rate mode : CFR
Frame rate mode : Constant
Frame rate : 60.119
Frame rate : 60.119 fps
Original frame rate : 60.000
Original frame rate : 60.000 fps
Frame count : 839792
Resolution : 8
Resolution : 8 bits
Colorimetry : 4:2:0
Color space : YUV
Chroma subsampling : 4:2:0
Chroma subsampling : 4:2:0
Bit depth : 8
Bit depth : 8 bits
Delay : 0
Delay : 00:00:00.000
Delay, origin : Container
Delay, origin : Container
Default : Yes
Default : Yes
Forced : No
Forced : No
Color range : Limited
colour_description_present : Yes
Matrix coefficients : BT.709
DURATION : 03:52:48.267000000

===================== Audio =====================
Count : 273
Countof stream of this kind : 1
Kind of stream : Audio
Kind of stream : Audio
Stream identifier : 0
StreamOrder : 1
Id : 2
Id : 2
Unique ID : 2
Format : PCM
Commercial name : PCM
Codec Id : A_PCM/INT/LIT
Codec : PCM
Codec : PCM
Codec family : PCM
Codec info : Linear PCM (Little Endian)
Duration (ms) : 13968832
Duration (ms) : 3h 52mn
Duration (ms) : 3h 52mn 48s 832ms
Duration (ms) : 3h 52mn
Duration (ms) : 03:52:48.832
Duration (ms) : 03:52:48.832
Bit rate mode : CBR
Bit rate mode : Constant
Channel(s) : 2
Channel(s) : 2 channels
Sampling rate : 48000
Sampling rate : 48.0 KHz
Samples count : 670503936
Resolution : 24
Resolution : 24 bits
Bit depth : 24
Bit depth : 24 bits
Delay : 0
Delay : 00:00:00.000
Delay, origin : Container
Delay, origin : Container
Delayrelative to video : 0
Delayrelative to video : 00:00:00.000
Video0 delay : 0
Video0 delay : 00:00:00.000
Default : Yes
Default : Yes
Forced : No
Forced : No
DURATION : 03:52:48.832000000
 

rockbottom

Active Member
Log file from the session. I was running (2) streams plus the recording.
 

Attachments

  • 2020-08-25_17-57-27.txt
    19.2 KB · Views: 19

andivax

New Member
Here's the settings I use to record H265 with 24/48 PCM, you can change & test different Audio & Video encoders to suit your needs.
These are the custom Video Encoder Settings I'm using too.
preset=hq profile=main tier=high rc=constqp rc-lookahead=32 init_qpP=18 init_qpB=18 init_qpI=18 bf=2 b_ref_mode=disabled

Thank you VERY MUCH! You are da man! )

Have some questions tho )

1. Is it possible to set frames to 30 fps via video encoder settings? My streaming is 60 fps but I don't want to waste disk space and want to reduce it to 30 fps.
2. My main goal is COMPATIBILITY (PC and MAC). So I setup MOV instead of Matroska and nvenc_h264 instead of hevc.
3. audio encoder is pcm_s24le (like you suggested). LE is little endian and BE is big endian. Should I change LE to BE or nevermind?
4. You suggested audio bitrate to 2304 Kbps. Why so weird numbers? ))
5. How can I reduce SIZE (and quality) of the video? By increasing init_qpP, init_qpB and init_qpI? From 18 to let's say 32?

Thank you!
 

Attachments

  • my hi res settings.jpg
    my hi res settings.jpg
    99.3 KB · Views: 95

rockbottom

Active Member
1. I haven't looked into that so I'm not sure.

2. I don't use the mov container but I tested it & PCM works with it. I was able to playback the video with VLC & import it into Vegas Pro. You'll need to look into the encoder settings though, the settings I posted above are for HEVC & most don't work with the mov container. Here's my log.

09:05:00.227: Switched to profile 'Custom NVENC FFMEG Record (24/48 PCM) & Stream' (Custom_NVENC_FFMEG_Record_2448_PCM__Stream)
09:05:00.227: ------------------------------------------------
09:14:40.352: Created profile 'MOV test' (duplicate, MOV_test)
09:14:40.352: ------------------------------------------------
09:15:19.406: Settings changed (outputs)
09:15:19.406: ------------------------------------------------
09:15:23.510: Failed to set tier=high
09:15:23.510: Failed to set rc=constqp
09:15:23.510: Failed to set init_qpP=18
09:15:23.510: Failed to set init_qpB=18
09:15:23.510: Failed to set init_qpI=18
09:15:23.510: Failed to set b_ref_mode=disabled
09:15:23.510: If you're trying to set x264 parameters, use x264-params=name=value:name=value
09:15:23.512: Failed to open video codec: Invalid argument
09:15:23.512: ffmpeg_data_init failed
09:15:23.518: ==== Recording Stop ================================================
09:15:36.326: Failed to set tier=high
09:15:36.326: Failed to set rc=constqp
09:15:36.326: Failed to set init_qpP=18
09:15:36.326: Failed to set init_qpB=18
09:15:36.326: Failed to set init_qpI=18
09:15:36.326: Failed to set b_ref_mode=disabled
09:15:36.326: If you're trying to set x264 parameters, use x264-params=name=value:name=value
09:15:36.326: Failed to open video codec: Invalid argument
09:15:36.326: ffmpeg_data_init failed
09:15:36.331: ==== Recording Stop ================================================
09:15:53.047: Settings changed (outputs)
09:15:53.047: ------------------------------------------------
09:15:55.598: Failed to set tier=high
09:15:55.598: Failed to set rc=constqp
09:15:55.598: Failed to set init_qpP=18
09:15:55.598: Failed to set init_qpB=18
09:15:55.598: Failed to set init_qpI=18
09:15:55.598: Failed to set b_ref_mode=disabled
09:15:55.598: If you're trying to set x264 parameters, use x264-params=name=value:name=value
09:15:55.598: Failed to open video codec: Invalid argument
09:15:55.598: ffmpeg_data_init failed
09:15:55.603: ==== Recording Stop ================================================
09:16:34.456: Settings changed (outputs)
09:16:34.456: ------------------------------------------------
09:16:37.449: ==== Recording Start ===============================================
09:16:40.637: Output 'adv_ffmpeg_output': stopping
09:16:40.637: Output 'adv_ffmpeg_output': Total frames output: 190
09:16:40.637: Output 'adv_ffmpeg_output': Total drawn frames: 192
09:16:40.637: ==== Recording Stop ================================================
09:17:03.233: Settings changed (outputs)
09:17:03.233: ------------------------------------------------
09:17:06.736: ==== Recording Start ===============================================
09:17:12.117: Output 'adv_ffmpeg_output': stopping
09:17:12.117: Output 'adv_ffmpeg_output': Total frames output: 322
09:17:12.117: Output 'adv_ffmpeg_output': Total drawn frames: 323
09:17:12.117: ==== Recording Stop ================================================

3. I would stick with LE, better compatibility.

4. 2,304Kb/s is the bit-rate of 24/48 PCM.

5. Yes, but those commands are for HEVC & will need to be modified for the mov container. See #2 above.
 

rockbottom

Active Member
YW!

I'm going to have to test my workflow with the mov container some more. I switched the encoder back to HEVC from x264 & put my encoder settings back in & they all worked. Better yet, I'm able to import the H265 mov recording right into Vegas. With the mkv's, I have to re-mux the video to MPEG-4 container & then extract the audio with MKVCleaver before I can get the audio/video tracks into Vegas....
 

andivax

New Member
yup. that`s definitely system dependent.
I succesfully used MOV convainer with h264 and 32 bit 44100 PCM audio.
Looking cool and sounds cool )
Thanx!

Premiere Pro, VLC and other players accepted those MOV.
But I can't use MP4 coding on my system for some reason )))
 

rockbottom

Active Member
Nice!

Weird, since the video track in your recordings is MPEG-4.

Here's a good page to help with the Encoder settings for x264


Here are some of the settings that failed when I switched from HEVC to x264:
09:15:36.326: Failed to set rc=constqp
09:15:36.326: Failed to set init_qpP=18
09:15:36.326: Failed to set init_qpB=18
09:15:36.326: Failed to set init_qpI=18

For x264 use:
rc=crf
crf=18.0
 

rockbottom

Active Member
For the OBS log
Help > Log Files > View Current Log (or Show Log Files for the folder)

If the Encoder settings you try fail it will show in the log. If they are accepted, it won't show in the log. No news is good news.
 

andivax

New Member
thanx!
it shows only 3 errors
19:48:49.820: Failed to set tier=high
19:48:49.820: Failed to set rc=crf
19:48:49.820: Failed to set crf=18.0

when I am using your original custom encoder setting:
preset=hq profile=main tier=high rc=constqp rc-lookahead=32 init_qpP=18 init_qpB=18 init_qpI=18 bf=2 b_ref_mode=disabled

I've got ailed to set tier=high ONLY
 

rockbottom

Active Member
Try these, all look to be working. Adjust the settings as needed.

x264-params=preset=hq:profile=high:rc=crf:crf=18:rc-lookahead=32:bframes=2

13:13:28.482: ==== Recording Start ===============================================
13:13:33.289: Output 'adv_ffmpeg_output': stopping
13:13:33.289: Output 'adv_ffmpeg_output': Total frames output: 288
13:13:33.289: Output 'adv_ffmpeg_output': Total drawn frames: 289
13:13:33.289: ==== Recording Stop ================================================
 

andivax

New Member
Things becomes worse ))))
Failed to set x264-params=preset=hq:profile=high:rc=crf:crf=18:rc-lookahead=32:bframes=2
 

rockbottom

Active Member
OK, that's weird.

If the original settings were working use them, I removed tier=high since that applies to HEVC. Hopefully no failures....

preset=hq profile=main rc=constqp rc-lookahead=32 init_qpP=18 init_qpB=18 init_qpI=18 bf=2 b_ref_mode=disabled
 
Top