Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the last few seconds of mp4 is not playable in windows media player #2631

Open
fastfading opened this issue Oct 12, 2023 · 2 comments
Open

Comments

@fastfading
Copy link

fastfading commented Oct 12, 2023

MP4Box -dash 30000 -profile onDemand music_normal.mp4 -out music.mpd --dual
play music_normal_dashinit.mp4 in windows media player
when seek to the last part of the video. it is not playable and will jump back to the beggining .
no problem on other player .

@jeanlf in the last issue (#2488)
you mentioned
"
Here's what I checked:
dashing using 15s segments instead of 30s: playback until end OK
dashing video only with 30s segments: playback until end OK
dashing audio only with 30s segments: playback until end OK
The segment durations in 30s Audio+Video and 30s VideoOnly are the same, and the last segments are correct.

I think that's a WMP bug, there's not much we can do here.
"

I have set the segments to 29s 20s 15s , playback is OK.
babcock_15.m3u8.txt
babcock_29.m3u8.txt
babcock_30.m3u8.txt
babcock_15 and babcock_29 plays ok

for the same mp4 I use different version of mp4box ,the segment is different .
20230922_new30.m3u8.txt
20230922_org30.m3u8.txt
20230922_new30 plays ok

looks like this issue is related to segment strategy

do you still have the mp4 file(timely.mp4) mentioned in #2488 ?
we have a lot of cases here, however ,I could not send them to you , for it is customer data.

timely.zip
here is what I can provide
timly_29.m3u8 plays OK
while
timly_30.m3u8 last few seconds is not playable.

@fastfading fastfading changed the title the last part of mp4 is not playable in windows media player the last few seconds of mp4 is not playable in windows media player Oct 12, 2023
@fastfading
Copy link
Author

fastfading commented Oct 13, 2023

ffmpeg -loglevel warning -i rawdata.m3u8 -filter_complex "[0:v]scale=1920:1080:force_original_aspect_ratio=decrease, pad=1920:1080:(1920-in_w)/2:(1080-in_h)/2[v0]" -map "[v0]" -map "0:a" -y -preset veryfast -r 25 -g 750 -movflags +faststart -bsf:a aac_adtstoasc -vsync 1 -async 1 -af aresample=async=1 -avoid_negative_ts 1 -tune stillimage -max_muxing_queue_size 1024 normal.mp4

MP4Box -dash 30000 -profile onDemand normal.mp4 -out music.mpd --dual

the whole mp4 generated process is above.
-r 25 -g 750 set the gop to 30 seconds
however we did not set sc_threhold , so some segment is shorter than 30s
the -dash 30000 segment sometimes >30s , sometimes <30s
Even a single segment can sometimes merge with another segment (>30s) or remain separate (<30s) based on different -dash parameters.
I wonder the logic behind it. looks like such logic cause windows media player is not play well at the last few seconds.

@fastfading
Copy link
Author

timely_faststart.zip
I dump the file here
mp4box -diso timely_faststart.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant