[mythtv] [PATCH] transcoding profiles

Robert Tsai rtsai1111 at comcast.net
Wed Apr 20 02:22:23 UTC 2005

Today, HDTV recordings are limited to either no transcoding, or
transcoding to the parameters in the MPEG2 recording profile. They
aren't encoded at capture time, so there is no subsequent option to
save a configurable amount of disk space.

Attached is a patch to allow the configuration of a fixed number of
transcoding profiles ("High Quality", "Medium Quality", and "Low


	- Upgrade DB schema:

		- The option to automatically transcode a recording
		  has been moved out of the recording profile and into
		  the record (so that the currently-unused
		  "autotranscode" column is now useful).
		  When the database is upgraded, recording schedules
		  using recording profiles with auto-transcode enabled
		  will have auto-transcode carried over.

		- Each record, in addition to a now-used
		  "autotranscode" option, also gets a new "transcoder"
		  option, which defaults to "Autodetect".

		- Delete the now-unused "autotranscode" option from
		  the codecparams table.

		- Provide some fixed transcoders: "High Quality",
		  "Medium Quality", and "Low Quality". Unfortunately,
		  no default values are actually provided, the user
		  must configure their desired values for these
		  transcoders. Also unfortunately, there is no UI to
		  add or remove transcoders (just like there is no UI
		  to add or remove recording profiles). However,
		  transcoders may be added to the database and things
		  should work, if people need more than these three

		- The default transcoder for all recordings is "0"
		  (autodetect) to preserve current behavior.

	- Add some logging to indicate when transcoding is
	  starting/stopping (both to the regular log as well as the
	  database logs).

	- MythFrontend UI changes:

		- Remove "automatically transcode" option from
		  recording profiles; auto-transcode is now a
		  per-recording option (parallel with per-recording
		  recording profiles).

		- Add auto-transcode and transcoder options to each
		  recording schedule, configurable at the time the
		  recording is scheduled. Default values are:
		  	- No auto-transcode.
			- "Autodetect" transcoder.
		  The "Autodetect" transcoder will choose between the
		  "From MPEG4/RTjpeg" and "From MPEG2" transcoders,
		  like it does today. Eventually the choice of
		  transcoder can be made more configuration (e.g.,
		  select transcoder based on 1080i/720p/480i
		  resolution of recording). For now, just preserve

		- Add global settings UI to configure default values
		  for auto-transcode and transcoder, near default
		  values for commflagging and userjobs.

	- MythTranscode changes:

		- Fix a typo in the "help" text. :)

		- Add some output to reflect transcoding parameters.
		  This bit is mostly unnecessary, but can be useful
		  for identifying exactly what is happening for
		  "autodetect" transcoder jobs.

Possible breakage:

	- I'm not exactly sure how the "Live TV" recording profile is
	  used when saving "Live TV" during live TV (is this even
	  possible?). For normally-scheduled recordings that just
	  happen to be configured with the "Live TV" recording
	  profile, things are fine. But I'm unsure of the
	  save-live-TV-on-the-fly implied by this code.
	  See the diff for libs/libmythtv/tv_rec.cpp.

	  If this is broken, let me know and I'll fix it; I would make
	  auto-transcode-saved-live-TV a global option rather than a
	  per-profile option. Other suggestions are welcome.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: myth-dev.diff.bz2
Type: application/octet-stream
Size: 5497 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050419/c0615028/myth-dev.diff.obj

More information about the mythtv-dev mailing list