INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Search all forums or this forum: Advanced search
merge avi with double sound track

Forum Index -> ffmpegX -> ffmpegX general discussion Printer-friendly version
Reply to topic
Author Message
facan
Member


Joined: 21 Jun 2008
Location: Europe

Post Posted: Jun 21, 2008 09:50 Posts Comp View users profile Send private message Reply with quote

O.K., I got these two .AVI files which are two parts of the same video, each with double sound track (original sound+ translation).
I want to make a DVD, but stop at the first step: joining the two .AVI WITHOUT LOSING THE SECOND AUDIO TRACK.

If anybody could help me on this, then the second step is: once I got the (big) .AVI with two audio tracks, how can I create a video folder to be burnt with either Popcorn or Toast, without losing the two audio tracks?

Sorry for being so naive...


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 21, 2008 10:18 Posts Comp View users profile Send private message Reply with quote

My advice would be to NOT join them before converting. This avoids lots of possible problems. When setting Toast to "Play all items continuously", the end of part one will continue with the beginning of part two.

The current version of ffmpegX cannot do it all in one step, so you'll have to do the second audio track separately and add that later.

Assuming this is a DivX/XviD AVI, does it have Mp3 audio or AC3 audio?


facan
Member


Joined: 21 Jun 2008
Location: Europe

Post Posted: Jun 21, 2008 10:31 Posts Comp View users profile Send private message Reply with quote

Well, as I said, I am rather naive. I do not know how to look at the audio coding. What ffmpegx says when just opening either of the two files (and pressing the INFO button) is for video XVID, but no information on the audio coding (just bitrate, and other stuff like that). On the Audio tab. ffmpegx proposes to encode it to MP3 before I set any possible option, but I do not think that ffmpegx decision is based on the input format.


Sorry for being so vague...


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 21, 2008 11:00 Posts Comp View users profile Send private message Reply with quote

When opening an AVI file in ffmpegX, it should also list some basic details in the Summary window (screenshot) on the left (Source format: From, Video, Audio). What does it say in the Audio field? (It will list the first audio stream it finds only, though.)

Diego has made the excellent MediaInfo Mac GUI application, which will tell you more than enough details on just about any movie file. If you're overwhelmed by the amount of detail, you could export a text file and upload that as a file attachment with your post.


facan
Member


Joined: 21 Jun 2008
Location: Europe

Post Posted: Jun 21, 2008 12:03 Posts Comp View users profile Send private message Reply with quote

What is written there (copy&paste) is:
ac3, 48000 Hz, 5:1, 448 kb/s
but it does not say anything on the second (or first) stream.
Mediainfo looks nice, I downloaded it, but does not work on my mac (I have 10.3.9). Probably it only runs on Tiger or more...


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 21, 2008 12:21 Posts Comp View users profile Send private message Reply with quote

facan wrote:
ac3, 48000 Hz, 5:1, 448 kb/s
That's cool, because it can be used on the DVD "as-is", without converting at all, at original quality.
Most likely, both streams are the same format, but you should verify.

facan wrote:
Mediainfo does not work on my mac (I have 10.3.9). Probably it only runs on Tiger or more...
I've read the next version will have an option for user system feedback, so the author knows when he could stop caring about Tiger and start a Leopard-only version of the software. sad.gif

There are other tools to give you information on both audio streams:
- VLC (Menu Window > Information > Advanced Information; click the arrows to toggle the details on the numbered streams).
- MPEG Streamclip (Menu File > Show Stream Info)
- QuickTime Player (Menu Window > Show Movie Properties)
(QuickTime Player may need the A52Codec (separate download or as part of Perian) to fully recognize AC3 audio).


facan
Member


Joined: 21 Jun 2008
Location: Europe

Post Posted: Jun 21, 2008 12:44 Posts Comp View users profile Send private message Reply with quote

Ok, thanks a lot! from VLC I got the two streams (I am copying):
Stream 1:
Codec A52

Sample 48000 Hz
Bitrate 448 kbit/sec

Stream 2:
Codec mpga
sample rate 48000 Hz
Bitrate 120 kbit/sec


That's all, I believe. Any hints from them?

Thanks again


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 21, 2008 13:38 Posts Comp View users profile Send private message Reply with quote

facan wrote:
Stream 2: Codec mpga
mpga stands for MPEG Audio, which in AVIs is normally MP3 (MPEG-1 Layer III).
Now I know what you're dealing with: XviD video, AC3 audio and MP3 audio.

Next question: What is the source video framerate?


facan
Member


Joined: 21 Jun 2008
Location: Europe

Post Posted: Jun 21, 2008 17:48 Posts Comp View users profile Send private message Reply with quote

Being out for a while...
the source video framerate is 25.000000, and the resolution is 512x272


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 22, 2008 02:14 Posts Comp View users profile Send private message Reply with quote

Open your source file in ffmpegX, choose a DVD preset: DVD mpeg2enc. In the Video tab, set Autosize to 'DVD 16:9'. In the Audio tab, set the Audio Codec to Passthrough.
Make sure Letterbox is checked in the Options tab, so that your 512x272 movie will fit in a 16:9 frame by using 16 px black bar above and below.
We'll be needing the elementary streams, so set that checkmark in the ffmpegX menu. (It's default, so just verifying is enough.)
Uncheck Author as DVD (VIDEO_TS) in the Options tab, as Toast will do the authoring.
Encode. This step will do the first audio only.

Next, to convert the second audio stream to AC3:
Open your source file in ffmpegX, choose the Movie Audio to AC3 preset. In the Audio tab, set the track number from '0' to '1'. Set Channels to Stereo. Set the bitrate somewhat lower than 448; 128 kbps seems sort of right. Encode.

So, now you should have:
- Movie.part1.video.m2v
- Movie.part1.audio1.ac3
- Movie.part1.audio2.ac3
- Movie.part2.video.m2v
- Movie.part2.audio1.ac3
- Movie.part2.audio2.ac3
Any other temporary files (.wav, .mpg) may be deleted.
The total of the file sizes should be less than the capacity of the DVD disc.

Next, mux the elementary streams with the Mux tool in the Tools tab. As you may see, the tool allows for two audio streams. Mux as DVD, but do not author (uncheck the Author box).
Now you should have:
- Movie.part1.muxed.mpg
- Movie.part2.muxed.mpg

Drop these two file in Toast's Video>DVD Video window. Set "Play all items continuously". Save as Disk Image. Mount the disk image. Test the DVD in Apple DVD Player, including the transition between part 1 and part 2, and switching the audio streams.
When satisfied, burn the disk image.


Case
Explorer


Joined: 04 Feb 2004
Location: Middle Earth

Post Posted: Jun 22, 2008 10:55 Posts Comp View users profile Send private message Reply with quote

Case wrote:
Drop these two file in Toast's Video>DVD Video window.
When I just tried this, Toast would only take the first audio stream and ignore the second. Bummer.
I found a solution to that by using iVCD for authoring the MPGs to a VIDEO_TS folder in a disk image.


facan
Member


Joined: 21 Jun 2008
Location: Europe

Post Posted: Jun 22, 2008 16:29 Posts Comp View users profile Send private message Reply with quote

Thanks for the detailed explanations. I tried to follow your instructions, with two differences:
1. Not able to find the "stereo" switch
2. I excluded "decode with Quicktime", and encoded with mplayer. The reason is that sometimes Quicktime gives me problems, so I wanted to be sure.

It lasted overall almost half a day, and at the end I got the following files:
1. Part1.avi.ff.mpa. This is soundrack 1 only.
2. Part1.avi.ff.mpg. This is the video, plus soundtrack 1.
3. Part1.avi.ff.mpg.ac3. This is soundtrack 2 only.
4. Part1.avi.ff.mpv. This is the video, with no soundtracks

5. Part2.avi.ff.ac3. This is soundtrack 2 (second part)
6. Part2.avi.ff.mpv. This is the video, no soundtracks (part 2)
7. Part2.avi.ff.mpa. This is soundtrack 1 (part 2) only.
8.Part2.avi.ff.mpg This is the video (part 2) plus soundtrack 1

I also got two empty directories, which I think had been used for temporary files. No .wav or other strange files. I deleted the two .mpg files, so I got (except names) the same 6 files you mentioned.
Muxing replaced the two mute videos with two videos each with two soundtracks. I was then put the two videos in the DVD window of Toast, and finally got the whole DVD.

I repeated all steps to ensure others that they can use your procedure AND IT WORKS!

Thanks again


Reply to topic All times are GMT - 6 Hours
Forum Index -> ffmpegX -> ffmpegX general discussion Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
About   Advertise   Forum Archive   RSS Feeds   Statistics