Ticket #5089 (closed Bugs: Fixed)

Opened 6 years ago

Last modified 4 years ago

Seeking broken in most ASF/WMV files

Reported by: rodalpho Owned by: Anssi
Priority: 4 - Normal Milestone: 11.0 "Eden"
Component: Video playback (inc. audio in video and codecs) Version: GIT
Severity: Normal Keywords: seek asf wmv broken
Cc: elupus, arnova, CrystalP, Blocked By:
Blocking: Platform: Linux
Revision: 15799

Description

Seeking is entirely broken in most ASF/WMV files. It seems almost random which work and which don't. I would estimate that 80% of are unseekable.

Symptoms are as follows-- when playing the WMV, seeking or skipping (using the right/left or up/down keys) will fail and instantly skip back to the beginning of the file. Note that all the various linux media players I tried could seek through these WMV files just fine. I tried totem, mplayer using openGL, etc.

When I try to fast forward instead of seeking, it works for a short time and then immediately skips to the very end of the file and ends. 2X and 4X FF work much better than 8X, which always skips to the end. It's pretty bizarre.

My test case WMV file can be found here. I can upload it elsewhere if you don't want to use this source.

 http://www.mininova.org/tor/349282

Debug log is here. It has me starting XBMC, loading up the test case WMV, and trying to seek through it.

 http://pastebin.ca/1219931

I'm running hardy on a C2D at 3Ghz with 2GB RAM and a 9500GT PCIe graphics card and the new 177.78 beta nvidia drivers. Vsync is off, but I've tried it on, with flipping enabled, etc. Nothing seems to help. This really does look like a problem with dvdplayer and not my configuration.

Please let me know if I can provide any more information to help you guys out, this bug really bugs me!

Change History

comment:1 Changed 6 years ago by VDRfan

Please provide a more "legal" sample for us :)

comment:2 Changed 6 years ago by rodalpho

It's a 5 year old clip from a british public TV show, so I wouldn't worry too much about the legality. Try this source:

 http://www.filefactory.com/file/a63401/n/Top_Gear_-_2003_11_16_The_Lamborghini_Episode_rar

Thanks and again please let me know if I can do anything to help you narrow down the bug.

comment:3 Changed 6 years ago by Gamester17

  • Cc pike, sho, SandmanCL, ShortySco, arnova added

Can someone replicate this? Linux only or other platforms as well?

Anyone willing to help Team-XBMC troubleshoot this further please see:  http://wiki.xbmc.org/index.php?title=HOW-TO_help_with_Quality_Assurance

comment:4 Changed 6 years ago by rodalpho

Another enduser replicated it on windows, link to the XBMC forums:

 http://forum.xbmc.org/showthread.php?t=38452

This is a very longstanding bug.

comment:5 Changed 6 years ago by arnova

Is this the same bug that makes it impossible to seek in  mms:// streams?

comment:6 Changed 6 years ago by apanloco

I have the same problem with seeking in wmv files, and took a shot at narrowing the problem down.

I tried playing many problematic wmv-files with ffplay from XBMC ffmpeg copy and also with ffplay from latest ffmpeg svn. The former gives me the same problems as in XBMC (cannot seek, and skips the first key frame giving blocky output). The latter works fine (Can seek perfectly, and gives nice initial picture).

So, the problem is definitely in ffmpeg and not in XBMC, and I'm certain that upgrading ffmpeg (or wmv-specific parts) in XBMC will solve this problem.

comment:7 Changed 6 years ago by apanloco

Forgot to say that I run this on Vista (mingw), and regarding samples -- I havn't found a wmv that doesn't have this problem, yet.

comment:8 Changed 6 years ago by sho

  • Milestone changed from 8.10 to 9.04

ffmpeg will not be touched until after 8.10

comment:9 Changed 6 years ago by Gamester17

  • Cc elupus, vulkanr, yuvalt added
  • Owner set to elupus
  • Status changed from new to assigned

comment:10 Changed 6 years ago by rodalpho

FYI, this behavior is not fixed after the ffmpeg update in SVN 16804.

comment:11 Changed 6 years ago by rodalpho

As of the latest builds, instead of immediately returning to the beginning, skipping forward once immediately goes to the very end of the video. Fast forward 2X works fine, ffwd 4X and above works for a couple of seconds and then also skips to the end. Seeking in WMV/ASF files is still totally broken, just with a slightly different behavior.

comment:12 Changed 6 years ago by rodalpho

FYI, this is not fixed after the FFMPEG update in 17760. Same behavior where skipping forward in WMV files goes all the way to the end of the video.

comment:13 Changed 6 years ago by rodalpho

This is also not fixed as of the FFMPEG update in 18445. Same broken behavior.

comment:14 Changed 6 years ago by rodalpho

Still broken in post-VDPAU builds.

comment:15 Changed 5 years ago by rodalpho

Still broken as of babylon beta 1 and SVN 19701.

comment:16 Changed 5 years ago by tiben20

this bug is for windows too

comment:17 Changed 5 years ago by rodalpho

Boxee on linux version 0.9.14.6795 works much better. I can seek through WMV files that crash XBMC, although it only seeks like 10 seconds at a time and FFWD/REW does not function.

Any chance of porting their fixes to XBMC?

comment:18 Changed 5 years ago by rodalpho

I take it back, boxee is better on SOME videos but not others. On the really bad ones that it tries to buffer, it still goes to pause then crashes when trying to seek. Still broken everywhere.

comment:19 Changed 5 years ago by rodalpho

This is still broken as of the latest FFMPEG update in SVN release 21993. Same behavior.

comment:20 Changed 5 years ago by elupus

ffplay is equally broken right? (or mplayer with "mplayer -demuxer lavf")

comment:21 Changed 5 years ago by rodalpho

No, this problem is only with XBMC's implementation of ffmpeg. These ASF/WMV files are fully playable in totem, mplayer, ffplay, vlc, etc. It's _only_ XBMC (and it's derivatives, like boxee) that can't seek through these files.

comment:22 Changed 5 years ago by tiben20

elupsus even the timestamp when your start playing a wmv is wrong.

comment:23 Changed 5 years ago by WiSo

I noticed on one wmv sample that the duration increases constantly when ff.

comment:24 Changed 5 years ago by rodalpho

Yes. When the duration increases, you can actually seek through the file, you just need to fastforward to the end first. Those WMV files are only half broken-- behavior is wrong, but you can watch them. The real broken ones don't let you FF/seek at all, or immediately seek to the very end of the file and don't let you seek/FF/RW in the middle, or for some reason pause the player and then XBMC invariably crashes when you hit stop.

comment:25 Changed 5 years ago by gulp

I'm getting this problem on virtually all wmv files. No problem with mplayer,vlc,mpc.

comment:26 Changed 5 years ago by p1nky

I'm having the same problem and can confirm it's still not fixed in the latest builds. Seeking/skipping/fast forward broken in at least 90% of WMV files, there are a couple that do work tho. Wondering if this bug will ever get resolved - entered almost a year ago, confirmed by anyone that tried to reproduce it and no change in status :(

comment:27 Changed 5 years ago by rodalpho

This is still broken as of the ffmpeg update in 23484.

comment:28 Changed 5 years ago by rodalpho

This is still broken as of camelot beta SVN 24465

Please note that compiling XBMC with external libraries as described in the forum thread linked below significantly improves behavior. WMV files with previously constantly extending duration are fully seekable with external libs. However, WMV files that were totally unseekable with internal libs remain totally unseekable. This supports my hypothesis that the problem lies somewhere with dvdplayer's integration of ffmpeg.

Forum thread:  http://www.xbmc.org/forum/showthread.php?t=56339&page=8

Configure line: ./configure --disable-debug --enable-external-ffmpeg --enable-external-liba52 --enable-external-libdts --enable-external-libmpeg2 --enable-external-libass --enable-external-libogg --enable-external-libwavpack --disable-pulse

Ubuntu packages for external lib support: libavcodec-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev liba52-dev libdts-dev libmpeg2-4-dev libwavepack-dev ftgl-dev

comment:29 Changed 5 years ago by rodalpho

The partial fix I reported 5 weeks ago was actually in XBMC, not external libs. XBMC correctly displays the full duration of WMV files now. External libs do behave differently when seeking through WMV files (it pauses then ignores all seek/rew/ffwd commands, rather than just instantly skipping to the very end of the file) but it's not actually superior in any way. Skipping/seeking still doesn't work in most files.

Sometimes, in files I can't skip, I can start to fast forward. When FFwding, the playback freezes up and is non-recoverable. So I'll fast forward to say 11 minutes in, and playback will be frozen. Then hit stop to exit the video, and resume from my previous position, and it will correctly start up the video at 11 minutes in. This workaround is not particularly elegant, and often doesn't work, but I thought it worth mentioning.

This is still broken as of camelot 9.11 release candidates and SVN 25783.

comment:30 follow-up: ↓ 31 Changed 4 years ago by rodalpho

This is still broken as of SVN release 30055, may 12th 2010.

Fast forwarding has been largely broken for the last couple of months. While previously I could fast forward maybe 10-15 minutes, now if I go past 4X speed it immediately skips to the end and brings me back to the file selector. Seeking remains totally broken, instantly skipping to the end. So performance has actually degraded somewhat. But really when you get right down to it, WMVs didn't play right 2 years ago and they still don't now.

comment:31 in reply to: ↑ 30 Changed 4 years ago by p1nky

Replying to rodalpho:

This is still broken as of SVN release 30055, may 12th 2010.

Fast forwarding has been largely broken for the last couple of months. While previously I could fast forward maybe 10-15 minutes, now if I go past 4X speed it immediately skips to the end and brings me back to the file selector. Seeking remains totally broken, instantly skipping to the end. So performance has actually degraded somewhat. But really when you get right down to it, WMVs didn't play right 2 years ago and they still don't now.

A few days ago I tried one of the files that I know playback in Linux is broken for and guess what? It's broken in Windows too, exactly the same symptoms! The Windows version I have installed is 9.11 r26017. I cannot share the file here for copyright reasons but it is called "zafira_m_1920.wmv" and it is from the "AllInternal" porn site. The problem is the same in Linux and in Windows. If you try to skip or jump forward then XBMC always hangs for a very short time and then starts playback from the beginning. As said behaviour is the same in XBMC Linux (any version) n the Windows version mentioned above. As described multiple times above other players will play the file just fine. For example I tried in MPC-HC and I can jump and skip around in the file as much as I want and it works.

comment:32 Changed 4 years ago by alien

Still broken and still very annoying :(

release 9.11 R26018 on linux.

comment:33 Changed 4 years ago by sho

  • Cc CrystalP, added; vulkanr, yuvalt, pike, sho, SandmanCL, ShortySco removed

There are no valid samples linked (legal or otherwise). I am not saying it would solve everything, but it sure would not hurt having one.

comment:34 follow-up: ↓ 35 Changed 4 years ago by rodalpho

To tell you the absolute truth, I'm having a great deal of difficulty finding a sample that isn't hardcore porn. For whatever reason, porn studios collectively decided to use WMV, probably because windows movie maker came with their dells. If you wouldn't be offended by that, I can put a 45MB sample up for download. If not, I"m sure one of the other people following this ticket can produce a sample for you.

comment:35 in reply to: ↑ 34 Changed 4 years ago by CaptainScarlet

Replying to rodalpho:

To tell you the absolute truth, I'm having a great deal of difficulty finding...

You just havent looked hard enough :)

The smallest sample here is 16MB. The only one I have tested is the "Super Speedway" one (135MB), so if anyone wants to test others from my link and report back please do. The are all .exe files but self-extracting zips so can be opened by any unzip software.

 http://www.microsoft.com/japan/windows/windowsmedia/musicandvideo/hdvideo/contentshowcase.aspx

 http://download.microsoft.com/download/2/0/9/20907788-993F-4EF6-8D75-F0DD93207FB8/SuperSpeedway_720.exe

Hope that helps. Would be nice to get a serious bug fixed that was sorted out years ago in the Xbox builds (I realise they are different playback systems underneath but still, feature for feature WMV support is effectively broken on Linux).

comment:36 Changed 4 years ago by tiben20

 https://github.com/xbmc/xbmc/commit/8f46517cbb2ca39a72a9140ff7cf1340065458a3 this is actually fixing the problem with all the sample i have. The problem was a old patch made for playing incomplete asf/wmv files.

comment:37 Changed 4 years ago by rodalpho

I can confirm that after THREE YEARS (I opened this ticket in late 2008) this bug is FINALLY FIXED! Tested it with several files, many of which were known bad with dvdplayer previously, and they all seeked properly and did not jump to the end or stall entirely.

Please note that this exposes a problem from 3 years ago; when seeking through WMV files, the video gets really stuttery as the FPS drops to 3.94 for between 2-10 seconds, depending on the file. I assume this is dvdplayer waiting for the audio to sync up with the video, but the way it's implemented is jarring. Mplayer does not exhibit this behavior.

But hey, not gonna look a gift horse in the mouth. Thank you for FINALLY fixing this!

comment:38 Changed 4 years ago by sho

  • Owner changed from elupus to Anssi

comment:39 Changed 4 years ago by sho

10.1 material?

comment:40 follow-up: ↓ 42 Changed 4 years ago by Anssi

That commit simply reverted a change that was made several days ago, so it couldn't have been the actual fix. It is also in Dharma.

Maybe it was the FFmpeg update that fixed it instead? (d21c544a8af8b7b284a4f95c3ff46b6ff6c9a95d)

comment:41 Changed 4 years ago by rodalpho

I very strongly doubt it was the FFMPEG update. XBMC has gone through maybe 7 or 8 (literally) FFMPEG updates since I first opened this ticket 3 years ago. I used to update the ticket after each one going "nope, still not fixed".

Ffplay and mplayer worked the entire time-- the problem was always a bug in dvdplayer. Whether that ASF patch was at fault or not I couldn't tell you, but it wasn't ffmpeg's fault.

comment:42 in reply to: ↑ 40 Changed 4 years ago by tiben20

Replying to Anssi:

That commit simply reverted a change that was made several days ago, so it couldn't have been the actual fix. It is also in Dharma.

Maybe it was the FFmpeg update that fixed it instead? (d21c544a8af8b7b284a4f95c3ff46b6ff6c9a95d)

One of the 2 patch was actually made for playing incomplete wmv by not parsing the entire asf index. Parsing the entire index is required when it come to seeking in asf container this is why dvdplayer was acting really strange on seek. This is why i requested 2 months ago to remove those patch when we were going to update ffmpeg but we omitted to inform you when you did update ffmpeg

comment:43 Changed 4 years ago by sho

  • Status changed from assigned to closed
  • Resolution set to Fixed
  • Milestone changed from Future / Pending to 11.0

Also see #10126.

Closing this as fixed.

Note: See TracTickets for help on using tickets.