View Full Version : mp4 audio problem
tacman1123
5th October 2008, 16:36
I'm not sure which filter I should be using for mp4 files -- they play okay in WMP, but not in avisynth.
The video is from the Open Source Movie Project, the one I choose randomly (less than 500k) is at
http://www.archive.org/download/LeoMadridArtistInterview/CastilloC_64kb.mp4
My avs code is trivial
DirectShowSource("LeoMadridArtistInterview-CastilloC_64kb.mp4", fps=15)
where that file is the downloaded mp4.
First, if I try to play it without the fps parameter, it gives me the error that it can't determine the framerate and that this needs to be called explicity with the fps= parameter.
I guessed it was 15 fps (becasue 29.97 was too fast), but I don't know how to tell what it's supposed to be. Regardless of what I choose, I'm not hearing any video when I play the above script.
Thanks for any suggestions! I tried loading the ffmpeg plugin, and the DGDecode plugin, but I feel like I'm stabbing in the dark here.
Tac
tacman1123
18th November 2008, 19:34
Anyone else using Internet Archive (www.archive.org) footage with their avisynth projects? Most of the files are stored in mp4 format, but when I load them with DirectShowSource, I don't hear any audio. One of the mp4's I'm using to test is at http://www.archive.org/download/raleigh_hmd_2006/raleigh_hmd_2006_256kb.mp4, it's only 8Meg, if someone has time, can download it and load it and see if you hear audio?
Here's the script I'm using, it LOOKS like it has audio, but nothing shows up or plays
a=DirectShowSource("c:\avi\ia\marsha_256kb.mp4", fps=30)
note = a.HasAudio() ? "yes" : "no"
a.Subtitle(note).ConvertToYV12().Histogram("audiolevels")
Many thanks,
Tac
Leak
18th November 2008, 20:30
I can hear the audio just fine, both in MPC-HC as well as in VirtualDub when opened via AviSynth and DirectShowSource()...
Are you sure you have an AAC directshow decoder (like ffdshow) installed? DirectShowSource won't report an error if it can't decode the audio, but will simply report "Has audio: NO" instead...
np: Duo505 - Facing It (Late)
tacman1123
18th November 2008, 21:19
It's reporting HasAudio() as YES, I've confirmed that in .Info() as well.
You can hear the audio when running the avisynth script I posted? I haven't used VirtualDub, but even in AvsP (which opens Classic Media Player) I'm seeing the problem. Or rather, not hearing it.
Actually, though, in fact I am seeing it, because the AudioLevel histrogram isn't showing any activity either.
I just installed ffdshow, no difference.
Any other suggestions on where to look?
Thx,
Tac
Keiyakusha
18th November 2008, 21:47
ffdshow used for audio & video decoding, svn 2235
haali splitter used for mp4 splitting, lastest ver.
1st sample: with yours simple script works fine with or without "fps" parameter but without it assumes 25 fps when it should be 14.98
2nd sample: it works and also assumes 25 fps when it should be 29.97. Your second posted script works fine.
Yes, I can hear audio in both cases.
Try to update ffdshow/haali maybe?
tacman1123
18th November 2008, 23:20
Okay, upgraded both and now I can hear audio! Thanks very much, this is great.
May I ask your assistance on another audio problem that's been plaguing me? It's about 9 meg, and can be found at
http://videothoughts.com/fromtape.avi
If I play it in WMP, works fine. Load it in Avisynth with either DirectShowSource or AviSource, and I get no audio. However, with DirectShowSource, it does return true for HasAudio(), I just don't get any sound.
Incidently, it also has a different framerate when loaded with AviSource v. DirectShowSource().
b=AviSource("c:\usr\sites\vidgrab\fromtape.avi", audio=true)
a=DirectShowSource("c:\usr\sites\vidgrab\fromtape.avi")
# a+b won't work, gives a framerate error have to add ConvertFPS(b.Framerate)
Thanks!
Tac
PS I've uploaded fromtape.zip, which contains fromtape.log, created with
DirectShowSource("fromtape.avi", logfile="fromtape.log")
Keiyakusha
19th November 2008, 00:22
Well, with "fromtape.avi" I have the same behaviour but I think the problem is in file.
Simple remuxing (direct stream copy) in VirtualDub solves the problem for me.
UPD: Btw mkmerge don't see any audio at all, so +1 to badly muxed avi.
Gavino
19th November 2008, 02:05
There's definitely somthing odd about the file.
VLC won't load it at all ("invalid format"), yet WMP plays it OK.
DirectShowSource gives frame rate as 1000000/333667 (29.97 fps), while AviSource gives the standard 30000/1001 (still 29.97 though).
DirectShowSource shows audio sample rate as 32KHz, while VirtualDub says 48KHz. AviSource gives no audio, but that's to be expected because it's a type 1 DV file (as shown by GSpot) and AviSource does not support audio for them.
This looks similar to problems I have encountered when capturing a DV stream containing mixed 32KHz and 48KHz audio.
What did you use for your capture?
tacman1123
19th November 2008, 05:06
I'm using vidgrab (www.datastead.com). I've forwarded these to messages to the developer, hopefully that'll give him some specifics for finding the problem. Thanks very much, I'm sure with these details it'll be much easier for him to track down (I've also encouraged him to join this thread).
Tac
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.