News:

Welcome to week4paug.net 2.1 - same as it ever was! Most features have been restored, but please keep us posted on ANY issues you may be having HERE:  https://week4paug.net/index.php/topic,23937

Main Menu

ffmpeg guru's

Started by Marmar, February 06, 2021, 10:41:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marmar

Anyone here really good with ffmpeg command line use?

me? not so much. I've looked at the online help and it just doesn't seem to cover what I am looking to do with ffmpeg. I don't know if handbrake can do what I need done, so that's why I am going with ffmpeg because it *seems* like this would be the tool to use....

I need to just add 2 audio tracks to a video file. One being 2ch FLAC 16/48 the other being 5.1 AC3.....I can probably do it in an NLE, but I would rather just assemble my TIFF images into a video file, then add the untouched audio tracks to that file.

Anyone willing to help learn me how?
Who's the Marmar? I'm the Marmar!!!

Phish doesn't write beautiful music...the beautiful music happens after the written parts.

<gainesvillegreen> now, if they could get their sound to be as good as the lights, we'd have a band hee-yah!!

Music is what feelings sound like.

kellerb

I think MKVtoolNIXgui would be able to do that relatively easy?

Marmar

Who's the Marmar? I'm the Marmar!!!

Phish doesn't write beautiful music...the beautiful music happens after the written parts.

<gainesvillegreen> now, if they could get their sound to be as good as the lights, we'd have a band hee-yah!!

Music is what feelings sound like.

ph92

#3
RTFM  :hereitisyousentimentalbastard

I've used it on the command line, and it a bitch to get working right. The syntax is pretty finicky.



There's some stuff here that may help you.

Alternatively, the application Handbrake is basically just a GUI/wrapper for ffmpeg/x264/x265 and more. It's got tons of extra features and I'm fairly certain it's extensible. It seems to be the gold standard for encoding, so I'm sure there's a way.... but it is a very steep learning curve with handbreake as well.
Make America Melt Again!

Quote from: runawayjimbo on July 25, 2017, 11:10:15 PM
FUCK YEAH TREY. FUCK YEAH

Marmar

Quote from: ph92 on February 07, 2021, 07:55:40 PM
RTFM  :hereitisyousentimentalbastard

I've used it on the command line, and it a bitch to get working right. The syntax is pretty finicky.



There's some stuff here that may help you.

Alternatively, the application Handbrake is basically just a GUI/wrapper for ffmpeg/x264/x265 and more. It's got tons of extra features and I'm fairly certain it's extensible. It seems to be the gold standard for encoding, so I'm sure there's a way.... but it is a very steep learning curve with handbreake as well.

Literally have not found anything anywhere that explains what I want to do....

Video w/2ch PCM audio
I want to ADD: 5.1ac3 audio as a second audio stream to the existing file....

End Result: Encoded file with 2ch FLAC and 5.1 AC3 as selectable streams

I can do this on a DVD all day....used to do it all the time....but I can not for the life of me figure out how to append a secondary audio stream to an existing file.....
Who's the Marmar? I'm the Marmar!!!

Phish doesn't write beautiful music...the beautiful music happens after the written parts.

<gainesvillegreen> now, if they could get their sound to be as good as the lights, we'd have a band hee-yah!!

Music is what feelings sound like.

ph92

#5
https://linux.die.net/man/1/ffmpeg

Quote-newaudio
Add a new audio track to the output file. If you want to specify parameters, do so before "-newaudio" ("-acodec", "-ab", etc..).
Mapping will be done automatically, if the number of output streams is equal to the number of input streams, else it will pick the first one that matches. You can override the mapping using "-map" as usual.

Example:

ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio

Maybe?


When it comes to these kind of apps, just copy a small section of your video and just start trying things out. That way you don't have to wait for the whole damn video to do it's thing. Just some testing on a small sample video/audio.

When I'm scripting and writing small programs, it takes TONS of testing to get it right. Just start trying some shit and see what happens.
Make America Melt Again!

Quote from: runawayjimbo on July 25, 2017, 11:10:15 PM
FUCK YEAH TREY. FUCK YEAH

Marmar

found it.

if anyone needs this feature here is the command line:

ffmpeg -i video.avi -i audio1.mp3 -i audio2.mp3 -map 0 -map 1 -map 2 -codec copy output

That command allows you to have 2 audio streams (2ch and 5.1 for example) mapped to one video file. PERFECT for copying SD DVD's to HD mkv files with flac and ac3/dts audio tracks.
Who's the Marmar? I'm the Marmar!!!

Phish doesn't write beautiful music...the beautiful music happens after the written parts.

<gainesvillegreen> now, if they could get their sound to be as good as the lights, we'd have a band hee-yah!!

Music is what feelings sound like.

ph92

Quote from: Marmar on February 14, 2021, 10:16:29 AM
found it.

if anyone needs this feature here is the command line:

ffmpeg -i video.avi -i audio1.mp3 -i audio2.mp3 -map 0 -map 1 -map 2 -codec copy output

That command allows you to have 2 audio streams (2ch and 5.1 for example) mapped to one video file. PERFECT for copying SD DVD's to HD mkv files with flac and ac3/dts audio tracks.
Glad you got it! Now make it a little shell script that takes arguments and it'll be portable!

I did also see that you can add offsets to the audio streams individually if needed
Make America Melt Again!

Quote from: runawayjimbo on July 25, 2017, 11:10:15 PM
FUCK YEAH TREY. FUCK YEAH