Opened 14 years ago

Closed 14 years ago

#158 closed patch (fixed)

Improved MPEG2 -> MPEG2 transcoding and DVD Video

Reported by: Aaron McCarthy <mccarthy.aaron@…> Owned by: jdonavan
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords: MPEG2 DVD
Cc: Ticket locked: no

Description

This patch reimplements the MPEG2trans class in mythtranscode. The output stream is DVD compatible if the resolution etc of the original meets the DVD spec. I have successfully generated DVDs from these files using the second patch attached, which implements a simple DVD burning wizard.

Attachments (7)

mpeg2trans.patch (55.5 KB) - added by Aaron McCarthy <mccarthy.aaron@…> 14 years ago.
improved MPEG2->MPEG2 transcoding patch
dvdwizard.patch (39.1 KB) - added by Aaron McCarthy <mccarthy.aaron@…> 14 years ago.
DVD Authoring Wizard
mpeg2trans_v2.patch (55.1 KB) - added by Aaron McCarthy <mccarthy.aaron@…> 14 years ago.
dvdwizard_v2.patch (38.2 KB) - added by Aaron McCarthy <mccarthy.aaron@…> 14 years ago.
Fixed issue with missing qlayout.h
mpeg2trans_v3.patch (56.6 KB) - added by Aaron McCarthy <mccarthy.aaron@…> 14 years ago.
Add some of the changes from Shane Shrybman
dvdwizard_v3.patch (6.0 KB) - added by Aaron McCarthy <mccarthy.aaron@…> 14 years ago.
Fixed an error in generating the growisofs parameters
dvdwizard_v4.patch (38.2 KB) - added by Aaron McCarthy <mccarthy.aaron@…> 14 years ago.
sorry, must remember to run svn add before svn diff

Download all attachments as: .zip

Change History (15)

Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

Attachment: mpeg2trans.patch added

improved MPEG2->MPEG2 transcoding patch

Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

Attachment: dvdwizard.patch added

DVD Authoring Wizard

comment:1 Changed 14 years ago by anonymous

What version of QT do you need? the dvdwizard.patch is not compiling for me:

dvdwizardpage.cpp: In constructor `DVDWizardPage::DVDWizardPage(DVDWizardData*,

QWidget*, const char*)':

dvdwizardpage.cpp:36: error: invalid use of undefined type `struct QVBoxLayout' /usr/local/qt-x11-free-3.3.3/include/qgroupbox.h:50: error: forward declaration

of `struct QVBoxLayout'

dvdwizardpage.cpp: In constructor `

DVDWizardPageIntro::DVDWizardPageIntro(DVDWizardData*)':

dvdwizardpage.cpp:79: error: `add' undeclared (first use this function) dvdwizardpage.cpp:79: error: (Each undeclared identifier is reported only once

for each function it appears in.)

comment:2 Changed 14 years ago by mccarthy.aaron@…

Qt version 3.3.4 in debian sid.

Try adding a #include <qlayout.h> to the top of the dvdwizardpage.cpp file.

comment:3 Changed 14 years ago by anonymous

Adding #include <qlayout.h> to the top of the dvdwizardpage.cpp file fixed the compile problem. I am using Qt 3.3.3 on FC2.

Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

Attachment: mpeg2trans_v2.patch added

Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

Attachment: dvdwizard_v2.patch added

Fixed issue with missing qlayout.h

comment:4 Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

I've updated the patches to fix the issue with the missing qlayout.h include.

To use the MPEG2 transcoding you will need to add an entry to the recordingprofiles table. Something like

update recordingprofiles set videocodec = "MPEG-2" where name = "MPEG2";

should do it.

comment:5 Changed 14 years ago by hansi.urpils@…

Hi.

i've only applied the mpeg2trans.patch because I don't own a DVD writer yet. I wanted to try it with my recording of taken, but it errored out (see blow for error message). I own a PVR 250 and my recording profile is set to 720x576, 3-6mbit/s (iirc). However, my stream type is not just normal mpeg2 TS or PS, it's a special mode called DVD-special-2. I have no idea what the difference is, but DVD-Special-2 sounds good to me because I'm going to archive my recordings.

2005-08-05 15:23:56.329 "Autodetect" transcode of "Taken" recorded from channel 1006 at Mon Aug 1 20:10:00 2005: Starting. 2005-08-05 15:23:56.686 New DB connection, total: 2 2005-08-05 15:23:56.739 Transcoding from /data/video/1006_20050801201000_2005080 1221000.nuv to /data/video/1006_20050801201000_20050801221000.nuv.tmp [mpeg @ 0x4076e240]Parser not found for Codec Id: 94210 ! 2005-08-05 15:23:57.612 Transcoding aborted, need MPEG-2. Title: Taken [mpeg @ 0x4076e240]Parser not found for Codec Id: 94210 ! dropping unknown stream type 2 Error writing output header 2005-08-05 15:23:57.688 Deleting /data/video/1006_20050801201000_20050801221000. nuv.tmp 2005-08-05 15:23:57.696 "Autodetect" transcode of "Taken" recorded from channel 1006 at Mon Aug 1 20:10:00 2005: Errored.

comment:6 Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

It doesn't look like libavcodec/libavformat knows about Codec Id 94210. The only stream types it supports are MPEG2-video, MPEG2-audio, AC3-audio. Codec 94210 looks like an DVD subtitle stream. This should be silently dropped. Which it looks like it is. It is failing in writing the output header. I don't know why that would be the case. Do you have write permission for the file?

Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

Attachment: mpeg2trans_v3.patch added

Add some of the changes from Shane Shrybman

Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

Attachment: dvdwizard_v3.patch added

Fixed an error in generating the growisofs parameters

comment:7 Changed 14 years ago by jdonavan

Owner: changed from Isaac Richards to jdonavan

Changed 14 years ago by Aaron McCarthy <mccarthy.aaron@…>

Attachment: dvdwizard_v4.patch added

sorry, must remember to run svn add before svn diff

comment:8 Changed 14 years ago by jdonavan

Resolution: fixed
Status: newclosed

(In [7057]) This commit closes #158 by applying a slightly tweaked version of the mpeg2trans_v2.patch contained within.

It reimplements the MPEG2trans class in mythtranscode. The output stream is DVD compatible if the resolution etc of the original meets the DVD spec.

In my testing some of the cuts were slightly off, but that might be due to not having cut on proper keyframe boundries... Most importantly, there were no A/V sync issues after having performed a transcode with the -l parameter.

To use the MPEG2 transcoding you will need to add an entry to the recordingprofiles table. Something like

update recordingprofiles set videocodec = "MPEG-2" where name = "MPEG2";

You can also use "--mpeg2" on the command line for mythtranscode.

Also with this commit, mythtranscode will attempt to retreive a programinfo for a recording if the filename matches Myths format.

The dvdwizard patch will NOT be applied as it relies heavily on Qt based controls. Aaron if you'd like to put together one using Myth controls and the theme engine I'll work with you to get it in.

Note: See TracTickets for help on using tickets.