After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639681 - [ffdec_wmv3] regression: video very unsmooth with various mms streams
[ffdec_wmv3] regression: video very unsmooth with various mms streams
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal blocker
: 0.10.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-16 16:41 UTC by Tim-Philipp Müller
Modified: 2011-07-13 22:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2011-01-16 16:41:51 UTC
Play these videos with git gst-ffmpeg in totem/playbin2:

mms://straumod.nrk.no/disk08/Halvseint/2007-09-20/Halvseint_20_09_07_1000_290227_20070920_222500.wmv
mms://straumod.nrk.no/disk08/Halvseint/2007-10-11/Halvseint_11_10_07_1000_296971_20071011_222500.wmv

Watch for a couple of seconds. The video is very unsmooth, sometimes freezing for 1-2 seconds. Maybe a timestamping regression of some sort?

Seems to work fine with the 0.10.11 release.
Comment 1 Edward Hervey 2011-01-16 17:14:08 UTC
Works fine here. Left it playing until the maximum boost clip :)
Comment 2 Tim-Philipp Müller 2011-01-16 19:34:26 UTC
Happens even with video downloaded to local file. Watch the initial sequence of the 20071011 clip closely, quite noticable there.

Something funny going on with timestamp interpolation: note the 10ms frame durations and the  jump from 4.3secs to 5.6secs:

$ gst-launch-0.10 uridecodebin uri=file:///home/tpm/samples/639681-mms-Halvseint_11_10_07_1000_296971_20071011_222500-video-occasionally-freezes.wmv  ! video/x-raw-yuv ! fakesink

timestamp: 0:00:04.154000000, duration: 0:00:00.040000000, flags: 257
timestamp: 0:00:04.194000000, duration: 0:00:00.040000000, flags: 257
timestamp: 0:00:04.234000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.235000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.236000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.237000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.238000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.239000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.240000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.241000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.242000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.243000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.244000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.245000000, duration: 0:00:00.040000000, flags: 257
timestamp: 0:00:04.285000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.286000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.287000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.288000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.289000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.290000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.291000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.292000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.293000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.294000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.295000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.296000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.297000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.298000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.299000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.300000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.301000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.302000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.303000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:05.630000000, duration: 0:00:00.001000000, flags:   1
timestamp: 0:00:05.631000000, duration: 0:00:00.040000000, flags: 257

Compare this to what the demuxer outputs:

$ gst-launch-0.10 file:///home/tpm/samples/639681-mms-Halvseint_11_10_07_1000_296971_20071011_222500-video-occasionally-freezes.wmv  ! asfdemux ! video/x-wmv ! fakesink


timestamp: 0:00:04.150000000, duration: 0:00:00.040000000, flags: 256
timestamp: 0:00:04.190000000, duration: 0:00:00.040000000, flags: 257
timestamp: 0:00:04.230000000, duration: 0:00:00.040000000, flags: 257
timestamp: 0:00:04.270000000, duration: 0:00:00.040000000, flags: 256
timestamp: 0:00:04.310000000, duration: 0:00:00.040000000, flags: 257
timestamp: 0:00:04.350000000, duration: 0:00:00.040000000, flags: 256
timestamp: 0:00:04.390000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.430000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:04.470000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.510000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:04.550000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.590000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:04.630000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.670000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.710000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:04.750000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.790000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:04.830000000, duration: 0:00:00.040000000, flags: 256
timestamp: 0:00:04.870000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:04.910000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:04.950000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:04.990000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.030000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.070000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.110000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:05.150000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.190000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.230000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:05.270000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.310000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:05.350000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.390000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.430000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:05.470000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.510000000, duration: 0:00:00.001000000, flags: 257
timestamp: 0:00:05.550000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.590000000, duration: 0:00:00.001000000, flags: 256
timestamp: 0:00:05.630000000, duration: 0:00:00.001000000, flags:   0

So basically the demuxer outputs bogus durations (not sure yet if this is a parsing bug or brokenness in the stream) but correct timestamps.

It looks like ffdec_wmv3 then ignores the timestamps on the delta frames and instead uses the (bogus) durations to calculate timestamps.
Comment 3 Edward Hervey 2011-07-11 08:55:24 UTC
Issue doesn't happen anymore.


es, timestamp: 0:00:04.150000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x8b1e90"
es, timestamp: 0:00:04.190000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x8b1f20"
es, timestamp: 0:00:04.230000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x85e070"
es, timestamp: 0:00:04.270000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x8b1ce0"
es, timestamp: 0:00:04.310000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x8b1bc0"
es, timestamp: 0:00:04.350000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x85e2b0"
es, timestamp: 0:00:04.390000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x85e340"
es, timestamp: 0:00:04.430000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x85e580"
es, timestamp: 0:00:04.470000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x85e610"
es, timestamp: 0:00:04.510000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x85e3d0"
es, timestamp: 0:00:04.550000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x85e220"
es, timestamp: 0:00:04.590000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x8cf090"
es, timestamp: 0:00:04.630000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x8cf120"
es, timestamp: 0:00:04.670000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x8cf1b0"
es, timestamp: 0:00:04.710000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x8cf3f0"
es, timestamp: 0:00:04.750000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 257 ro delta_unit ) 0x8cf480"
es, timestamp: 0:00:04.790000000, duration: 0:00:00.040000000, offset: -1, offset_end: -1, flags: 256 delta_unit ) 0x8cf240"
Comment 4 Tim-Philipp Müller 2011-07-13 22:14:01 UTC
Well, that's because you hacked(?) around it in the demuxer ;)

 commit 67f754a9ea60052a023dfb2a3cc919bda80dbea8
 Author: Edward Hervey <bilboed@bilboed.com>
 Date:   Sun Jan 30 16:17:19 2011 +0100

    asfpacket: Avoid using broken duration extension
    
    Quite a few (broken?) files have a packet duration of 1ms, which is
    most definitely wrong for either audio or video packets.
    
    We therefore avoid using that value and instead use other metrics to
    determine the buffer duration (like using the extended stream properties
    average frame duration if present and valid).