Can I Force Vlc to Use a Specific Codec?

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.
zensunni
New Cone
New Cone
Posts: 6
Joined: 08 Dec 2006 09:26

Can I Force Vlc to Use a Specific Codec?

Postby zensunni » 29 Dec 2007 06:11

First of all, I'm going to list a few assumptions of mine, just to make sure I'm on the right track:

I'm assuming that VLC player only uses internal codecs. IE, if you install a codec on your system, VLC won't notice.
On the other hand, windows media player will check the registry for codecs.

If the previous is correct, is there any way to make VLC player use exterior codecs? Any command line options? If not, how hard would it be to change the source to do differently?

Basically, the problem is using Xvid videos using the DX50 codec. However, the problem doesn't just end there. There are always new codecs coming out and I would like to be able to update VLC to play the new stuff.

Thanks for any insights and info.

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

Re: Can I Force Vlc to Use a Specific Codec?

Postby VLC_help » 29 Dec 2007 21:11

You are correct (so VLC only uses it own codecs). VLC can use Windows Media Codecs with DMO switch, but it doesn't matter to divx or xvid playback. So updating VLC is only way keep VLC's codecs up to date. MPEG-4 ASP and SP decoding support hasn't changed for long time so what kind of problems you have with those files?

zensunni
New Cone
New Cone
Posts: 6
Joined: 08 Dec 2006 09:26

Re: Can I Force Vlc to Use a Specific Codec?

Postby zensunni » 29 Dec 2007 22:17

MPEG-4 ASP and SP decoding support hasn't changed for long time so what kind of problems you have with those files?
The file plays, but there's an inch thick, flashing vertical green stripe through the left side of the video.

The file I'm trying to use is an AVI v1.0 encapsulated file which uses the XD50 Codec from XviD 1.0.3. Would it work if the encapsulation was MPEG-4, or is the codec just too new?

Also, I've listed "DMO" in the preferences, under "Preferred decoders list" and nothing seems to change. I've even used "--codec dmo" in the command line, but nothing seems to work. Do I have to install this first? I've looked at a few help files, and I've only seen an article on compiling a dmo vlc for linux:
http://clement.stenac.org/projects/videolan/dmo.html

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

Re: Can I Force Vlc to Use a Specific Codec?

Postby VLC_help » 31 Dec 2007 17:02

dmo switch only affects Windows Media Videos. Have you tried to change output module or have you tried nightly builds?
Image
http://nightlies.videolan.org/

thirdeyejosh
New Cone
New Cone
Posts: 3
Joined: 13 May 2008 19:16

Re: Can I Force Vlc to Use a Specific Codec?

Postby thirdeyejosh » 13 May 2008 19:44

I have a related problem where I am streaming a MPEG4 elementary stream over udp without rtp. The stream usually plays fine and is recognized as a DivX stream. VLC uses ffmpeg to decode it and everything is good. However, often when I start reading the stream, VLC decides that it is an mp3 and says it has an unrecognized format. My stream has no audio - it is a MPEG4 elementary stream with NO elementary audio stream muxed in.

error:
Unrecognized format for 'udp://@225.0.0.127'

messages:
...
main debug: looking for demux2 module: 45 candidates
ts warning: TS module discarded (lost sync)
ffmpeg debug: detected format: mp3
ffmpeg error: av_find_stream_info failed
ps error: cannot peek
vobsub debug: could not read vobsub IDX file
main error: no suitable demux module for `udp/://@225.0.0.127'

I have tried forcing it to use divx using the command line but I get the same messages and errors.

I have tried:
vlc -vvv udp://@225.0.0.127:1234 --codec divx

and also with [--vout ffmpeg] (but it already is using ffmpeg - just thinks it is an mp3 that it cannot read)

Is there a way that I can force VLC to use the DivX codec? (or any other codec for that matter)

To clarify because of the last post, I am not trying to use an external codec but only force VLC to use the internal DivX codec that it chooses to use sometimes and plays the video fine. Other times it parses the header incorrectly or something and does not choose DivX and therefore cannot play the file.

If I start VLC playing and then start the streaming to it - VLC almost always plays it fine. I think this is because it has a header right away and recognizes it versus parsing up to frame of data and somehow finding a "header" in it. I want to be able to start my player while the stream is already going. This way the stream can go to multiple sources without having to start all clients before the server.

Thank you in advance,
Josh

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

Re: Can I Force Vlc to Use a Specific Codec?

Postby VLC_help » 14 May 2008 15:01

Instead of elementary stream could try MP4 or MPEG-TS as output?

thirdeyejosh
New Cone
New Cone
Posts: 3
Joined: 13 May 2008 19:16

Re: Can I Force Vlc to Use a Specific Codec?

Postby thirdeyejosh » 14 May 2008 21:06

I am using a hardware encoder/ video server - MPEG 4 ES is what I get out of the hardware. It sends it out over UDP, and I am receiving it in VLC to play it in "real time". I have no choice for the format.

Does your answer imply that there is no way to force VLC to use a specific codec?

As long as I start VLC before I start the server it is no problem, but this is a pain - especially if I want to multicast.

It seems to me that if it decides it is an MP3 and then says that it has an unknown format, it would try to detect a different format instead of insisting that it is an MP3 and has an unknown format. If it continued to look for the correct format instead of sticking with MP3, I think it would find Divx and play it fine. Unfortunately it will be a few years before I contribute to the VLC or FFMPEG communities.

Thank you,
Josh


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 56 guests