GNOME Bugzilla – Bug 154744
Time slider does not work with avi videos from Cannon SD100
Last modified: 2006-03-15 09:10:02 UTC
I updated to today's latest CVS gstreamer, gst-plugins, and totem. When I play an AVI file recorded by my ditigal camera, totem's time slider will jump to about the 25-50% position when the video starts. As the avi plays the slider slowly increments to the 100% position (as expected), but hits the 100% position about 4-7 seconds before the video is finished playing. Let me know if you need a sample avi to reproduce the bug.
Yeah, a sample movie would be appreciated.
Created attachment 32365 [details] Short sample avi for testing. This avi is only 3 seconds. When totem plays the clip the time slider will begin at the 100% position.
Also if I drag the time slider, the video does not seek to the new position. I am attaching an odd screenshot. Look at the 'Playing' parameters in the status bar. This happened afer adjusting the time slider while the avi was playing,
Created attachment 32430 [details] Screenshot.
I think I fixed that 'starts at 4-7s' bug, can you please check? I'm not sure about the other bug.
Actually, I don't know if it's fixed. The CVS head version of totem, gstreamer, and gst-plugins results in Totem crashing when I try to play avi files. Here is the stack trace. Backtrace was generated from '/gnome/install/bin/totem' Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -161507648 (LWP 6105)] [New Thread -169612368 (LWP 6108)] [Thread debugging using libthread_db enabled] [New Thread -161507648 (LWP 6105)] [New Thread -169612368 (LWP 6108)] [Thread debugging using libthread_db enabled] [New Thread -161507648 (LWP 6105)] [New Thread -169612368 (LWP 6108)] [New Thread -167388240 (LWP 6107)] [New Thread -164631632 (LWP 6106)] 0x00b887a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
+ Trace 52456
Thread 1 (Thread -161507648 (LWP 6105))
Dennis, update your CVS, it's bug #158910
Bastien, Thanks for the quick fix. Ronald, No, the 'starts at 4-7s' bug has not been fixed. Here is a link to one of my avi files, http://us.f1.yahoofs.com/bc/12c9ac06/bc/avi/mvi_0535.avi?BCFppoBBToCMeYah Sorry about the funny looking url, the file is stored in a yahoo briefcase. The file starts playing at the 4-5 second mark.
Core 0.8.7 or CVS? :).
Did you test with the avi file I provided you in the link above? I am using CVS head. $ gst-register --gst-version GStreamer Core Library version 0.8.7.1
No, not yet, sorry. Just trying to be sure... :). I'll look.
Just in case that link doesn't work, here is a url to the briefcase webpage a link to the file. http://f1.pg.briefcase.yahoo.com/bc/dennis_cranston/vwp2?.tok=bcHspbUBsSKGvl5V&.dir=/avi&.dnm=mvi_0535.avi&.src=bc
I tried, and cannot reproduce it. It plays exactly as one would expect...
Well, you are luckier than me. ;-) What could the difference be between your test environment and mine? Is there a library that gstreamer depends on for avi playback? If yes, maybe I am using a different version of the library? On my test system, if I open totem and drag the avi file to it. The video plays fine, but the play time displayed at the bottom of totem's window starts at 4 seconds. If I click pause the video takes about 4 seconds to actually pause, and dragging the time slider while playing remains broken.
... Can you try osssink and see if the 4-second-start is fixed then? Yes, I'm asking that for a very good reason. :).
Actually I was using osssink, so I started trying the other sinks. The good news is that using the alsasink appears to fix the four second start problem. Of course, pauses are still delayed and using the time slider to seek while the video is playing remains broken. But it's a start. ;-)
Seeking in very short AVI files indeed appears to be problematic. I intend to fix that at some point. ;).
seeking in very short avi files is fixed now. I still can't reproduce the time-slider-is-wrong issue with osssink...
Ronald, Thank you for all the hard work you are putting into gstreamer. Your work is much appreciated! Using the latest version from CVS, seeking is fixed for the avi files created by my Cannon camera. The time-slider-is-wrong only happens if I use the osssink (Fedora Core 3).
I had a closer look today, and can indeed reproduce it. I've seen this before, the scheduler caches the samples internally. I don't know how to fix that, since I cannot touch the scheduler when getting the position.
Strange stuff with this file on HEAD with totem+gst 0.9. I get a total time of 2 seconds, but the slider never moves from 1 second. Frames come every second or so. Wierd. Probably just 0.9 issues here.
OK at this point the slider bar works fine in totem with 0.9, but the video's stride is broken. I uploaded the file to http://gstreamer.freedesktop.org/media/incoming/mvi_0535.avi
I tried totem using gstreamer 0.9.5 (CVS HEAD from 2005-11-16). The above video plays great and the slider works pretty well. But, when I drag the slider handle close to the end of the video I get the following critical message in the terminal. (lt-totem:12327): GStreamer-CRITICAL **: gst_event_new_newsegment: assertion `start_value <= stop_value' failed
I retested again with gstreamer 0.10.1. The good news is the video plays. The bad news is now the slider does not work at all. Once I drag the time slider to change the playing position, the video stops playing and I have to restart totem to get the video to play again.
Updating based on my testing tonight: Using 0.10.3 of GStreamer core and gst-plugins-base, and 0.10.2 of gst-plugins-good the video plays, and I can seek around nicely. There is a section or several seconds about 1/3 of the way through that if I seek in that area playback doesn't resume, for some reason. Elsewhere, it finishes the seek fine. Also, seeking to the end of the video causes criticals on the console: ** (totem:387): WARNING **: Internal data flow problem. [gstbasesink.c(1238): gst_base_sink_chain_unlocked (): /play/vbin/video-sink/bin8/xvimagesink1: Received buffer without a new-segment. Cannot sync to clock.] (totem:387): GStreamer-CRITICAL **: gst_event_new_new_segment: assertion `start <= stop' failed
I retested with 0.10.3 and seeking doesn't work very well. After a seek the video will pause, but if I nudge the time slider back or forward a small amount it will begin to play again. Kind of strange.
This is a plugins thing.
Seeking is fixed in CVS! It looks like the following commit did the trick. Thanks! 2006-03-14 Tim-Philipp Müller <tim at centricular dot net> * gst/avi/gstavidemux.c: (gst_avi_demux_process_next_entry): Catch short reads, like they might happen with truncated files (see #305279); remove unnecessary indentation.