Log in

View Full Version : No audio from .mov


Starduster
8th August 2013, 11:34
I'm trying to combine a .mov file with some other clips but I can't seem to get the audio to play... even with the single clip. It has 1 channel of 22050 audio in the source. I have quicktime 7 installed so I tried:

LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\QTSource\qtsource.dll")
sld = QTInput("fellowship.mov",audio=true)

Then I saw a similar post here so I copied that:

sld = ffmpegsource2("fellowship.mov",atrack=-1)

Neither worked, I get no audio at all. Any direction would be greatly appreciated.

Reino
8th August 2013, 20:13
You could try [ ffplay.exe (http://ffmpeg.zeranoe.com/builds/) -autoexit "input" ] to see if ffmpeg opens it at all. If so, FFMS should be able to open it as well afaik.

raffriff42
8th August 2013, 23:53
Crude but effective:
C = AudioDub(FFVideoSource(fpath), DirectShowSource(fpath))

Alternately:
C = FFmpegSource2(fpath, atrack=1) ## atrack=1 usually works, for me
C = (C.AudioChannels > 0) ? C : AudioDub(C, DirectShowSource(fpath))

Or, you could try all values of atrack from -2 to +2

raffriff42
15th August 2013, 04:50
>try all values of atrack from -2 to +2
Wrong! I want to correct myself after re-reading the docs:

Summarizing from the FFmpegSource2 User Manual (http://ffmpegsource.googlecode.com/svn/trunk/doc/ffms2-avisynth.html):
FFmpegSource2(string source, int vtrack = -1, int atrack = -2, ...) Track numbers start from zero, and are guaranteed to be continuous
-1 means open the first video track.
setting atrack <= -2 means audio is disabled.Default equals -2 equals "audio is disabled."

So, try setting atrack to...
-1, which *might* open the first audio track (the docs are not clear on this)
0 or higher to select the track number directly.
You can use trial and error, or if you are looking for a particular track, use ffmpeg -i "path" and examine the output to get the track number.

Here's some sample ffmpeg output, edited for brevity:
sample # 1, atrack= 0:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample 1.flv':
Duration: 00:08:04.23, start: 0.000000, bitrate: 620 kb/s
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, ...
Stream #0:1(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 480x360 ...

sample # 2, atrack = 1 (multichannel) or 2 (stereo):
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample 2.mp4':
Duration: 00:00:05.90, start: 0.000000, bitrate: 485 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, ...
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, 5.1, fltp, ...
Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, ...