Bad demuxer chosen and can not force it

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
cbouleau
Blank Cone
Blank Cone
Posts: 10
Joined: 08 Mar 2008 18:49

Bad demuxer chosen and can not force it

Postby cbouleau » 14 May 2008 09:20

Hello,

I wrote an ffmpeg demuxer used to read specific video files containing raw MPEG4.

1) I linked it with VLC (I am building a video player using libvlc (0.8.6c) under Windows XP), and it works fine except sometimes when a bad demuxer is chosen (my probe function seems not to be called).
It seems to happen more frequently with large files (too long time to open ?), but it is not really reproducible.

2) So I try to force the choice of my demuxer using the "/my_demux://URL" as parameter for the "libvlc_playlist_add" function.
It does not work : in the vlc-log file, I can see a message saying that the "my_demux" demuxer can not be found.
That is what I do not understand : this same "my_demux" is properly loaded and chosen with the classical "probe" process (except sometimes, see above). So what !? :-((

Any idea (for the first and/or second problem) ?

Thanks in advance,
Chris. B.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Bad demuxer chosen and can not force it

Postby Jean-Baptiste Kempf » 14 May 2008 19:03

Give us the logs!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

cbouleau
Blank Cone
Blank Cone
Posts: 10
Joined: 08 Mar 2008 18:49

Re: Bad demuxer chosen and can not force it

Postby cbouleau » 18 May 2008 22:41

OK, this is the logs :

First case : no demuxer is forced ==> "my_demux" is found and chosen

Code: Select all

-- logger module started -- main debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU ... main debug: adding playlist item `D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' ( D:/users/CBo/videos_20080130_disk0\VIDEO0004.00 ) main debug: adding playlist item `D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' ( D:/users/CBo/videos_20080130_disk0\VIDEO0004.01 ) main debug: creating statistics handler main debug: creating new input thread main debug: waiting for thread completion main debug: thread 1216 (input) created at priority 1 (/cygdrive/d/applis/vlc-0.8.6c/src/input/input.c:265) main debug: drive letter D: found in source main debug: `D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' gives access `' demux `' path `D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: creating demux: access='' demux='' path='D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: looking for access_demux module: 0 candidates main warning: no access_demux module matched "any" main debug: creating access '' path='D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: looking for access2 module: 2 candidates access_file debug: opening file `D:/users/CBo/videos_20080130_disk0/MEDIA_20080130_disk0\VIDEO0004.00' main debug: using access2 module "access_file" main debug: pre-buffering... main debug: received first data for our buffer main debug: pre-buffering done 1408981 bytes in 0s - 91724 kbytes/s main debug: creating demux: access='' demux='' path='D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: looking for demux2 module: 1 candidate ffmpeg debug: detected format: my_demux main debug: selecting program id=0 ffmpeg debug: adding es: video codec = DIVX ffmpeg debug: AVFormat supported stream ffmpeg debug: - format = my_demux (raw MPEG4 video format) ffmpeg debug: - start time = -1 ffmpeg debug: - duration = -1 main debug: using demux2 module "ffmpeg" main error: option sub-delay does not exist main debug: looking for a subtitle file in D:/users/CBo/videos_20080130_disk0/ main debug: looking for decoder module: 1 candidate ffmpeg debug: libavcodec initialized (interface 3353600 ) ffmpeg debug: postprocessing disabled ffmpeg debug: using direct rendering ffmpeg debug: ffmpeg codec (MPEG-4 Video) started ...
Second case : the "my_demux" demuxer is forced ==> VLC can not find it !

Code: Select all

-- logger module started -- main debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU ... main debug: adding playlist item `/my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' ( /my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.00 ) main debug: adding playlist item `/my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' ( /my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.01 ) main debug: creating statistics handler main debug: creating new input thread main debug: waiting for thread completion main debug: thread 1216 (input) created at priority 1 (/cygdrive/d/applis/vlc-0.8.6c/src/input/input.c:265) main debug: `/my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' gives access `' demux `my_demux' path `D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: creating access '' path='D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: looking for access2 module: 2 candidates access_file debug: opening file `D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: using access2 module "access_file" main debug: pre-buffering... main debug: received first data for our buffer main debug: pre-buffering done 1408981 bytes in 0s - 1375958007 kbytes/s main debug: creating demux: access='' demux='my_demux' path='D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: looking for demux2 module: 0 candidates main error: no demux2 module matched "my_demux" main error: no suitable demux module for `/my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.00' main debug: removing module "access_file" main debug: thread times: real 0m0.109375s, kernel 0m0.000000s, user 0m0.000000s main debug: thread 1216 joined (/cygdrive/d/applis/vlc-0.8.6c/src/input/input.c:412) main debug: creating new input thread main debug: waiting for thread completion main debug: thread 1216 (input) created at priority 1 (/cygdrive/d/applis/vlc-0.8.6c/src/input/input.c:265) main debug: `/my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' gives access `' demux `my_demux' path `D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' main debug: creating access '' path='D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' main debug: looking for access2 module: 2 candidates access_file debug: opening file `D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' main debug: using access2 module "access_file" main debug: pre-buffering... main debug: received first data for our buffer main debug: pre-buffering done 1408981 bytes in 0s - 1375958007 kbytes/s main debug: creating demux: access='' demux='my_demux' path='D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' main debug: looking for demux2 module: 0 candidates main error: no demux2 module matched "my_demux" main error: no suitable demux module for `/my_demux://D:/users/CBo/videos_20080130_disk0\VIDEO0004.01' main debug: removing module "access_file" main debug: thread times: real 0m0.109375s, kernel 0m0.000000s, user 0m0.000000s main debug: thread 1216 joined (/cygdrive/d/applis/vlc-0.8.6c/src/input/input.c:412) main: nothing to play
Strange, no ? :!:

CB

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Bad demuxer chosen and can not force it

Postby Jean-Baptiste Kempf » 20 May 2008 16:31

Did you reset your plugin cache ?

Does vlc -vvv --list show your plugin?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

cbouleau
Blank Cone
Blank Cone
Posts: 10
Joined: 08 Mar 2008 18:49

Re: Bad demuxer chosen and can not force it

Postby cbouleau » 21 May 2008 15:19

Hello,

As I said before, my demuxer is an"ffmpeg" demuxer.
It seems that VLC accepts "ffmpeg" as name of demuxer (so path can be "/ffmpeg://URL") but do not knows/accepts demuxers of the "ffmpeg family".
In fact, we should use something like "/ffmpeg/my_ffmpeg_demuxer://URL" as syntax, but it is not possible :(

This is my conclusion, for the moment.

CB

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Bad demuxer chosen and can not force it

Postby Jean-Baptiste Kempf » 21 May 2008 20:34

I am sorry, but this doesn't make any sense.

If you made a demuxer plugin for VLC, then you can force it. If not, you cannot.

You seem to have made a FFmpeg modification, but are you sure you did link to the good version ?
If ffplay plays your file as you want, VLC will do the same.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

cbouleau
Blank Cone
Blank Cone
Posts: 10
Joined: 08 Mar 2008 18:49

Re: Bad demuxer chosen and can not force it

Postby cbouleau » 27 May 2008 18:15

Hello,

j-b wrote:
I am sorry, but this doesn't make any sense.
If you made a demuxer plugin for VLC, then you can force it. If not, you cannot.
You seem to have made a FFmpeg modification, but are you sure you did link to the good version ?
If ffplay plays your file as you want, VLC will do the same.
Excuse me, but for me it is not so simple !
FFMPEG contains a set of demuxers, one of them is selected (via "probe" selection process) when a file is loaded.
I wrote and added "my_demuxer" to the ffmpeg "libavformat" library.
I can test it with the "ffplay" program. It works. "my_demuxer" is automaticaly chosen when my specific video files are loaded. In addition, I can force my demuxer with the "-f fmt" option of ffplay (ffplay -f my_demuxer my_video_file.xx).
You seem to have made a FFmpeg modification, but are you sure you did link to the good version ?
Yes, I am. I built the VLC package with the "--with-ffmpeg-tree=/my_ffmpeg_libs" options, and it gave me the libvlc.dll and other modules I needed. It works too.
I show you again a piece of the vlc log:

Code: Select all

main debug: looking for demux2 module: 1 candidate ffmpeg debug: detected format: my_demux main debug: selecting program id=0 ffmpeg debug: adding es: video codec = DIVX ffmpeg debug: AVFormat supported stream ffmpeg debug: - format = my_demux (raw MPEG4 video format) ffmpeg debug: - start time = -1 ffmpeg debug: - duration = -1 main debug: using demux2 module "ffmpeg"
In this case (automatic selection) it works.

Now I think I understand why I can not force VLC to use my ffmpeg demuxer : at VLC level, ffmpeg is seen as one unique demuxer, even if in fact it is a set of possible demuxers (mp3, m4v, aac, ogg, ...). VLC adds the ffmpeg laureate to other candidates (if any) then makes its choice (with its own selection process).

My initial question is "Is it possible to force an ffmpeg demuxer (or "sub-demuxer" if you prefer) with VLC ?"

Chris. B.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Bad demuxer chosen and can not force it

Postby Jean-Baptiste Kempf » 27 May 2008 19:09

No, it isn't possible since VLC ask libavformat to av_probe_input_format() and let it be automatic.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 2 guests