Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#11299 closed Patch - Bug Fix (Fixed)

MythArchive 0.26: DVD creation from DVB-T is broken

Reported by: J.Pilk@… Owned by: Stuart Auchterlonie
Priority: minor Milestone: 0.27
Component: MythTV - General Version: 0.26-fixes
Severity: medium Keywords:
Cc: Stuart Auchterlonie Ticket locked: no

Description

When creating a DVD from DVB-T (UK) recordings I have always stripped unwanted streams and commercials before entering MythArchive?. DVD creation then requires no transcoding and is quite quick and reliable.

In 0.26-fixes this is broken, because the name of the mpeg2video codec has changed. A simple workaround is to replace "mpeg2video" by "mpeg2video (main)" at line 4350 of mythburn.py.

The same substitution ought to be made in mythburn.cpp; without it the default transcoder is selected on entry but can be disabled. It is probably needed, too, in two or perhaps three other places in mythburn.py, but I have not yet seen the process with transcoding run to completion. Changing the 'target' to pal-dvd in the encoding profile didn't do it.

Alternatively it might be possible to revert to the pre-0.26 version of the codec name. I haven't investigated that.

Change History (29)

comment:1 Changed 12 years ago by D Lord <d_lord@…>

Hi,

please check, if the following fixes your issue with not being able to generate pal dvd content. I need those tweeks with the latest "0.26.0+fixes20121220-dmo1" debian package of mytharchive.

diff of changes in /usr/share/mythtv/mytharchive/encoder_profiles/fmpeg_dvd_pal.xml

u@here:/usr/share/mythtv/mytharchive/encoder_profiles# diff ffmpeg_dvd_pal.xml ffmpeg_dvd_pal.dist 
11c11
<         <parameter name="-target"      value="pal-dvd"/>
---
>         <parameter name="-target"      value="dvd"/>
32c32
<         <parameter name="-target" value="pal-dvd"/>
---
>         <parameter name="-target" value="dvd"/>
51c51
<         <parameter name="-target" value="pal-dvd"/>
---
>         <parameter name="-target" value="dvd"/>
70c70
<         <parameter name="-target" value="pal-dvd"/>
---
>         <parameter name="-target" value="dvd"/>

diff of changes in /usr/share/mythtv/mytharchive/scripts/mythburn.py

the -newaudio option isn't supported (any more) as it seems.

u@here:/usr/share/mythtv/mytharchive/scripts# diff mythburn.py mythburn.dist
2034c2034
< #        command += " -newaudio" 
---
>         command += " -newaudio" 

comment:2 Changed 12 years ago by J.Pilk@…

Yes. My initial post was to allow the selection of "NONE" as the encoding option. If reencoding is required the mythffmpeg command line as generated does need changing. I posted a "works for me" version in

http://code.mythtv.org/trac/ticket/11297#comment:3

comment:4 Changed 12 years ago by J.Pilk@…

It would improve consistency if Paul's third patch above were to use, in the first instance (which followed my suggestion), a similar form that he used in the second and third: ie change

if string.lower(getVideoCodec(folder)) != "mpeg2video": to

if not string.lower(getVideoCodec(folder)).startswith("mpeg2video"):

Is there any likelihood of these patches, and several others that are outstanding, being committed soon?

comment:5 Changed 12 years ago by Stuart Auchterlonie

Cc: Stuart Auchterlonie added
Milestone: unknown0.27

comment:6 Changed 12 years ago by Stuart Auchterlonie

Owner: set to Stuart Auchterlonie
Status: newassigned

comment:7 Changed 12 years ago by Paul Harrison <mythtv@…>

In 5bd998931ce84a31f462c28fda3c3af243b51777/mythtv:

MythArchive?: update the encoding profiles to work with the current mythffmpeg

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from 5a0e83a20e8f75612b86fb56039b7803a11afd1b)

comment:8 Changed 12 years ago by Paul Harrison <mythtv@…>

In ca24c0c3246e70c16846771bb1480154043059d2/mythtv:

MythArchive?: update mythburn.py to work with the updated encoding profiles

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from a784b93f1d1c6edbc0b47ac578def5d3275171a8)

comment:9 Changed 12 years ago by Paul Harrison <mythtv@…>

In 093bc647f4b8ca0b9e4bb85f2a336d95a734d122/mythtv:

MythArchive?: update mythburn.py to work with the new mpeg2video codec name

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from 13c3035d1fed13a37c42d872b1f8dafb2e6f556f)

comment:10 Changed 12 years ago by Stuart Auchterlonie <stuarta@…>

In 43bb6d9541578631182c54d4d944fc7d94dd8cb6/mythtv:

Make comparisons consistent

Refs #11299

comment:11 Changed 12 years ago by Paul Harrison <mythtv@…>

In e7032fb87bdf4dc839eca7287d01bef3b3ebecbb/mythtv:

MythArchive?: update the encoding profiles to work with the current mythffmpeg

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from 5a0e83a20e8f75612b86fb56039b7803a11afd1b)

comment:12 Changed 12 years ago by Paul Harrison <mythtv@…>

In cd959467836257220e912252883f17951ac8a783/mythtv:

MythArchive?: update mythburn.py to work with the updated encoding profiles

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from a784b93f1d1c6edbc0b47ac578def5d3275171a8)

comment:13 Changed 12 years ago by Paul Harrison <mythtv@…>

In 65fbfbb63a535d333c1202134923f3eea44565ea/mythtv:

MythArchive?: update mythburn.py to work with the new mpeg2video codec name

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from 13c3035d1fed13a37c42d872b1f8dafb2e6f556f)

comment:14 Changed 12 years ago by Stuart Auchterlonie <stuarta@…>

In 6aa99db0b3961ad729a72fe2b8433ff3498972e6/mythtv:

Make comparisons consistent

Refs #11299

comment:15 Changed 12 years ago by Stuart Auchterlonie

Resolution: Fixed
Status: assignedclosed

Resolving as fixed as this is now committed to 0.26-fixes and master

comment:16 in reply to:  4 Changed 12 years ago by paulh <mythtv@…>

Replying to J.Pilk@…:

It would improve consistency if Paul's third patch above were to use, in the first instance (which followed my suggestion), a similar form that he used in the second and third: ie change

if string.lower(getVideoCodec(folder)) != "mpeg2video": to

if not string.lower(getVideoCodec(folder)).startswith("mpeg2video"):

Is there any likelihood of these patches, and several others that are outstanding, being committed soon?

It's my understanding that only MP@ML (Main Profile/Main? Level) mpeg2 files are DVD compatible so looking for "mpeg2video (main)" would be correct would it not since we are looking for mpeg2 files that are already DVD compatible?

In the other two we only care if the file is in mpeg2 file format so we ignore the profile.

comment:17 Changed 12 years ago by J.Pilk@…

Thanks for committing these.

I confess I haven't looked into Paul's Comment 16 and the original form might be more exactly correct. My problem was that I couldn't select 'NONE' as an encoding profile; re-encoding will still be an option. In a single run with the new form of test it has worked for me. The recordings will be demuxed and remuxed later, and I have seen no special problems in playing disks made from DVB-T formats that are not strictly DVD compliant.

comment:18 in reply to:  17 Changed 12 years ago by paulh <mythtv@…>

Replying to J.Pilk@…:

Thanks for committing these.

I confess I haven't looked into Paul's Comment 16 and the original form might be more exactly correct. My problem was that I couldn't select 'NONE' as an encoding profile; re-encoding will still be an option. In a single run with the new form of test it has worked for me. The recordings will be demuxed and remuxed later, and I have seen no special problems in playing disks made from DVB-T formats that are not strictly DVD compliant.

You're talking about the changing the encoding profile on the 'Change Encoding Profile' profile popup in the frontend here is that correct?

Are you saying you couldn't change the profile to 'None' or that once you changed it to 'None' the mythburn.py script then ignored your choice?

The only problem I can see is there is another comparison in MythBurn::getDefaultProfile() that is looking for "mpeg2video" when it should be looking for "mpeg2video (full)" which will mean the encoding profile will always use the default profile even if the file is an mpeg2 which maybe what is causing the confusion here although that wouldn't explain why changing the script fixed it for you. I'm confused time for a drink :)

comment:19 Changed 12 years ago by J.Pilk@…

Both my original workaround, "replace "mpeg2video" by "mpeg2video (main)" at line 4350 of mythburn.py", and the one committed at comment 14 allow me to create a DVD from DVB-T SD (UK) without re-encoding by mythffmpeg. In 0.26 I still have to select 'NONE' by popup menu, whereas in 0.25 that is my default if the recording format is DVD compliant. I would prefer it to be the default for all my SD recordings, but that needs coding outside mythburn.py and I have worked with the popup.

I just thought it would be neater to use the same test throughout mythburn.py. Maybe it goes deeper.

comment:20 in reply to:  19 Changed 12 years ago by paulh <mythtv@…>

Replying to J.Pilk@…:

Both my original workaround, "replace "mpeg2video" by "mpeg2video (main)" at line 4350 of mythburn.py", and the one committed at comment 14 allow me to create a DVD from DVB-T SD (UK) without re-encoding by mythffmpeg. In 0.26 I still have to select 'NONE' by popup menu, whereas in 0.25 that is my default if the recording format is DVD compliant. I would prefer it to be the default for all my SD recordings, but that needs coding outside mythburn.py and I have worked with the popup.

I just thought it would be neater to use the same test throughout mythburn.py. Maybe it goes deeper.

No the drink didn't help that's still clear as mud to me :)

Anyway this fixes what I think is the real problem https://github.com/paul-h/mythtv/commit/a0ee441e5a

IMHO both 6aa99db0b3 and 43bb6d9541 are wrong. It will identify some mpeg2 files as being DVD compatible which aren't.

comment:21 Changed 12 years ago by Paul Harrison <mythtv@…>

In 8e353eec3d1f12e05566565feb2f7fb9f9dbb500/mythtv:

MythArchive?: update mythburn.cpp to work with the new mpeg2video codec name

This fixes a bug where the default encoding profile was always chosen even if
the file was already a DVD compatible mpeg2 file.

Refs #11299

Signed-off-by: Stuart Auchterlonie <stuarta@…>

comment:22 Changed 12 years ago by J.Pilk@…

That looks good. For all of these I was just cautious about testing for exact equality when I didn't know what other forms might be reported, and the 'startswith' version would allow me to try another encoding choice if my first attempt had failed. I didn't know about 'startswith' initially.

Both variants of the mythburn.py patch work for me. I haven't tried the mythburn.cpp patch but am glad to see it committed.

comment:23 Changed 12 years ago by Paul Harrison <mythtv@…>

In 9b5872c77f97f693f36e8e909ca28ee17e7d84b3/mythtv:

MythArchive?: update the encoding profiles to work with the current mythffmpeg

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from 5a0e83a20e8f75612b86fb56039b7803a11afd1b)

comment:24 Changed 12 years ago by Paul Harrison <mythtv@…>

In 4a7667eef841b99d5495899c69d1d50397632c8a/mythtv:

MythArchive?: update mythburn.py to work with the updated encoding profiles

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from a784b93f1d1c6edbc0b47ac578def5d3275171a8)

comment:25 Changed 12 years ago by Paul Harrison <mythtv@…>

In 19bc463915cda0eb5142da35e2c3bc1c4c44631a/mythtv:

MythArchive?: update mythburn.py to work with the new mpeg2video codec name

Refs #11299.

Signed-off-by: Stuart Auchterlonie <stuarta@…>

(cherry picked from 13c3035d1fed13a37c42d872b1f8dafb2e6f556f)

comment:26 Changed 12 years ago by Stuart Auchterlonie <stuarta@…>

In 93f8570507d1b7661607dcd131ec18c77d8ece10/mythtv:

Make comparisons consistent

Refs #11299

comment:27 Changed 12 years ago by Paul Harrison <mythtv@…>

In 4e93cf0695d56d515a3cd44bf6c169dfa6e712f9/mythtv:

MythArchive?: update mythburn.cpp to work with the new mpeg2video codec name

This fixes a bug where the default encoding profile was always chosen even if
the file was already a DVD compatible mpeg2 file.

Refs #11299

Signed-off-by: Stuart Auchterlonie <stuarta@…>

comment:28 Changed 12 years ago by t.brackertz@…

With the new "-target"-options the "-r"-option in the profiles is obsolete and should get removed.

comment:29 Changed 12 years ago by J.Pilk@…

I have just re-read the 'explanation' in Comment 27. That bug still exists; the commits just made it possible to select the 'NONE' option on a per-file basis. SD DVB-T recordings in the uk do not need re-encoding of either video or audio (or, strictly, I have not encountered hardware that would not play a DVD created without re-encoding) and I have never re-encoded outside tests. I would like a non-volatile no-encoding setting, which used to exist. Now running 0.26-fixes.

Note: See TracTickets for help on using tickets.