Ok. I am trying with no luck with ffmpeg to get audio to encode. Here's the
problem, as outlined..
I am encoding an 8 minute FLV (flash) video using ffmpeg, in 2-pass.
When I initially ran the the encoding in the first past, when the video
plays, the audio sounds choppy, much like when you watch those old real
to real movies, where the film gets jammed sort of and the audio sound
is choppy. But the audio sounds this way in both passes.., pass 1 and
pass 2.
So, I thought that the problem was the source. So I got hold fo the
original source and played it. Well, the sound is perfect. No trouble
with the source avi file. So, I then took the source and ran it through
virtualdub and created a WAV file. Then, I played it in media player,
and the sound, again, was perfect. No choppyness. Just clean sound.
Now, I'm trying to bring that WAV file into ffmpeg, along with my source
(huffy) video file for encoding. ie:
--> ffmpeg -i VIDEO_IN.AVI -nosound -vcodec flv -s 320x240 -r 29.970 -y VIDEO_OUT.flv c:\AUDIO.WAV -ab 56k -ar 22050 -ac 2
The purpose of the param usage: -nosound just after the VIDEO_IN
source was in hopes that it doesn't use the internal audio of that source.
And, at the end, I add in the WAV, followed by the necessary params to
continue the flv encoding with, using the param: c:\AUDIO.WAV -ab 56k -ar 22050 -ac 1
I guess what I'm really asking, 'how do i MUX this in, but this time, during the
flv encoding stage ?'
-vhelp 4441
+ Reply to Thread
Results 1 to 9 of 9
-
-
Avanti has a template for FLV and allows a separate audio track on source 2. Don't know if it works for you.
https://forum.videohelp.com/topic336318.html -
Thanks Chris K, I appreciate your tool. Actually, I already have a
full fledge gui for ffmpeg (and other's like mencoder, etc) that I use and
update regulary, as my needs or problems dictate. Thanks again.
Ahhh, I figured out part of the problem.. the wav file got reset to a file
size of zero. I guess whatever I was doing, that sometime durign my batter
with various param strings and encoding, it got re-written over, but with
no data. Then, I was using a zero-sizeaudio source to no avail.
But, the problem is still there.
Soopafresh, I don'tk now why the -nosound param doesn't
work in the ffmpeg version I'm using. It error's out with the tipicle error
message, 'bla bla bla.. no such -nosound command' or something like that. That
the version I have is one of their latest ones. Anyway. Actually, the param
string (command) I was looking for, was -an for Audio=no.
At least that's my interpretation of that param
So, as I was saying, the problem is still there. But, this time, with the
-an param, now, the finished FLV is with no sound
even with the following param set up, but now just before the -y c:\OUT.flv
like this:
--> ffmpeg -i VIDEO_IN.AVI -an -vcodec flv -s 320x240 -r 29.970 c:\AUDIO.WAV -ab 56k -ar 22050 -ac 1 -y VIDEO_OUT.flv
I know I must be getting close. I've tried all my *snipped* code snipplets
I got over the many months studying ffmpeg and mencoder. So, its not like I
was doing nothing all this time. Actually, I was gathering all the param
string setup that I could syphen during my search. Anyway, so far, nothing
is working, yet.., though I keep trying.
I think basically, what I could do now, is use the OUT.flv encoded video
as the new source, but this time, only MUX an audio (wav) to it. But, I am
not getting anywhere with this. I must be doing something wrong with the
param setup strings that I've tried so far. By this time, this is really
bugging me.. but i'll keep trying
-vhelp 4443 -
Ok. Muxing is out of the question. (I was trying to get away with just muxing
the audio with the flv video) But, it raises the bitrate of the original flv
video so high, it defeats the purpose. Looks like I have to encode the whole
video using the source and the AUDIO.wav, but this seems to be a tricky part to
setup.
This raised the FLV bitrate so high:
--> ffmpeg -i VIDEO.flv -vcodec copy -i c:\AUDIO.wav -acodec pcm_s16le -ab 56k -ar 22050 -ac 1 -y VIDEO_OUT.flv
Then, I tried this, but this tampers with the flv's video quality aspects and I
see various artifacts in the final image, AND, there is still no audio:
--> ffmpeg -i VIDEO.flv -vcodec copy -i c:\AUDIO.wav -acodec -ab 56k -ar 22050 -ac 1 -y VIDEO_OUT.flv
-vhelp 4444 -
Start off with your AVI again. You can use mp3 for audio. I also get no sound using a wave.
ffmpeg -i VIDEO_IN.AVI -vcodec flv -s 320x240 -r 29.970 -i c:\AUDIO.WAV -acodec libmp3lame -ab 56k -ar 22050 -ac 1 -y VIDEO_OUT.flv -map 0:0 -map 1:0
EDIT: added some input mapping.
Chris. -
Chris K, I'm on my other computer, so I don't see new posts come
in while I work.. not as quickly as I would like. Anyway.
Actually, I think I might have it. Maybe. I was originally going to go with
the re-encoding from the source anyway.
Actually, fwiw, (for future reference with FLV flash videos) I think that its not
a good idea to MUX them about. Not after what I've seen in mine, when I did
perform various muxing scenarios. I mean, it messes up the originally encoded
flv video to some degree.. much like youtube does if you feed it something a little
more than what they want. Anyway. So, it looks like the best route all together,
is to keep with the original source(s) and use that. In other words, the end
result is, one must have to re-encode their entire work. Those are the breaks!
Well, I'm still waiting for my video to encode, while I write this. I hope I
stike some luck, this time around. Thanks for your sugestions.
-vhelp 4445 -
-
Hi guys.
Well, I've sort of figured out what the (original) problem was with the audio
not sounding right. I guess the first frame (audio) got corrupt and the rest
of the audio got 'mangled' during the process.
How I found this out ...
I had a huntch, basically. And, I use ffmpeg's -ss function to
figure it out. I set it to skip just one frame, but incrementing the time in
millisec's, thus.. 0:00:00.011 was enlough to fix the probem, and give me the
audio in completeness.
--> ffmpeg ... -ss 0:00:00.011
Thank you guys for trying to help me solve this problem with your suggestion. And
as much as I solved it on my own, your inputs were much appreciated. Thanks
I'm happy everything all worked well, in the long run. Now, I can finally upload
to youtube that blastid 8 minute video I've been trouble-shooting all this week.
.. !! .. !! .. Happy Thanksgiving eve, you all
-vhelp 4447
Similar Threads
-
Virtual Dub say's No audio decompressor to decompress source audio
By s_joy09 in forum Newbie / General discussionsReplies: 10Last Post: 25th Dec 2011, 14:03 -
Using the DGAVCdec audio delay value when muxing with ffmpeg
By johnnyquid in forum Video ConversionReplies: 2Last Post: 23rd Jul 2011, 09:58 -
Audio out of sync problem with FFMPEG encoding MP4 (h.264,AAC)
By jenak1980 in forum Video ConversionReplies: 7Last Post: 5th May 2010, 01:03 -
ffmpeg choppy audio from large avi but not small avi source file
By cybertheque in forum Capturing and VCRReplies: 9Last Post: 13th Oct 2008, 15:38 -
No audio decompressor could be found to decompress the source audio format.
By rocky12 in forum AudioReplies: 3Last Post: 1st Sep 2008, 00:59