Core-2-Extreme / Video_player_for_3DS

Video player for 3ds
https://gbatemp.net/threads/release-video-player-for-3ds.586094
GNU General Public License v3.0
178 stars 17 forks source link

Video that should be supported are crashing #69

Open SageSystems opened 7 months ago

SageSystems commented 7 months ago

Video encoded with ffmpeg -hwaccel auto -i "video" -c:v libx264 -tune animation -c:a libfdk_aac -vbr 3 -vf "scale=400:-2:flags=lanczos" -crf 18 -maxrate 500k -bufsize 300k -profile:v high -pix_fmt yuv420p -x264opts opencl -preset veryslow "video" is crashing upon playback

SageSystems commented 7 months ago

This is crashing mvd specifically

moisespr123 commented 6 months ago

I can confirm. Using -preset medium works, but in previous versions, using -preset veryslow worked.

It seems using presets slow and slower are working. Only veryslow and potentially placebo is causing the crash.

moisespr123 commented 5 months ago

I noticed that using slower presets with x264 makes the video start glitching around 25 to 30 minutes.

I currently am using Intel Quick Sync -h264_qsv with the -veryslow preset and that has been working nice. No glitches and the video plays smoothly.

Core-2-Extreme commented 3 months ago

Video encoded with ffmpeg -hwaccel auto -i "video" -c:v libx264 -tune animation -c:a libfdk_aac -vbr 3 -vf "scale=400:-2:flags=lanczos" -crf 18 -maxrate 500k -bufsize 300k -profile:v high -pix_fmt yuv420p -x264opts opencl -preset veryslow "video" is crashing upon playback This is crashing mvd specifically

I could reproduce the problem, increasing mvd buffer size solves the problem but current buffer size calculation is based on NEW 3DS Internet browser's mvd buffer size.

NEW3DS Internet browser uses MVD_DEFAULT_WORKBUF_SIZE(9438920 Bytes) and supports up to 854*480(864*480). 864*480*23 (9538560 Bytes) is greater than MVD_DEFAULT_WORKBUF_SIZE(9438920 Bytes), so I'm using width * height * 23 for buffer size calculation now. To get your video working, I need to increase mvd buffer size from width * height * 23 (2060800 bytes) to width * height * 30 (2688000 bytes).

So I don't know how much buffer I should allocate based on video resolution. (Allocating too much buffer for mvd can make video player itself out of memory)

Core-2-Extreme commented 3 months ago

I noticed that using slower presets with x264 makes the video start glitching around 25 to 30 minutes.

Does it occur only with hardware decoder (mvd)? Does seek change the behavior?

moisespr123 commented 1 month ago

I noticed that using slower presets with x264 makes the video start glitching around 25 to 30 minutes.

Does it occur only with hardware decoder (mvd)? Does seek change the behavior?

I noticed that using slower presets with x264 makes the video start glitching around 25 to 30 minutes.

Does it occur only with hardware decoder (mvd)? Does seek change the behavior?

I only tested on MVD. The solution is to stop the video and play it back again. Then it plays normally but glitches may still happen after another set of minutes.

Best solution is to just use x264 medium preset or use Intel Quick Sync which works at slower presets.