Transcoding to MP4 - No Audio

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
ShadoKat
New Cone
New Cone
Posts: 7
Joined: 14 Jun 2007 13:32

Transcoding to MP4 - No Audio

Postby ShadoKat » 15 Jun 2007 05:33

Please forgive my n00bness... I have searched the forums, Googled every search term I can think of, and am basically stuck. I'm trying to transcode my videos to MP4, but I am unable to get any sound using mp4a. Unfortunately, my devices only recognize video encoded with the mp4v/mp4a combination in an mp4 container.

This is my string...

Code: Select all

:sout=#transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mp4a,ab=192,channels=2}:duplicate{dst=std{access=file,mux=mp4,dst="NewVideo.mp4"}}
This is my output...

Code: Select all

ffmpeg error: cannot open encoder stream_out_transcode error: cannot find encoder ((null)) stream_out_transcode error: cannot create audio chain main error: cannot create packetizer output (s16l)

I ran across one solution that said to add "audio-sync" to the end of the audio section of the string, and that DID work for mpga and mp3, but still nothing for mp4a (which, unfortunately, I am stuck having to use - You know what they say, "sometimes progress is a different error message.").

One possible solution I read said something about "compiling ffmpeg with FAAC support" but I have no idea what this means or how to do this. It seems to be a Linux thing, but if there are some instructions on how to do this with Windows, please point me in the right direction, because I can't find them.

Thanks in advance.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 15 Jun 2007 08:32

What is the source?

ShadoKat
New Cone
New Cone
Posts: 7
Joined: 14 Jun 2007 13:32

Postby ShadoKat » 15 Jun 2007 16:21

It doesn't seem to matter. I've tried it with a variety of video files, as well as DVD's, and they all have the same problem. Transcoding works BEAUTIFULLY with anything else most of the time (one of my favorite aspects of VLC), as long as I select the right combination of containers and codecs. I would expect mp4a and mp4v to work together in mp4 container (or even mov container), but they don't. I do get sound with mp4v and mpga or mp3, but my devices don't recognize the files unless they use mp4a.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 15 Jun 2007 19:45

I tried this just a few moments ago with VLC 0.8.6b and I don't experience an issue.

Here is my command line:

:sout=#transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mp4a,ab=192,channels=2}:duplicate{dst=std{access=file,mux=mp4,dst="C:\Documents and Settings\Owner (this is you)\My Documents\My Videos\Test.mp4"}}

A DVD running in dvdsimple mode was the source. The file played normally in QuickTime, Under Direct Show and VLC.

ShadoKat
New Cone
New Cone
Posts: 7
Joined: 14 Jun 2007 13:32

Postby ShadoKat » 16 Jun 2007 03:53

Except for the fact that you used the full user path (I omitted mine for brevity) you used the exact same command that I did. I am also using a clean install of 0.8.6b and I also tried 0.8.6c on a separate Vista machine with the same results.

Judging by the output message, I'm pretty sure it has something to do with the mp4a encoding. Is there a separate drop-in package that I could use to get the encoder? Do I need to install a codec pack like K-Lite?

Thanks for all your help, I really appreciate it.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 16 Jun 2007 08:25

VLC is NOT a Direct Show player and doesn't use Codec packs. :roll:

ShadoKat
New Cone
New Cone
Posts: 7
Joined: 14 Jun 2007 13:32

Postby ShadoKat » 16 Jun 2007 09:54

What, then, might I be missing? Obviously it would be something you have that I don't (such as specific knowledge - you must admit, this stuff is a bit esoteric). Why would the message box tell me it can't open an encoder and create an audio chain?

ShadoKat
New Cone
New Cone
Posts: 7
Joined: 14 Jun 2007 13:32

Postby ShadoKat » 16 Jun 2007 22:21

Oddly enough, I was able to get it working on another machine. I don't know what may be wrong with this one, but I'm happy enough to just get my files working on my devices. Yay, VLC rawks again!

ShadoKat
New Cone
New Cone
Posts: 7
Joined: 14 Jun 2007 13:32

Postby ShadoKat » 24 Jun 2007 21:48

Sorry to dredge this up again, but the machine that it works on is having (unrelated) issues, and I need to offload the transcoding duties to another machine... which means trying to get it working again.

I don't know if this helps, but the machine it works on uses Windows XP Home, AMD Athlon, and is a desktop (NVidia MX4400 video, SBAudigy sound).

The machines on which it doesn't work are both centrino based laptops, one uses Windows XP Professional, the other uses Windows Vista. One has integrated Intel video, the other ATI X1400, both use SigmaTel audio. Both give me the exact same messages...

ffmpeg error: cannot open encoder
stream_out_transcode error: cannot find encoder ((null))
stream_out_transcode error: cannot create audio chain
main error: cannot create packetizer output (s16l)

Could it be my sound hardware? I don't see how that would affect transcoding, but I'm willing to entertain anything at this point.

funman
Developer
Developer
Posts: 1159
Joined: 03 Sep 2006 04:03
VLC version: master
Operating System: All of them
Location: Lost, please help me

Re: Transcoding to MP4 - No Audio

Postby funman » 25 Jun 2007 01:03

the sound hardware has nothing to do when you transcode

do you run vlc with maximum debug output ? (debug level 3)

ShadoKat
New Cone
New Cone
Posts: 7
Joined: 14 Jun 2007 13:32

Re: Transcoding to MP4 - No Audio

Postby ShadoKat » 25 Jun 2007 05:00

Umm.... I don't think so. Does this increase the verbosity of the messages? Where is this set?

Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

Re: Transcoding to MP4 - No Audio

Postby Steerpike » 13 Jan 2009 20:14

I'm having the same problem as the original poster of this thread, which I found through extensive searching, so I presume it is better to post as a continuation of this thread.

Windows vista business; VLC 0.9.8a.
Source - several (quicktime movie from a Panasonic Lumix camera, avi movie from a canon camera, at least - all fail similarly).
Command string:

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc" P1000098.mov :sout=#transcode{vcodec=mp4v,vb=1024,acodec=mp4a,ab=128,channels=2}:duplicate{dst=std{access=file,mux=mp4,dst="p1000098-MP4-test.mp4"}}
I immediately get an error: "Streaming/Transcoding failed: VLC could not open the encoder". Transcoding continues in the background, and the resulting file plays, but without audio.

With message verbosity=1, I see:

Code: Select all

mp4 warning: unknown box type alis (incompletely loaded) mp4 warning: unknown box type alis (incompletely loaded) mp4 warning: DEMUX_GET_FPS unimplemented !! mp4 warning: DEMUX_GET_FPS unimplemented !! avcodec warning: libfaac doesn't support this output format! (libfaac@06E62560) avcodec error: cannot open encoder stream_out_transcode error: cannot find audio encoder (module:any fourcc:mp4a) stream_out_transcode error: cannot create audio chain main error: cannot create packetizer output (s16b) avcodec warning: invalid id 255 (mjpeg@06E61AD0) avcodec warning: cannot decode one frame (422 bytes)
And with verbosity set to '2', the relevant part seems to be:

Code: Select all

main debug: adding a new sout input (sout_input:0722CF80) stream_out_transcode debug: creating audio transcoding from fcc=`s16b' to fcc=`mp4a' main debug: looking for decoder module: 34 candidates araw debug: samplerate:16000Hz channels:1 bits/sample:16 main debug: using decoder module "araw" main debug: TIMER module_Need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms) main debug: looking for encoder module: 11 candidates avcodec debug: libavcodec already initialized avcodec warning: libfaac doesn't support this output format! (libfaac@06E628F0) avcodec error: cannot open encoder main debug: TIMER module_Need() : 51.000 ms - Total 51.000 ms / 1 intvls (Avg 51.000 ms) stream_out_transcode error: cannot find audio encoder (module:any fourcc:mp4a) main debug: removing module "araw" stream_out_transcode error: cannot create audio chain main error: cannot create packetizer output (s16b) main debug: control type=1 qt4 debug: Destroy the Interaction Dialog qt4 debug: Hide the Interaction Dialog avcodec warning: invalid id 255 (mjpeg@06E621E0) avcodec warning: cannot decode one frame (422 bytes)
Since the original poster reported success on another machine, I installed same VLC version on an older winXP Pro machine; same problem. I then uninstalled that version, and reverted to an old version I used before - 0.8.6d; with this version, in the messages window I see a variation on what I posted above; the line above
"stream_out_transcode error: cannot find audio encoder (module:any fourcc:mp4a)"
shows
"stream_out_transcode error: cannot find encoder ((null))"
with the older version.

I see several other posters having this problem. The most common solution seems to be a recommendation to compile ffmpeg with faac support, but that does not seem to be relevant to the windows build.

Thanks for any help you can give!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Transcoding to MP4 - No Audio

Postby VLC_help » 14 Jan 2009 18:14

avcodec warning: libfaac doesn't support this output format!
You have to resample the audio, because sample rate of the original audio bizarre one.

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc" P1000098.mov :sout=#transcode{vcodec=mp4v,vb=1024,acodec=mp4a,ab=128,channels=2,samplerate=44100}:duplicate{dst=std{access=file,mux=mp4,dst="p1000098-MP4-test.mp4"}}

Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

Re: Transcoding to MP4 - No Audio

Postby Steerpike » 15 Jan 2009 08:19

MUCH closer ... ! I inserted the 'samplerate=44100" value as you suggested, and now, no errors. However, the Audio does not play when I play the output file in VLC. But if I move the position slider back and forth quickly (moving forward/backwards quickly in the movie) I CAN hear bits of the audio ... so I know it's there ...

When I play the original video in VLC, it has the following audio characteristics ('codec info'):
codec: twos; ... channels: 1; ... sample rate: 16000; bits per sample: 16; bitrate: 256 kb/s.

So rather than a samplerate of 44100, I tried 48000 (same behavior - no error, but no audio play unless I move the slider back/forth); 16000 (error as initially reported); 24000 (no error, but audio plays high pitch/choppy); 32000 (no error, no audio unless I move position slider back/forth).

So of all the ones I tried, 24000 is the 'best' - and terrible.

I am able to convert the movie using another program (mediacoder) to video=mp4v, audio=mp4a. The converted video, when played successfully in VLC, has the following audio codec info ...
codec: mp4a; ... channels: 2; ... sample rate: 32000; bits per sample: 16; bitrate: 512kb/s.

A friend also converted the movie using 'toast' to video=avc1 (h.264), audio = mp4a. The converted video, when played successfully in VLC, has the following audio codec info ...
codec: mp4a; ... channels: 2; ... sample rate: 48000; bits per sample: 16; bitrate: 1536 kb/s.

THANKS for your help so far!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Transcoding to MP4 - No Audio

Postby VLC_help » 15 Jan 2009 17:43

If you use QuickTime for playback, it is a known issue. For some reason QuickTime doesn't like faac encoded audio that VLC creates.

Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

Re: Transcoding to MP4 - No Audio

Postby Steerpike » 15 Jan 2009 20:14

Actually, I'm using VLC to play back what it just created! I just tried QT, and it behaved 'the same'; that is, no audio, but if I move the position slider around, I hear bursts of off-key audio for a split second.

So -
I can use VLC to play the original movie
I can use VLC to transcode to wmv no problem (result plays in VLC and Windows Media Player)
I can use mediaCoder to transcode to h.264/mp4a and mp4v/mp4a no problem (result plays in VLC and QT)
I can use toast to transcode to h.264/mp4a no problem (result plays in VLC and QT)
When using VLC to transcode to mp4v/mp4a, choosing different samplerate values has the results described.

Is there something I can do in VLC with the original media to change ONLY it's sample rate, to make it more compatible, THEN try the transcode? Or perhaps convert the audio from its native format to something more compatible? As mentioned above,
When I play the original video in VLC, it has the following audio characteristics ('codec info'):
codec: twos; ... channels: 1; ... sample rate: 16000; bits per sample: 16; bitrate: 256 kb/s

Thanks!

Edit/Update ...
This REALLY does not make sense to me ... please tell me what is going on ... ) !

above, I' was initially using the following command line:

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc" P1000098.MOV --extraintf=logger --verbose=3 :sout=#transcode{vcodec=mp4v,vb=1024,scale=0.25,acodec=mp4a,ab=128,channels=2}:duplicate{dst=std{access=file,mux=mp4,dst="p1000098-MP4-test.mp4"}}
then, at your suggestion, I added various 'samplerate' values and got weird (but slightly better) results. Finally, for no particular reason, I completely removed any 'qualifiers' from the audio spec - just left acodec=mp4a. That is, I removed the ab=128, channels=2, samplerate= ... . The darned thing transcoded (and played in VLC) just fine !!!

Looking at the resulting output file, in VLC, 'codec info' shows:
Codec: mp4a; ... Channels:2; sample rate 32000; bits per sample 16; Bitrate 256kb/s, AND, 'AAC extension: SBR'

So right off the bat, I can get a good transcode as long as I don't try to specify the bitrate, samplerate, etc.

So I tried using those settings in the audio section, to see if it would accept them. I tried

Code: Select all

acodec=mp4a,ab=256,channels=2,samplerate=32000
But I got the error shown way up above -

Code: Select all

[00000477] avcodec encoder warning: libfaac doesn't support this output format! (libfaac@0181CA40) [00000477] avcodec encoder error: cannot open encoder [00000403] stream_out_transcode stream out error: cannot find audio encoder (mod ule:any fourcc:mp4a)
You'd think, if the OUTPUT produced with no qualifiers had a certain audio characteristic, then explicitly setting those characteristics would be essentially the same thing ... but of course it is not!

Does this make sense to anyone? Thanks!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Transcoding to MP4 - No Audio

Postby VLC_help » 16 Jan 2009 18:26

Thanks for the info. Could you share us sample file that shows this issue?

Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

Re: Transcoding to MP4 - No Audio

Postby Steerpike » 16 Jan 2009 23:19

Sure thing - I can upload it to wherever you want, or I can host it myself and provide you the ftp credentials (privately). Just let me know.

I'm currently working with a 100Meg file; I'll find a smaller sample that replicates the same issues.

Thanks!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Transcoding to MP4 - No Audio

Postby VLC_help » 17 Jan 2009 17:05

If you can, some place where everybody can access it so when I open trac ticket, bug fixer(s) could access it also.

Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

Re: Transcoding to MP4 - No Audio

Postby Steerpike » 18 Jan 2009 07:02

OK, I posted a short sample that I tested, and a bat file that I used to transcode it.
File - P1000100.MOV ;
bat file - P1000100-MP4-test.bat

to download, go to ftp://ftp.sequoiahills.com, and login as videolan; password Vide0Lan (V, ide, 0, L, an)

Please let me know when you've downloaded it and I'll shut off the ftp account.

The details (to recap) -
1) the file transcodes fine using 'MediaCoder' and 'toast', and the result plays fine on the iPhone
2) the file transcodes using VLC if I only use "acodec=mp4a,channels=2", but won't play on the iPhone
3) the file transcodes with an audio error if I use ab=128; but if I use ab=64 it will transcode (various other values have similar effects) - still won't play on iPhone
4) Using various 'samplerate' value makes the audio sound bad - at 41000, the audio only plays if I mess with the position slider. Other values are not great.

Thanks!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Transcoding to MP4 - No Audio

Postby VLC_help » 18 Jan 2009 18:01

I have downloaded the files now. The audio is mono one which might give more clues to issues. Trac opened
http://trac.videolan.org/vlc/ticket/2414

Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

Re: Transcoding to MP4 - No Audio

Postby Steerpike » 19 Jan 2009 22:35

Thanks. I took a look at the ticket and everything written there is true. It may be worth adding that specifying various combinations of ab and samplerate will cause the avcodec encoder warning to go away - so it's not the 'presence' of the ab= parameter, but rather the specific values. But regardless of which values are used, even when the avcodec encoder message is NOT present (and audio is present in the output) the result is somehow incompatible with the iPhone. Transcoding the same source with other programs results in media that is compatible with the iPhone.

Thanks!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 48 guests