[MEncoder-users] mencoder, ac3 audio and mts conversion to avi
Alex Samad
alex at samad.com.au
Sat May 24 04:10:01 CEST 2008
On Fri, May 23, 2008 at 06:40:47PM -0700, Alex Morris wrote:
> Hello,
>
[snip]
I am newbie at this as well, but I might be able to shed some light
>
> This creates the avi with no sound. Video is nice, very smooth and high
> res. No audio. I find this in the program output;
>
> LAVF_header: av_find_stream_info() failed
> RAWDV file format detected.
^^^ this is saying it found rawdv for video input
> VIDEO: [DVSD] 720x576 24bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
> [V] filefmt:65536 fourcc:0x30323449 size:1920x1080 fps:25.00
> ftime:=0.0400
> ==========================================================================
> Opening audio decoder: [libdv] Raw DV Audio Decoder
^^ here is say it found rawdv audio
These don't seem to corrospond to your earlier assumption of x264.
But I think it is better you have the raw DV stream (I believe
uncompressed images)
> Unknown/missing audio format -> no sound
> ADecoder init failed :(
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> Cannot find codec 'dvaudio' in libavcodec...
> ADecoder init failed :(
> ADecoder init failed :(
> Cannot find codec for audio format 0x56444152.
> Read DOCS/HTML/en/codecs.html!
>
> I don't understand what's happening.
mencoder can't find a audio codec to match the audio codec presented in
the original file, thus it can't re encoded it.
>
> Q: If mplayer identifies the audio sample as ac3, should I be using ac3
> codec in the transcoding process?
> Q2: When I run mencoder -oac help, it lists lavc as present. Why does my
> use of mencoder apparently ignore the lavcopts I chose?
i beleive you have set the outfile parameters
> Q3: What is mencoder's use of lavc telling me when ffmepg cannot find
> dvaudio in libavcodec?
you have set outfile codec not infile
>
> I think this method should work, because I can play the audio-only portion
> of the sample with mplayer, like this;
>
> mplayer -rawaudio format=0x2000:channels=6:bitrate=38400 -demuxer rawaudio
> 00000.mts.ac3
>
> Playing 00000.mts.ac3.
> rawaudio file format detected.
> ==========================================================================
> Opening audio decoder: [liba52] AC3 decoding with liba52
> Using SSE optimized IMDCT transform
> Using MMX optimized resampler
> AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
> Selected audio codec: [a52] afm: liba52 (AC3-liba52)
> ==========================================================================
> AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
> Video: no video
> Starting playback...
> A: 243.8 (04:03.7) of 24.5 (24.4) 0.9%
>
> Exiting... (End of file)
This is the way I have extract sound from file, dumping straight to pcm
and then reworking that back into the final .avi file.
remember avi files are contianers that hold different media streams
(video, audio) and these streams can be encoded with different codec's
>
> I'm confused about the above attempts, but I don't give up. I try a
> different method, more in the line of what Mr Olmos suggested, that is using
> -oac copy.
>
> Just trying -oac copy with no options fails, giving this info;
>
> Audio format 0x56444152 is incompatible with '-oac copy', please try '-oac
> pcm'
> instead or use '-fafmttag' to override it.
>
> I give the option -fafmttag 0x2000 based on success with mplayer. This
> creates an avi file, with audio. Yay! But.. The audio transcode portion
> gave this info during processing;
>
> Forcing output audio format tag to 0x2000.
> audiocodec: framecopy (format=2000 chans=0 rate=0 bits=16 B/s=3600000
> sample-12928)
> Warning, len isn't divisible by samplesize!
>
> And at the very end of the process, I think during x264 processing, I get
> segfault.
>
> Video stream: 12760.488 kbit/s (1595060 B/s) size: 46835291 bytes 29.363
> secs 736 frames
>
> Audio stream: 28835.243 kbit/s (3604405 B/s) size: 1152000 bytes 0.320
> secs
> x264 [info]: slice I:5 Avg QP:16.00 size:163282
> x264 [info]: slice P:730 Avg QP:18.35 size: 63039
> x264 [info]: mb I I16..4: 63.0% 0.0% 37.0%
> x264 [info]: mb P I16..4: 33.1% 0.0% 4.6% P16..4: 27.2% 11.6% 3.2%
> 0.0% 0.0% skip:20.4%
> x264 [info]: final ratefactor: 17.70
> x264 [info]: kb/s:15277.6
> Segmentation fault
>
> This does create an avi file, with audio. But the video is now choppy, the
> zoom-in is not as smooth, and the sound ends before the end of the video.
>
> Q: Why did x264 segfault?
> Q2: Why did video get choppy once audio was added? Is it load on the PC, or
> a factor of blending the two data streams, and I did not set options
> correctly?
> Q3: What is meant by len not divisible by samplesize? Does it mean length
> of the audio sample? Is the samplesize reported a negative number? Does
> this have anything to do with segfault?
> Q4: Why is # of channel seen as 0, and not 6 (for Dolby 5.1)?
>
> I understand there could be many things affecting the choppy video. Not so
> worried about it right now, because I made progress and have avi with
> picture and sound. I also understand that I can control - to a degree - how
> much the audio slips time in relation to the video. Will approach that
> 'later' after I have more understanding of all these fundamental (to me)
> questions.
>
> Sorry for the long post, and ignorance. Any comments or suggestions are
> warmly appreciated. Reading man pages and mailing lists, not giving up !
> Thank you.
>
> ax
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
--
"I want to thank the astronauts who are with us, the courageous spacial entrepreneurs who set such a wonderful example for the young of our country."
- George W. Bush
01/14/2004
Washington, DC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20080524/f5bb0fd0/attachment.pgp>
More information about the MEncoder-users
mailing list