belboz
Member
Hey all,
I am working on a GUI wrapper for ffmpeg to make it easier for me to extract the audio tracks from my OBS MP recordings.
It works well save a few things. One thing to make it more automated, and one thing which is probably my misunderstanding of ffmpeg to extract audio.
So I am hoping some experts out there with ffmpeg can give me some tips.
1) I first parse the video with ffmpeg -i filename.mp4 and look at the resulting output to determine how many audio tracks. This works well. But I was hoping there was a way to use ffmpeg to also show me the names of each audio track that OBS MP labels them with when it creates the mp4. VLC shows each audio track name as I configured it with OBS MP. So I was curious if there was anyway to get ffmpeg to parse the mp4 and dump the audio track names out?
I want to do this so I can automatically add that name to the end of the extracted audio file.
Any thoughts on how I can do this? I tried using "-f ffmetadata metadata.txt" but the resulting file contains nothing about the track names.
2) When I try to extract the audio tracks, I have to add a dummy wav file for the first track.
I want to do this.
But the first wav file is always bad. The others are fine.
If I do.
It works fine and I just toss the corrupt junk.wav
Any thoughts on what is wrong with my original attempt without the junk.wav?
Thanks in advance for any help.
I am working on a GUI wrapper for ffmpeg to make it easier for me to extract the audio tracks from my OBS MP recordings.
It works well save a few things. One thing to make it more automated, and one thing which is probably my misunderstanding of ffmpeg to extract audio.
So I am hoping some experts out there with ffmpeg can give me some tips.
1) I first parse the video with ffmpeg -i filename.mp4 and look at the resulting output to determine how many audio tracks. This works well. But I was hoping there was a way to use ffmpeg to also show me the names of each audio track that OBS MP labels them with when it creates the mp4. VLC shows each audio track name as I configured it with OBS MP. So I was curious if there was anyway to get ffmpeg to parse the mp4 and dump the audio track names out?
I want to do this so I can automatically add that name to the end of the extracted audio file.
Any thoughts on how I can do this? I tried using "-f ffmetadata metadata.txt" but the resulting file contains nothing about the track names.
2) When I try to extract the audio tracks, I have to add a dummy wav file for the first track.
I want to do this.
Code:
ffmpeg -i filename.mp4 -c:a copy -vn -sn -map 0:1 "filename-game.wav" -map 0:2 "filename-comm.wav" -map 0:3 "filename-mic.wav"
But the first wav file is always bad. The others are fine.
If I do.
Code:
ffmpeg -i filename.mp4 -c:a copy -vn -sn -map 0:1 junk.wav -map 0:1 "filename-game.wav" -map 0:2 "filename-comm.wav" -map 0:3 "filename-mic.wav"
It works fine and I just toss the corrupt junk.wav
Any thoughts on what is wrong with my original attempt without the junk.wav?
Thanks in advance for any help.