You are not logged in.

#1 2007-11-24 18:30:17

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

ffmpeg. how to - video to h264 2 pass, audio copy or multichannel ac3

i follow this example from another thread, but cant achieve what i want...

ffmpeg -map 0:0 -map 0:1 -i Animusic\ 2\ -\ 02\ -\ Pogo\ Sticks.vob -threads 3 -b 3100k -vcodec h264 -ac 2 -ab 256k -ar 48000 -acodec aac -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me hex -subq 5 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -vol 400 Animusic\ 2\ -\ 02\ -\ Pogo\ Sticks.mp4

i tried with -acodec copy and carious things but nothing changes...

i want:
-video encoded to h264 one or two passes
-audio copy from file, or encoded to multichanel ac3 or aac
-subtitle copy if possible

but cant achieve that, i have problems with the audio track, cant use ac3 or any multichannel sad


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#2 2007-11-24 18:54:46

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: ffmpeg. how to - video to h264 2 pass, audio copy or multichannel ac3

First off, h264 is a raw stream. It's going to produce a huge file. Much larger than the original. For high quality h264 output, you want to use x264 through FFmpeg. I can't remember exactly what the video codec is called in the version from the repos anymore. On my box it's libx264. Just:

ffmpeg -formats | grep -i x264

That will tell you what the codec is.

x264 doesn't need more than one pass encoding. akuPenguin, one of x264's devs talked about this over at forum.doom9.org. My experiments have confirmed this.

As far as audio goes, you'll need to check again what the current codec is:

ffmpeg -formats | grep -i aac

It may be either libfaac, or faac, or mpeg4audio... I simply don't recall. On my box it's libfaac.

The audio flags that you're using are fine. It will collapse the sound down to just the stereo channels. Standard aac does not support 5.1 sound.

As far as subtitles go, you need to pass the -scodec flag. I've never done it, so I can't help here.

VLC is invaluable in choosing which stream your going to use for audio and subtitles. For instance, in the line you posted above, it will grab the first audio track from the disc (-map 0:1). VLC will easily allow you to switch audio tracks in the order that they appear on the disc. It makes it really fast to try.

Last edited by skottish (2007-11-24 19:32:59)

Offline

#3 2007-11-25 04:37:10

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: ffmpeg. how to - video to h264 2 pass, audio copy or multichannel ac3

Wouldn't h264enc in aur do this for you? Not sure about the subtitles though.

Last edited by FeatherMonkey (2007-11-25 04:37:59)

Offline

#4 2007-11-25 16:09:23

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: ffmpeg. how to - video to h264 2 pass, audio copy or multichannel ac3

thank you FeatherMonkey... h264enc is my now best friend, lol, what a amazing program!! is just what i want, and best, the only thing left are subtitles, but i think i can rip them and then mux it with mkvmerge, i'll see in the week THANK YOU ALL

Last edited by leo2501 (2007-11-25 16:10:06)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#5 2007-11-25 18:04:41

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: ffmpeg. how to - video to h264 2 pass, audio copy or multichannel ac3

leo2501 wrote:

thank you FeatherMonkey... h264enc is my now best friend, lol, what a amazing program!! is just what i want, and best, the only thing left are subtitles, but i think i can rip them and then mux it with mkvmerge, i'll see in the week THANK YOU ALL

I believe that h264enc handles subtitles as well. Just keep in mind what I said before; VLC is invaluable in determining audio and subtitle tracks.

Good luck with this software.

Offline

Board footer

Powered by FluxBB