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 625479 - Pitivi does not set framerate when rendering
Pitivi does not set framerate when rendering
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: Rendering
Git
Other Linux
: Normal normal
: 0.13.5
Assigned To: Pitivi maintainers
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-28 10:18 UTC by Stephen Irons
Modified: 2010-07-30 12:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to set framerate when rendering (1.81 KB, patch)
2010-07-28 10:36 UTC, Stephen Irons
none Details | Review
Less restrictive capsfilter setting. (1.63 KB, patch)
2010-07-28 20:19 UTC, Stephen Irons
none Details | Review

Description Stephen Irons 2010-07-28 10:18:02 UTC
Pitivi always uses the framerate of the first clip it renders (I think), rather than the framerate set in the project settings or rendering settings.

To reproduce: 
* Create a project
* Add a clip with a 30 fps framerate
* Change the project settings to 25 fps
* Render

Expected result
* When playing the rendered video, the framerate should be 25 fps

Actual result
* The framerate is 30 fps
Comment 1 Stephen Irons 2010-07-28 10:31:34 UTC
I have played around with two implementations.

The first implementation modified the framerate of every source clip in the timeline, by adding a capsfilter to the streambin in SourceFactory. However, watching the video in the preview was a bit strange at very slow frame rates (1 fps). 

I think it is better to set the framerate during rendering, by adding the capsfilter the bin in VideoModifierFactory.

The idea is to add a capsfilter to the bin immedately after the videorate element, and to set the caps to the value same value as the output stream. It seems as though the capsfilter at the end of the bin does not actually change the framerate, even though it specifies it. However, the capsfilter immediately after the videorate element does set the framerate.
Comment 2 Stephen Irons 2010-07-28 10:36:24 UTC
Created attachment 166695 [details] [review]
Patch to set framerate when rendering

This patch adds a capsfilter immediately after the videorate element in VideoModifierFactory. The caps is set to the same as the output stream.

You probably do need to keep the capsfilter after the vscale element as this sets the size and aspect ratio of the rendered video. 

The pipeline in VideoModifierFactory looks something like:

(in)-->idt-->csp-->vrate-->vratecaps-->vscale-->capsfilter-->(out)
Comment 3 Stephen Irons 2010-07-28 20:17:20 UTC
That first patch fails with certain video files. The problem is that the capsfilter is too restrictive. The next patch uses a far less restrictive capsfilter: it only filters the framerate. Note that you need to apply both patches in sequence (I think).
Comment 4 Stephen Irons 2010-07-28 20:19:24 UTC
Created attachment 166740 [details] [review]
Less restrictive capsfilter setting.

This patch uses a less restrictive filter setting on the framerate capsfilter. It only chooses the framerate, not all of the other video parameters.
Comment 5 Robert Swain 2010-07-30 08:36:51 UTC
Fixed in http://git.pitivi.org/?p=pitivi.git;a=commit;h=fff4c2e9fb4256db2157202f73f57dda28d5867c (See bug #613416 at the bottom for discussion.)