Closed keratomalacian closed 4 months ago
Hello. I am trying to use the library as a test, but after building a modified version of the example provided in the samples folder the video does not display and i get an error in the HaxeFlixel console, but the audio of the video works correctly.
The error that i get in the HaxeFlixel console is:
[WARNING] The frame null has incorrect data and results in an image with the size of (0, 0)
The code that i am using is:
package; import flixel.util.FlxTimer; import flixel.FlxG; import hxvlc.flixel.FlxVideoSprite; import flixel.FlxState; class PlayState extends FlxState { var video:FlxVideoSprite; override public function create() { video = new FlxVideoSprite(0, 0); video.bitmap.onFormatSetup.add(function():Void { video.setGraphicSize(FlxG.width, FlxG.height); video.updateHitbox(); video.screenCenter(); }); video.bitmap.onEndReached.add(function():Void { video.destroy(); trace("video ended!"); }); video.antialiasing = true; video.load("assets/videos/shop.mp4"); add(video); FlxTimer.wait(1, function():Void { video.play(); }); super.create(); } override public function update(elapsed:Float) { super.update(elapsed); } }
And after enabling HXVLC_VERBOSE=1 and HXVLC_LOGGING i get this in the console:
VLC media player - 3.0.20 Vetinari Copyright © 1996-2023 the VideoLAN team revision 3.0.20-0-g6f0d0ab126b configured with ./configure '--prefix=/usr' '--sysconfdir=/etc' '--with-kde-solid=/usr/share/solid/actions/' '--disable-rpath' '--enable-nls' '--enable-archive' '--enable-live555' '--enable-dc1394' '--enable-dv1394' '--enable-dvdread' '--enable-dvdnav' '--enable-bluray' '--disable-opencv' '--enable-smbclient' '--enable-sftp' '--enable-nfs' '--enable-realrtsp' '--enable-dvbpsi' '--enable-gme' '--enable-ogg' '--enable-shout' '--enable-matroska' '--enable-mod' '--enable-mpc' '--enable-mad' '--enable-mpg123' '--enable-gst-decode' '--enable-avcodec' '--enable-libva' '--enable-avformat' '--enable-postproc' '--enable-faad' '--enable-vpx' '--enable-twolame' '--disable-fdkaac' '--enable-a52' '--enable-dca' '--enable-flac' '--enable-fluidsynth' '--enable-libmpeg2' '--enable-vorbis' '--enable-speex' '--enable-opus' '--enable-oggspots' '--disable-schroedinger' '--enable-png' '--enable-jpeg' '--enable-x264' '--enable-x265' '--enable-zvbi' '--enable-libass' '--enable-kate' '--enable-tiger' '--enable-vdpau' '--enable-wayland' '--enable-sdl-image' '--enable-freetype' '--enable-fribidi' '--enable-harfbuzz' '--enable-fontconfig' '--enable-svg' '--enable-svgdec' '--enable-aa' '--enable-caca' '--enable-pulse' '--enable-alsa' '--enable-jack' '--enable-samplerate' '--enable-soxr' '--disable-chromaprint' '--enable-chromecast' '--enable-qt' '--enable-skins2' '--enable-libtar' '--enable-ncurses' '--enable-lirc' '--enable-goom' '--enable-projectm' '--enable-avahi' '--enable-mtp' '--enable-upnp' '--enable-microdns' '--enable-libxml2' '--disable-libgcrypt' '--enable-gnutls' '--enable-taglib' '--enable-secret' '--enable-kwallet' '--disable-update-check' '--enable-notify' '--disable-libplacebo' '--enable-vlc' '--enable-aribsub' '--enable-aribcam' '--enable-aom' '--enable-srt' '--enable-dav1d' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -I/usr/include/samba-4.0 -ffat-lto-objects' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' 'CPPFLAGS= -I/usr/include/samba-4.0' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -std=c++17' 'PKG_CONFIG_PATH=/usr/lib/ffmpeg4.4/pkgconfig/:/usr/lib/ffmpeg4.4/pkgconfig' 'LUA_LIBS=-llua -lm' 'LUAC=/usr/bin/luac' creating audio output looking for audio output module matching "any": 6 candidates using library version 17.0.0 (compiled with version 17.0.0, protocol 35) connected locally to /run/user/1000/pulse/native as client #181 using protocol 35, server protocol 35 adding sink 0: alsa_output.pci-0000_03_00.6.analog-stereo (Family 17h/19h HD Audio Controller Analog Stereo) using audio output module "pulse" keeping audio output Creating an input for 'shop.mp4' using timeshift granularity of 50 MiB using default timeshift path `file:///home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4' gives access `file' demux `any' path `/home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4' creating demux: access='file' demux='any' location='/home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4' file='/home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4' looking for access_demux module matching "file": 14 candidates no access_demux modules matched creating access: file:///home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4 (path: /home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4) looking for access module matching "file": 27 candidates using access module "filesystem" looking for stream_filter module matching "prefetch,cache_read": 26 candidates Using stream method for AStream* starting pre-buffering received first data after 0 ms pre-buffering done 1024 bytes in 0s - 32258 KiB/s using stream_filter module "cache_read" looking for stream_filter module matching "any": 26 candidates no stream_filter modules matched looking for stream_directory module matching "any": 1 candidates no stream_directory modules matched attachment of directory-extractor failed for file:///home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4 looking for stream_filter module matching "record": 26 candidates using stream_filter module "record" creating demux: access='file' demux='any' location='/home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4' file='/home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4' looking for demux module matching "mp4": 52 candidates dumping root Box "root" | + ftyp size 24 offset 0 | + moov size 10422 offset 24 | | + mvhd size 108 offset 32 | | + trak size 6343 offset 140 | | | + tkhd size 92 offset 148 | | | + edts size 36 offset 240 | | | | + elst size 28 offset 248 | | | + mdia size 6207 offset 276 | | | | + mdhd size 32 offset 284 | | | | + hdlr size 95 offset 316 | | | | + minf size 6072 offset 411 | | | | | + dinf size 36 offset 419 | | | | | | + dref size 28 offset 427 | | | | | | | + url size 12 offset 443 | | | | | + stbl size 6008 offset 455 | | | | | | + stsd size 152 offset 463 | | | | | | | + avc1 size 136 offset 479 | | | | | | | | + avcC size 50 offset 565 | | | | | | + stts size 24 offset 615 | | | | | | + stsc size 40 offset 639 | | | | | | + stco size 176 offset 679 | | | | | | + stsz size 2224 offset 855 | | | | | | + stss size 32 offset 3079 | | | | | | + ctts size 3352 offset 3111 | | | | | + vmhd size 20 offset 6463 | | + trak size 3848 offset 6483 | | | + tkhd size 92 offset 6491 | | | + mdia size 3748 offset 6583 | | | | + mdhd size 32 offset 6591 | | | | + hdlr size 95 offset 6623 | | | | + minf size 3613 offset 6718 | | | | | + dinf size 36 offset 6726 | | | | | | + dref size 28 offset 6734 | | | | | | | + url size 12 offset 6750 | | | | | + stbl size 3553 offset 6762 | | | | | | + stsd size 105 offset 6770 | | | | | | | + mp4a size 89 offset 6786 | | | | | | | | + esds size 53 offset 6822 | | | | | | + stts size 24 offset 6875 | | | | | | + stsc size 52 offset 6899 | | | | | | + stco size 176 offset 6951 | | | | | | + stsz size 3188 offset 7127 | | | | | + smhd size 16 offset 10315 | | + udta size 115 offset 10331 | | | + meta size 107 offset 10339 | | | | + hdlr size 33 offset 10351 | | | | + ilst size 62 offset 10384 | | | | | + gsst size 25 offset 10392 | | | | | | + data size 17 offset 10400 | | | | | + gstd size 29 offset 10417 | | | | | | + data size 21 offset 10425 | + mdat size 3375423 offset 10446 unrecognized major media specification (mp42). found 2 tracks elst box found - [0] duration=18385ms media time=33ms) rate=1.0 track[Id 0x1] read 40 chunk STTS table of 1 entries CTTS table of 417 entries track[Id 0x1] read 551 samples length:18s selecting program id=0 adding track[Id 0x1] video (enable) language undef track[Id 0x2] read 40 chunk STTS table of 1 entries track[Id 0x2] read 792 samples length:18s adding track[Id 0x2] audio (enable) language eng using demux module "mp4" looking for video decoder module matching "any": 18 candidates using ffmpeg Lavc58.134.100 CPU flags: 0x000fd3db allowing 3 thread(s) for decoding codec (h264) started using frame thread mode with 3 threads using video decoder module "avcodec" looking for audio decoder module matching "any": 20 candidates using audio decoder module "faad" looking for meta reader module matching "any": 2 candidates using meta reader module "taglib" removing module "taglib" `file:///home/malacian/sys/dev/vlctest/export/linux/bin/assets/videos/shop.mp4' successfully opened elst (0) gives 0ms (movie)-> 33ms (track) track[Id 0x1] using Sync Sample Box (stss) stss gives 1 --> 0 (sample number) Buffering 0% Buffering 25% decoded zero sample reusing audio output using stereo channel map available hardware decoder output format 100 (vdpau) available hardware decoder output format 119 (cuda) available hardware decoder output format 46 (vaapi_vld) available software decoder output format 0 (yuv420p) trying format vaapi_vld looking for text renderer module matching "dummy": 3 candidates Buffering 50% changed buffer metrics: maxlength=4194304, tlength=42336, prebuf=0, minreq=14112 connected to sink alsa_output.pci-0000_03_00.6.analog-stereo output 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes looking for audio volume module matching "any": 2 candidates Buffering 75% Building font databases. Buffering 100% using audio volume module "float_mixer" input 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes looking for audio filter module matching "scaletempo": 15 candidates format: 44100 rate, 2 nch, 4 bps, fl32 params: 30 stride, 0.200 overlap, 14 search 1.000 scale, 1323.000 stride_in, 1323 stride_out, 1059 standing, 264 overlap, 617 search, 2204 queue, fl32 mode using audio filter module "scaletempo" conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo conversion pipeline complete conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo conversion pipeline complete looking for audio resampler module matching "any": 4 candidates using audio resampler module "samplerate" Stream buffering done (1250 ms in 8 ms) Took -15617 microseconds using text renderer module "freetype" looking for video converter module matching "any": 23 candidates 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality) using video converter module "swscale" looking for video converter module matching "any": 23 candidates YUVP to YUVA converter using video converter module "yuvp" Deinterlacing available deinterlace -1, mode auto, is_needed 0 looking for vout window module matching "none": 6 candidates no vout window modules matched Opening vout display wrapper looking for vout display module matching "vmem": 13 candidates VoutDisplayEvent 'resize' 960x720 using vout display module "vmem" A filter to adapt decoder VAOP to display RV32 is needed looking for video converter module matching "any": 23 candidates Trying to use chroma I420 as middle man looking for video converter module matching "any": 23 candidates Using SW chroma filter for 960x720 VAOP -> I420 using video converter module "vaapi_filters" Filter 'VAAPI filters' (0x7813f8035f50) appended to chain looking for video converter module matching "any": 23 candidates 960x720 (960x720) chroma: I420 -> 960x720 (960x720) chroma: RV32 with scaling using Bicubic (good quality) using video converter module "swscale" Filter 'Swscale' (0x7813f803a410) appended to chain using video converter module "chain" Filter 'chain' (0x7813f8032380) appended to chain original format sz 960x720, of (0,0), vsz 960x720, 4cc VAOP, sar 1:1, msk r0x0 g0x0 b0x0 VoutDisplayEvent 'resize' 960x720 removing module "freetype" looking for text renderer module matching "dummy": 3 candidates Building font databases. Took -17144 microseconds using text renderer module "freetype" looking for hw decoder module matching "none": 3 candidates no hw decoder modules matched trying format vdpau removing module "chain" removing module "vaapi_filters" Filter 0x7813f8035f50 removed from chain removing module "swscale" Filter 0x7813f803a410 removed from chain Filter 0x7813f8032380 removed from chain removing module "vmem" deinterlace -1, mode auto, is_needed 0 Opening vout display wrapper looking for vout display module matching "vmem": 13 candidates VoutDisplayEvent 'resize' 960x720 using vout display module "vmem" A filter to adapt decoder VDV0 to display RV32 is needed looking for video converter module matching "any": 23 candidates Trying to use chroma I420 as middle man looking for video converter module matching "any": 23 candidates using video converter module "vdpau_chroma" Filter 'VDPAU' (0x7813f803a410) appended to chain looking for video converter module matching "any": 23 candidates 960x720 (960x720) chroma: I420 -> 960x720 (960x720) chroma: RV32 with scaling using Bicubic (good quality) using video converter module "swscale" Filter 'Swscale' (0x7813f8035f50) appended to chain using video converter module "chain" Filter 'chain' (0x7813f8032380) appended to chain original format sz 960x720, of (0,0), vsz 960x720, 4cc VDV0, sar 1:1, msk r0x0 g0x0 b0x0 reusing provided vout looking for hw decoder module matching "none": 3 candidates no hw decoder modules matched removing module "chain" removing module "vdpau_chroma" Filter 0x7813f803a410 removed from chain removing module "swscale" Filter 0x7813f8035f50 removed from chain Filter 0x7813f8032380 removed from chain removing module "vmem" deinterlace -1, mode auto, is_needed 0 Opening vout display wrapper looking for vout display module matching "vmem": 13 candidates VoutDisplayEvent 'resize' 960x720 using vout display module "vmem" A filter to adapt decoder I420 to display RV32 is needed looking for video converter module matching "any": 23 candidates 960x720 (960x738) chroma: I420 -> 960x720 (960x720) chroma: RV32 with scaling using Bicubic (good quality) using video converter module "swscale" Filter 'Swscale' (0x7813f8032380) appended to chain original format sz 960x738, of (0,0), vsz 960x720, 4cc I420, sar 1:1, msk r0x0 g0x0 b0x0 reusing provided vout Received first picture VoutDisplayEvent 'resize' 960x720 Decoder wait done in 72 ms cannot synchronize start deferring start (33007 us) deferring start (9932 us) starting late (-13582 us) started auto hiding mouse cursor toggling resume toggling resume toggling pause toggling pause started EOF reached waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty waiting decoder fifos to empty underflow killing decoder fourcc `h264' removing module "avcodec" saving a free vout reusing provided vout killing decoder fourcc `mp4a' removing module "faad" removing module "samplerate" removing module "scaletempo" removing module "float_mixer" keeping audio output removing module "mp4" freeing all memory Program doesn't contain anymore ES removing module "record" removing module "cache_read" removing module "filesystem" removing module "pulse" destroying useless vout removing module "swscale" Filter 0x7813f8032380 removed from chain removing module "vmem" removing module "freetype" removing module "yuvp" removing module "swscale" source/PlayState.hx:22: video ended!
And playing the video using the normal VLC works fine:
I am on Arch Linux, running VLC 3.0.20, Haxe 4.3.4, and the latest version of the HXVLC library on git.
Do you somehow have a modified version of haxeflixel? Can you reproduce the issue by compiling the samples?
Alright, my bad, bind
didn't work that's why it didn't show up the video, it should work with the latest commit rn or the version released on haxelib.
After updating to the latest version, everything works correctly. Thanks!
Hello. I am trying to use the library as a test, but after building a modified version of the example provided in the samples folder the video does not display and i get an error in the HaxeFlixel console, but the audio of the video works correctly.
The error that i get in the HaxeFlixel console is:
[WARNING] The frame null has incorrect data and results in an image with the size of (0, 0)
The code that i am using is:
And after enabling HXVLC_VERBOSE=1 and HXVLC_LOGGING i get this in the console:
And playing the video using the normal VLC works fine:
I am on Arch Linux, running VLC 3.0.20, Haxe 4.3.4, and the latest version of the HXVLC library on git.