Audio cuts out after "EOF reached" message

This forum is about all development around libVLC.
mikealeonetti
New Cone
New Cone
Posts: 6
Joined: 06 Mar 2019 17:08

Audio cuts out after "EOF reached" message

Postby mikealeonetti » 06 Mar 2019 17:55

Been really going crazy on this issue. Would appreciate ANY suggestions.

I'm using libvlc with libvlc_media_new_callbacks. I have it using a buffer that gets written to in real time. The video plays no problem but the last second or few seconds of audio get cut off at the end. The video plays just fine with audio throughout. However, the last few seconds or so the audio just goes quiet. The following appears in the logs just when the audio gets cut off:

Code: Select all

2019-03-06, 11:18:29.626200: <debug> (0x00000404) [VLC] EOF reached 2019-03-06, 11:18:29.875200: <debug> (0x00000404) [VLC] waiting decoder fifos to empty
HOWEVER! I've created a minimal example using basically the same principal in the same dev environment and the minimal example WORKS and the audio does NOT cut off.

I've also tried to write an output file with the same data that VLC is reading from my buffer to see if maybe the video file is cutting off the end or the buffer corrupted. However, the test result video file written from the buffer matches the file being sent exactly. So it's not the buffer causing this issue.

I'm pretty stumped.

Windows 7 MSYS2 environment here is the VLC info

Code: Select all

2019-03-06, 10:47:24.611200: <debug> (0x000000e0) [VLC] VLC media player - 3.0.6 Vetinari 2019-03-06, 10:47:24.612200: <debug> (0x000000e0) [VLC] Copyright ▒ 1996-2018 the VideoLAN team 2019-03-06, 10:47:24.612200: <debug> (0x000000e0) [VLC] revision 3.0.6-0-g5803e85f73 2019-03-06, 10:47:24.612200: <debug> (0x000000e0) [VLC] configured with /scripts/mingw-w64-vlc/src/vlc-3.0.6/configure '--prefix=/mingw32' '--sysconfdir=/mingw32/etc' '--build=i686-w64-mingw32' '--host=i686-w64-mingw32' '--target=i686-w64-mingw32' '--enable-qt' '--disable-ncurses' '--disable-dbus' '--disable-telx' '--enable-nls' '--disable-lua' '--disable-gst-decode' 'build_alias=i686-w64-mingw32' 'host_alias=i686-w64-mingw32' 'target_alias=i686-w64-mingw32' 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe' 'LDFLAGS=-pipe' 'CPPFLAGS=-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -IC:/building/msys64/mingw32/include/QtGui/5.12.0/QtGui' 'CXXFLAGS=-march=i686 -mtune=generic -O2 -pipe' 'BUILDCC=/mingw32/bin/gcc' 'PKG_CONFIG_PATH=/mingw32/lib/pkgconfig:/mingw32/share/pkgconfig'

This is the code in full. Excuse all of the debug logging stuff. I've been going crazy trying to find out what's wrong:
https://pastebin.com/vhzR6vV0

Here is the minimal example I've created that works:
https://pastebin.com/fFr6XUHP

mikealeonetti
New Cone
New Cone
Posts: 6
Joined: 06 Mar 2019 17:08

Re: Audio cuts out after "EOF reached" message

Postby mikealeonetti » 08 Mar 2019 17:06

I broke down and tried with libvlc_media_new_path and that does NOT cut out after 3 seconds. Here is the code https://pastebin.com/SwVpi5bJ

Then what could be wrong with the callbacks? The documentation suggests that it may have multiple calls to open_cb but it only says that if I use multiple players with the same buffer. But could that be my problem?

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: Audio cuts out after "EOF reached" message

Postby Jean-Baptiste Kempf » 10 Mar 2019 11:51

I broke down and tried with libvlc_media_new_path and that does NOT cut out after 3 seconds. Here is the code https://pastebin.com/SwVpi5bJ

Then what could be wrong with the callbacks? The documentation suggests that it may have multiple calls to open_cb but it only says that if I use multiple players with the same buffer. But could that be my problem?
What OS are you on?
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.

mikealeonetti
New Cone
New Cone
Posts: 6
Joined: 06 Mar 2019 17:08

Re: Audio cuts out after "EOF reached" message

Postby mikealeonetti » 10 Mar 2019 18:08

Windows 7 Home 64-bit latest updates

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: Audio cuts out after "EOF reached" message

Postby Jean-Baptiste Kempf » 10 Mar 2019 18:49

Are you using DirectSound for the audio (check the messages)?
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.

mikealeonetti
New Cone
New Cone
Posts: 6
Joined: 06 Mar 2019 17:08

Re: Audio cuts out after "EOF reached" message

Postby mikealeonetti » 11 Mar 2019 14:42

Yes it is
2019-03-04, 14:40:39.411000: <warn> (0x00000ea0) [VLC] decoded zero sample
2019-03-04, 14:40:39.411000: <debug> (0x00000ea0) [VLC] reusing audio output
2019-03-04, 14:40:39.411000: <debug> (0x00000ea0) [VLC] Opening DirectSound Audio Output

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: Audio cuts out after "EOF reached" message

Postby Jean-Baptiste Kempf » 11 Mar 2019 17:08

Yes, this is a known bug. We will fix quite soon.
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.

mikealeonetti
New Cone
New Cone
Posts: 6
Joined: 06 Mar 2019 17:08

Re: Audio cuts out after "EOF reached" message

Postby mikealeonetti » 12 Mar 2019 14:38

Thank you for getting back to me so quickly. Do you have a link to the bug so I can track it?

Also, is there a good work around for the time being?

Thanks so much.

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: Audio cuts out after "EOF reached" message

Postby Jean-Baptiste Kempf » 12 Mar 2019 14:41

The workaround is to use Wasapi and not directsound
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 “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 19 guests