HydrogenAudio

Digital Audio/Video => General A/V => Topic started by: U2021 on 2021-05-13 16:48:15

Title: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: U2021 on 2021-05-13 16:48:15
How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding? (100% lossless please)
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: m14u on 2021-05-13 17:03:16
ffmpeg -hide_banner -i input.mp4 -timestamp now -vn -c:a copy output.m4a
ffmpeg -hide_banner -i input.mkv -timestamp now -vn -c:a copy output.opus
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: U2021 on 2021-05-13 17:14:15
Any pro FFmpeg GUI suggestion for Win x64?
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: shadowking on 2021-05-13 17:50:58
Losslesscut
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: U2021 on 2021-05-13 18:07:50
Losslesscut

Can I losslessly extract audio from video with that app (100% lossless demuxing)?
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: jaybeee on 2021-05-13 18:25:41
Losslesscut

Can I losslessly extract audio from video with that app (100% lossless demuxing)?
Yes. Hence it's name ;-)

LosslessCut (https://github.com/mifi/lossless-cut) really is a great tool.
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: U2021 on 2021-05-13 18:38:04
Losslesscut

Can I losslessly extract audio from video with that app (100% lossless demuxing)?
Yes. Hence it's name ;-)

LosslessCut (https://github.com/mifi/lossless-cut) really is a great tool.

Shows errors after remuxing.
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: jaybeee on 2021-05-13 18:58:19
what do the errors say?

also, if you click the ? then at the very end of the page it says:

Quote from: losslesscut[/quote
LAST FFMPEG COMMANDS
The last executed ffmpeg commands will show up here after you run operations. You can copy them to clipboard and modify them to your needs before running on your command line.

This command might be useful in establishing whether or not it's an ffmeg issue, a losslesscut issue or the media file you're providing it with.

Also, if you read about the program all it does is provide a GUI/frontend for ffmpeg.
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: U2021 on 2021-05-13 19:20:32
what do the errors say?

also, if you click the ? then at the very end of the page it says:

Quote from: losslesscut[/quote
LAST FFMPEG COMMANDS
The last executed ffmpeg commands will show up here after you run operations. You can copy them to clipboard and modify them to your needs before running on your command line.

This command might be useful in establishing whether or not it's an ffmeg issue, a losslesscut issue or the media file you're providing it with.

Also, if you read about the program all it does is provide a GUI/frontend for ffmpeg.

Could you please write a tutorial: how to 100% losslessy remux?
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: clintb on 2021-05-13 20:56:27
Its been a while since I've had the need to extract from a container, but I think MKV Extract can do what you're wanting.
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: U2021 on 2021-05-13 20:57:48
Its been a while since I've had the need to extract from a container, but I think MKV Extract can do what you're wanting.

Does it support MP4?
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: jaybeee on 2021-05-13 21:54:17
MP4: Load file into losslesscut > click Tracks > click on the tracks to disable them leaving only the audio track you want > Export > Select ipod - M4A - Audio for iTunes > Export

MKV: Load file into losslesscut > click Tracks > click on the tracks to disable them leaving only the audio track you want > Export > Select opus - Ogg Vorbis > Export
Title: Re: How to extract audio from MP4 (H.264/AAC) & MKV (VP9/Opus) without re-encoding?
Post by: U2021 on 2021-05-14 13:37:12
MP4: Load file into losslesscut > click Tracks > click on the tracks to disable them leaving only the audio track you want > Export > Select ipod - M4A - Audio for iTunes > Export

MKV: Load file into losslesscut > click Tracks > click on the tracks to disable them leaving only the audio track you want > Export > Select opus - Ogg Vorbis > Export

Thank you so much.