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 524346 - Framerate not being displayed correctly on running gst-discover.py
Framerate not being displayed correctly on running gst-discover.py
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
0.10.7
Other All
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-25 17:42 UTC by João Mesquita
Modified: 2008-04-01 14:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
sample video file for testing (506.80 KB, video/x-ms-wmv)
2008-03-25 18:26 UTC, João Mesquita
Details
Debug log (22.06 KB, application/x-gzip)
2008-03-26 13:23 UTC, João Mesquita
Details
CORRECT video stream (999.00 KB, video/x-ms-wmv)
2008-03-26 19:04 UTC, João Mesquita
Details

Description João Mesquita 2008-03-25 17:42:32 UTC
Please describe the problem:
I have found that using asf encoded videos, the framerate is not correctly reported by the gst-discover example. I will try to attach a sample file that has 29,97FPS and gst-discover reports 25/1

Steps to reproduce:
1. Run gst-discover.py with the sample attached as uri/source 


Actual results:
Framerate is shown as 25/1

Expected results:
Framerate of the file is 29,97

Does this happen every time?
Yes

Other information:
Comment 1 João Mesquita 2008-03-25 18:26:57 UTC
Created attachment 108009 [details]
sample video file for testing

File sample being used.

Generated from the original file using:

mencoder THE\ BACKWOODS\ PARTE\ UNICA.sample.wmv -endpos 500kb -ovc copy -oac copy -o sample.wmv
Comment 2 Sebastian Dröge (slomo) 2008-03-26 07:15:17 UTC
That might be caused by:
gstffmpegdec.c:636:gst_ffmpegdec_setcaps:<ffdec_wmav20> forcing 25/1 framerate

Just a few lines later everything is done properly though, i.e. 29.97 fps for the video and whatever framerate for the audio.
Comment 3 Wim Taymans 2008-03-26 10:22:07 UTC
it seems to work here too. I ran gst-discover and it reports:

wim@metal:~/gst/head/gst-python/examples$ ./gst-discover /home/wim/data/sample.wmv 
media type: video/x-msvideo
has video: True
video caps: video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)2997/100, format=(fourcc)I420
video width (pixels): 320
video height (pixels): 240
video length (ms): 10143
framerate (fps): 2997/100
has audio: True
audio caps: audio/x-raw-int, rate=(int)48000, channels=(int)2, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
audio format: integer
sample rate (Hz): 48000
sample width (bits): 16
sample depth (bits): 16
audio length (ms): 10922
audio channels: 2
wim@metal:~/gst/head/gst-python/examples$ 

This is with CVS gstreamer and gst-python
Comment 4 Wim Taymans 2008-03-26 10:34:33 UTC
I can't see why it would fail. Can you run gst-discover like:

GST_DEBUG=*avi*:5,*ffmpeg*:5 gst-discover /path/to/file >debug.log 2>&1

And then attach a gzipped debug.log to this bug report?
Comment 5 João Mesquita 2008-03-26 13:23:12 UTC
Created attachment 108060 [details]
Debug log
Comment 6 João Mesquita 2008-03-26 13:23:56 UTC
(In reply to comment #4)
> I can't see why it would fail. Can you run gst-discover like:
> 
> GST_DEBUG=*avi*:5,*ffmpeg*:5 gst-discover /path/to/file >debug.log 2>&1
> 
> And then attach a gzipped debug.log to this bug report?
> 

media type: video/x-ms-asf
has video: True
video caps: video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420
video width (pixels): 320
video height (pixels): 240
video length (ms): 5972783
framerate (fps): 25/1
has audio: True
audio caps: audio/x-raw-int, rate=(int)48000, channels=(int)2, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
audio format: integer
sample rate (Hz): 48000
sample width (bits): 16
sample depth (bits): 16
audio length (ms): 5972783
audio channels: 2
Comment 7 Wim Taymans 2008-03-26 15:03:17 UTC
Can you make this file available? the file you provided earlier is an avi file, while the file in your example seems to be an asf file.
Comment 8 João Mesquita 2008-03-26 18:39:47 UTC
(In reply to comment #7)
> Can you make this file available? the file you provided earlier is an avi file,
> while the file in your example seems to be an asf file.
> 

(In reply to comment #7)
> Can you make this file available? the file you provided earlier is an avi file,
> while the file in your example seems to be an asf file.
> 

I am sorry Tim, I am trying to get the sample of the original file without changing its original properties but my lack of knowledge on video encodings and its tools are giving me a hard time. The original file has over 600Mb.

Thanks Mesquita
Comment 9 Tim-Philipp Müller 2008-03-26 18:51:58 UTC
You could try:

 $ head --bytes=999k bigfile.asf > bigfile-head.asf

That's likely to have all the important information in it.
Comment 10 João Mesquita 2008-03-26 19:04:15 UTC
Created attachment 108080 [details]
CORRECT video stream

Now it outputs the correct (incorrect) information:
media type: video/x-ms-asf
has video: True
video caps: video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420
video width (pixels): 320
video height (pixels): 240
video length (ms): 5972783
framerate (fps): 25/1
has audio: True
audio caps: audio/x-raw-int, rate=(int)48000, channels=(int)2, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
audio format: integer
sample rate (Hz): 48000
sample width (bits): 16
sample depth (bits): 16
audio length (ms): 5972783
audio channels: 2

Thank you for the head tip.
Comment 11 João Mesquita 2008-03-26 19:05:37 UTC
Now we are allright. Thanks for the TIP.

PS: Sorry, forgot to set the first attachment as obsolete.

Mesquita
Comment 12 João Mesquita 2008-03-27 04:38:47 UTC
I am sorry and I re-read my last reply and I thought that it did not make much sense. The possible bug persists, but now the samples and debug information are correct.

Thanks,


Mesquita
Comment 13 Wim Taymans 2008-04-01 11:20:14 UTC
asfdemux does not seem to have a framerate for video and seems to hardcode the framerate to 25/1 in pull mode. In push mode it plays with the average frame durations to guess a framerate.
Comment 14 Wim Taymans 2008-04-01 11:55:14 UTC
argh, asfdemux is too broken too fix this.
Comment 15 Wim Taymans 2008-04-01 14:01:00 UTC
        * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_add_video_stream),
        (gst_asf_demux_process_ext_stream_props):
        Instead of adding a fixes 25/1 framerate to the video caps, use the
        average frame duration in the extended properties of the video stream as
        the framerate. Fixes #524346.