Bug 525155

Summary: Theora is broken in Rawhide
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: recordmydesktopAssignee: Sindre Pedersen Bjørdal <sindrepb>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: ajax, ceski, dennisgdaniels, elad, gmaxwell, hdegoede, info, jnovy, mail, mohamedhagag1981, nicubunu, sindrepb
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: recordmydesktop-0.3.8.1-4.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-15 22:08:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
recordmydesktop.ogv
none
istanbul.ogv
none
jumpy recording with gtk-recordmydesktop
none
Patch to use sane defaults.
none
Updates rmd_getzpixmap.c to use shmproto.h instead of shmstr.h
none
Updates rmd_update_image.c to use shmproto.h instead of shmstr.h
none
Fedora 12 64-bit instructions correctly formatted none

Description Kamil Páral 2009-09-23 14:49:37 UTC
Created attachment 362310 [details]
recordmydesktop.ogv

Description of problem:
There are some problems with theora in current Rawhide. I don't know if it is application problems or codec problems, but I hope you can decide. All I know is that everything worked ok in Fedora 11.

I have tried to record my desktop using gtk-recordmydesktop and the output file is totally broken. It was set to 15fps, but both in totem and mplayer it plays like 0.25fps (1 frame in 4 seconds). Vlc can't even play it.

When recording using istanbul, it plays correctly in all players, but video quality is unbelievably poor.

I believe all the records/players have not broken out of the blue at once, so there must be some problem in the codec itself.

I attach the two recordings for examination. In both I should be opening system and context menus and moving the cursor over the items fluently.

Version-Release number of selected component (if applicable):
Rawhide 20090922
libtheora-1.1beta3-1.fc12.x86_64
gtk-recordmydesktop-0.3.8-2.fc12.noarch
recordmydesktop-0.3.8.1-1.fc11.x86_64
istanbul-0.2.2-10.fc12.x86_64
vlc-1.0.2-1.fc12.1.x86_64
mplayer-1.0-0.109.20090329svn.fc11.x86_64
totem-2.28.0-1.fc12.x86_64

How reproducible:
always

Comment 1 Kamil Páral 2009-09-23 14:49:58 UTC
Created attachment 362311 [details]
istanbul.ogv

Comment 2 Gregory Maxwell 2009-10-27 12:17:20 UTC
The istanbul.ogv file is encoded with qi=16 and the resulting bitrate is 52kbit/sec; this reflects a quality setting of "1" in most applications.  Setting the output for low quality/low bitrate actually producing the requested result is notabug.

Comment 3 Gregory Maxwell 2009-10-27 12:23:37 UTC
Recordmydesktop.ogv is encoded with a target bitrate of 45kbit/sec but a minimum qi of 63 (equivalent to minimum quality of 10 in most applications).  

You're telling the encoder that it must use the highest configurable precision to encode the frames, yet that it can't use more than 45kbit/sec.  Older versions of the encoder would just wildly violate your rate constraint under this kind of situation, the newer encoder drops frames in an attempt to meet both your demands.

Again, not a bug in libtheora.

If the recording tools don't make it easy to adjust the settings, or have illogical results then there should probably be bugs filed against them.

Comment 4 Kamil Páral 2009-10-29 08:52:01 UTC
Thanks for the explanation. I was puzzled how it is possible that recordmydesktop worked in F11 with previous libtheora version and doesn't work in F12. If you say that previous libtheora ignored wrong settings, while new one doesn't, then it's explained I guess.

I checked istanbul in F11 (didn't try it before) and it produces same low quality picture as in F12. That's settled too I guess.

If you really believe it's a problem in recordmydesktop and not in libtheora, I will report this bug in recordmydesktop project and this issue can be closed as notabug. Can you tell me in which tool I could try to record/transcode a movie into theora to check the library works ok? One tool that works well is enough.

Comment 5 Bug Zapper 2009-11-16 12:48:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Adam Jackson 2009-11-17 20:24:29 UTC
Moving to recordmydesktop

Comment 7 Kamil Páral 2009-11-18 09:08:01 UTC
I have reported the bug in the upstream:
http://sourceforge.net/tracker/?func=detail&aid=2888673&group_id=172357&atid=861428

Comment 8 Nicu Buculei 2009-11-19 09:13:13 UTC
Created attachment 370301 [details]
jumpy recording with gtk-recordmydesktop

For me the recording is jumpy, see the attachment, the video freezes from time to time for a few seconds and then jumps forward.

Comment 9 Nicu Buculei 2009-11-19 09:17:24 UTC
@Gregory Maxwell: neither Istanbul or gtk-RecordMyDesktop allow the user to change the bitrate

Comment 10 Davide Cescato 2009-11-19 09:21:55 UTC
Confirmed on my F12 x86_64 system.

Comment 11 Davide Cescato 2009-11-19 10:02:24 UTC
Downgrading libtheora to the F11 version from
http://koji.fedoraproject.org/koji/buildinfo?buildID=86088
is possible, as no other dependencies seem to be involved. In my case, I had to downgrade both the x86_64 and the i686 package.

This brings smooth session recording back, of course with the "old" Theora encoder with lower quality.

Just a workaround for the time until recordmydesktop is fixed!

Comment 12 Nicu Buculei 2009-11-19 10:34:38 UTC
there are a lot of dependencies for libtheora, including recordmydesktop and gstreamer-plugins-base

Comment 13 Davide Cescato 2009-11-19 10:51:10 UTC
Sorry, maybe I was unclear. After downloading the F11 version, I only ran

sudo yum downgrade --nogpgcheck libtheora-1.0-3.fc11.x86_64.rpm

and it worked! I did not have to worry about downgrading recordmydesktop or other packages.

For the i686 version, I messed it up at first, since I ran

sudo yum erase libtheora.i686

which removed a few extra packages (gstreamer-plugins-base.i686, phonon.i686, phonon-backend-gstreamer.i686, qt-x11.i686) as well... But then I reinstalled them.

Hope this helps!

Comment 14 Elad Alfassa 2009-11-25 12:28:56 UTC
"Istanbul" and  "Recordmydesktop" both record jumpy video on my machine (Fedora 12 x86_64).

I've tried adding --v_bitrate 700000 in recordmydesktop-gtk int the Misc tab of the advanced settings window (it's an option of recordmydesktop, as written in the man page), but it didn't help. I think it is not related to the bitrate.

extra test that i did was recording with the CLI, maximum bitrate and 50 fps. the video was a little less jumpy, but still too jumpy.

Comment 15 Gregory Maxwell 2009-11-25 15:04:13 UTC
elad: Thats not high enough. You're asking theora to encode your screen with nearly perfect quality. Uncompressed 4:2:0 1024x768x15fps is 141mbit/sec. It's going to have to drop some frames to encode that into 700kbit/sec over a short time window with the requested near-perfect quality.

I explained very specifically what recordmydesktop is doing wrong.  Does this package not have a maintainer?

In any case, I'll attach a patch which gives sane behaviour.

Comment 16 Gregory Maxwell 2009-11-25 15:08:48 UTC
Created attachment 373762 [details]
Patch to use sane defaults.

Comment 17 Kamil Páral 2009-11-25 15:14:05 UTC
>> Does this package not have a maintainer?

I have reported it upstream, but as you can see, the upstream maintainer haven't responded yet. Thank you for the patch. Let's hope at least Fedora maintainer will decide to fix this issue until it is fixed upstream.

Comment 18 Elad Alfassa 2009-11-26 13:41:55 UTC
I've tested Gregory's patch. It works, and even seems to improve the encoding speed. 
Great work Gregory!

Comment 19 Rob Whalley 2009-11-27 00:43:22 UTC
Created attachment 374095 [details]
Updates rmd_getzpixmap.c to use shmproto.h instead of shmstr.h

Comment 20 Rob Whalley 2009-11-27 00:44:02 UTC
Created attachment 374096 [details]
Updates rmd_update_image.c to use shmproto.h instead of shmstr.h

Comment 21 Rob Whalley 2009-11-27 00:48:46 UTC
I'm running Fedora 12 64-bit, and had a problem with the make stage as my system could not find shmstr.h as this now seems to have been replaced by shmproto.h - therefore I've attached two patches (forgive me, my knowledge of patch is very basic at this point).

For anyone interested in trying this, I have included instructions below - please correct any mistakes you find!

# Install some dependencies
su -
yum install libICE-devel libSM-devel libXext-devel libXdamage-devel libXfixes-devel libogg-devel libvorbis-devel libtheora-devel jack-audio-connection-kit-devel xorg-x11-proto-devel
exit
# Change the folder below to your own path!
cd /home/rob/Download/Packages/Source
wget http://downloads.sourceforge.net/project/recordmydesktop/recordmydesktop/0.3.8.1/recordmydesktop-0.3.8.1.tar.gz
wget http://downloads.sourceforge.net/project/recordmydesktop/gtk-recordMyDesktop/0.3.8/gtk-recordmydesktop-0.3.8.tar.gz
gzip -d recordmydesktop-0.3.8.1.tar.gz
tar -xvf recordmydesktop-0.3.8.1.tar
gzip -d gtk-recordmydesktop-0.3.8.tar.gz
tar -xvf gtk-recordmydesktop-0.3.8.tar
cd recordmydesktop-0.3.8.1
# Add patch to fix new theora
wget https://bugzilla.redhat.com/attachment.cgi?id=373762 -O sanity.patch
patch -p1 < sanity.patch
# Add patches to change shmstr.h to shmproto.h as in 64-bit Fedora "yum whatprovides *shmstr.h" failed
# See also: http://bugs.gentoo.org/show_bug.cgi?id=291111
wget https://bugzilla.redhat.com/attachment.cgi?id=374095 -O rmd_getzpixmap.patch
wget https://bugzilla.redhat.com/attachment.cgi?id=374096 -O rmd_update_image.patch
patch -p1 < rmd_getzpixmap.patch
patch -p1 < rmd_update_image.patch
./configure
make
su -
# Change the folder below to your own path!
cd /home/rob/Download/Packages/Source/recordmydesktop-0.3.8.1
make install
exit
cd ../gtk-recordmydesktop-0.3.8
./configure
make
su -
cd /home/rob/Download/Packages/Source/gtk-recordmydesktop-0.3.8
make install
exit

Comment 22 Rob Whalley 2009-11-27 00:56:56 UTC
Created attachment 374101 [details]
Fedora 12 64-bit instructions correctly formatted

Comment 23 Rob Whalley 2009-11-27 00:57:12 UTC
Attached above as text file - copy and paste test for above instructions shows that some lines are too long and break onto another line!

Comment 24 Elad Alfassa 2009-11-27 12:22:07 UTC
Rob:
there is another bug opened for this problem: https://bugzilla.redhat.com/show_bug.cgi?id=533531
there is a working patch for this problem attached to that bug.
You should search in the bugzilla before you post a patch.

Comment 25 Rob Whalley 2009-11-27 13:23:31 UTC
Noted.

Comment 26 Till Maas 2010-01-15 09:07:56 UTC
*** Bug 544995 has been marked as a duplicate of this bug. ***

Comment 27 Fedora Update System 2010-01-15 10:22:19 UTC
recordmydesktop-0.3.8.1-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/recordmydesktop-0.3.8.1-4.fc12

Comment 28 Fedora Update System 2010-01-15 10:22:42 UTC
recordmydesktop-0.3.8.1-4.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/recordmydesktop-0.3.8.1-4.fc11

Comment 29 Fedora Update System 2010-01-15 22:08:24 UTC
recordmydesktop-0.3.8.1-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2010-01-15 22:16:42 UTC
recordmydesktop-0.3.8.1-4.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Mohamed M. Hagag 2010-01-16 06:56:58 UTC
i'm using F12 64bit and i can't get this update till now !

i did many things to get this using yum update & yum clean all && yum update.

but the update doesn't get it.

should i wait another day for the mirrors to be synced?

Comment 32 Mohamed M. Hagag 2010-01-16 07:02:51 UTC
i didn't wait for the update process.

after installing this update, the video is running very fast and the sound stops after 1 sec .

Comment 33 Mohamed M. Hagag 2010-01-23 17:00:15 UTC
any update about this issue ?

Comment 34 Kamil Páral 2010-01-25 12:04:38 UTC
Mohamed, the above-mentioned update is available in fedora updates repo and it works well for the issue described. If you experience another problem, please report it as a separate issue and include as many details as possible. Thanks.

Comment 35 Fedora Update System 2010-03-02 01:07:02 UTC
recordmydesktop-0.3.8.1-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 36 Fedora Update System 2010-03-03 02:01:46 UTC
recordmydesktop-0.3.8.1-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 37 Fedora Update System 2010-03-04 00:21:16 UTC
recordmydesktop-0.3.8.1-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 38 Fedora Update System 2010-03-06 03:47:21 UTC
recordmydesktop-0.3.8.1-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.