Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot copy/encode just one audio language track in a movie #107

Closed
Jafea7 opened this issue Jan 22, 2023 · 4 comments
Closed

Cannot copy/encode just one audio language track in a movie #107

Jafea7 opened this issue Jan 22, 2023 · 4 comments

Comments

@Jafea7
Copy link

Jafea7 commented Jan 22, 2023

I have been trying to get QSVencC to include just the English audio track in an output file either by copy or encode but it always includes all audio tracks in the output.

For example, I have a movie with Italian, English, and French audio tracks plus Italian, English, and French subtitles - each track has metadata describing it's language.

Basic MediaInfo output:
Test_Movie

If I specify --audio-copy eng I always end up with all audio tracks and yet the --sub-copy eng works perfectly, I only get English subtitles.

qsvEncC64.exe --avhw --codec av1 --quality high --icq 25 --ref 8 --bframes 3 --audio-copy eng --sub-copy eng -i Test_Movie.mkv -o Test_Output.mkv
--------------------------------------------------------------------------------
Test_Output.mkv
--------------------------------------------------------------------------------
PG is not supported on this platform, switched to FF mode.
cop.AUDelimiter value changed off -> auto by driver
cop.PicTimingSEI value changed off -> auto by driver
cop.SingleSeiNalUnit value changed off -> auto by driver
cop3.DirectBiasAdjustment value changed off -> auto by driver
cop3.GlobalMotionBiasAdjustment value changed off -> auto by driver
QSVEncC (x64) 7.26 (r2949) by rigaya, Jan 21 2023 09:32:43 (VC 1934/Win)
OS             Windows 10 x64 (19045) [UTF-8]
CPU Info       AMD Ryzen 5 5600X 6-Core Processor [4.67GHz] (6C/12T) <DG2>
GPU Info       Intel Arc A750 Graphics (448EU) 300-2400MHz (31.0.101.4034)
Media SDK      QuickSyncVideo (hardware encoder) FF, 1st GPU, API v2.08
Async Depth    3 frames
Hyper Mode     off
Buffer Memory  d3d11, 23 work buffer
Input Info     avqsv: H.264/AVC, 1920x800, 24/1 fps
AVSync         cfr
Output         AV1(yuv420) main @ Level 4
               1920x800p 1:1 24.000fps (24/1fps)
               avwriter: av1, ac3, ac3, ac3, subtitle#2 => matroska
Target usage   3 - high
Encode Mode    ICQ (Intelligent Const. Quality)
ICQ Quality    25
Scenario Info  (null)
QP Limit       min: none, max: none
Ref frames     8 frames
GopRefDist     4, B-pyramid: on
Max GOP Length 240 frames

encoded 149372 frames, 513.63 fps, 1590.19 kbps, 1179.82 MB
encode time 0:04:50, CPU: 4.9%, VD: 128.3%
frame type IDR    623
frame type I      623,  total size    29.34 MB
frame type P   148749,  total size  1150.48 MB

Test_Output1

This also happens when I only want just a single encoded audio track in the output:

qsvEncC64.exe --avhw --codec av1 --quality high --icq 25 --ref 8 --bframes 3 --audio-codec eng?aac --audio-bitrate 192 --audio-stream eng?stereo --sub-copy eng -i Test_Movie.mkv -o Test_Output.mkv
--------------------------------------------------------------------------------
Test_Output.mkv
--------------------------------------------------------------------------------
PG is not supported on this platform, switched to FF mode.
cop.AUDelimiter value changed off -> auto by driver
cop.PicTimingSEI value changed off -> auto by driver
cop.SingleSeiNalUnit value changed off -> auto by driver
cop3.DirectBiasAdjustment value changed off -> auto by driver
cop3.GlobalMotionBiasAdjustment value changed off -> auto by driver
QSVEncC (x64) 7.25 (r2944) by rigaya, Jan 11 2023 12:21:00 (VC 1934/Win)
OS             Windows 10 x64 (19045) [UTF-8]
CPU Info       AMD Ryzen 5 5600X 6-Core Processor [4.67GHz] (6C/12T) <DG2>
GPU Info       Intel Arc A750 Graphics (448EU) 300-2400MHz (31.0.101.4034)
Media SDK      QuickSyncVideo (hardware encoder) FF, 1st GPU, API v2.08
Async Depth    3 frames
Hyper Mode     off
Buffer Memory  d3d11, 23 work buffer
Input Info     avqsv: H.264/AVC, 1920x800, 24/1 fps
AVSync         cfr
Output         AV1(yuv420) main @ Level 4
               1920x800p 1:1 24.000fps (24/1fps)
               avwriter: av1, ac3,
                #2:ac3/5.1(side):stereo -> aac/stereo/192kbps, ac3, subtitle#2
                => matroska
Target usage   3 - high
Encode Mode    ICQ (Intelligent Const. Quality)
ICQ Quality    25
QP Limit       min: none, max: none
Ref frames     8 frames
GopRefDist     4, B-pyramid: on
Max GOP Length 240 frames

encoded 149372 frames, 513.63 fps, 1590.19 kbps, 1179.82 MB
encode time 0:04:50, CPU: 8.1%, VD: 128.3%
frame type IDR    623
frame type I      623,  total size    29.34 MB
frame type P   148749,  total size  1150.48 MB

I end up with the English track encoded to AAC stereo, (so it must be recognising the language metadata), but still get the Italian and French 6ch AC3 audio tracks in the output.

Test_Output2

What do you need to do to get only a specific language audio track in the output?

Using QSVencC64 v7.26, Win 10, Arc 750 LE.

@rigaya
Copy link
Owner

rigaya commented Jan 22, 2023

Thank you for reporting the issue.

This was a bug of --audio-copy, QSVEnc 7.27 should fix this issue.

@Jafea7
Copy link
Author

Jafea7 commented Jan 23, 2023

Thank you for that, the --audio-copy eng now works but how do I only get the English audio track when I encode?

I still get all three language audio tracks using something like:

qsvEncC64.exe --avhw --codec av1 --quality high --icq 25 --ref 8 --bframes 3 --audio-codec eng?aac --audio-bitrate 192 --audio-stream eng?stereo --sub-copy eng -i Test_Movie.mkv -o Test_Output.mkv

The English track is encoded to AAC stereo but the Italian/French 6ch AC3 tracks are still included in the output.

@rigaya
Copy link
Owner

rigaya commented Jan 23, 2023

Please change change --audio-bitrate 192 to --audio-bitrate eng?192, as --audio-bitrate 192 is actually short for --audio-bitrate <all>?192.

@Jafea7
Copy link
Author

Jafea7 commented Jan 23, 2023

Thank you again, works perfectly.

@Jafea7 Jafea7 closed this as completed Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants