Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#8533 closed task (fixed)

Transcoding does not use filter

Reported by: mrvanes@… Owned by: cpinkham
Priority: minor Milestone: 0.25
Component: MythTV - Mythtranscode Version: Master Head
Severity: low Keywords: transcoding filter
Cc: Ticket locked: no


When using either of the lossy transcoders (set to MPEG4) the filter is ignored. I can easily test this using filter 'invert' which results in a positive transcoded file instead of negative. I would like to use filters to deinterlace my MPEG2 streams before encoding to MPEG4 because the combing eats up a lot of the available bitrate.

Attachments (1)

8533_transcode_filters_v01.diff (650 bytes) - added by cpinkham 11 years ago.
Patch to enable filters during transcoding.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 years ago by mrvanes@…

I forgot to mention the version I'm using: 0.23-fixes (SVN self compiled) on a Debian squeeze base.

comment:2 Changed 11 years ago by robertm

Status: newinfoneeded_new

Are you attempting to use filters in lossless cut mode?

comment:3 Changed 11 years ago by anonymous

Well, I don't know but my intention is to use (and I select) one of the "lossy" methods, that are configured to use mp4 encoding so I would expect the job to be "lossy" and the filters to work if I understand the documentation correct.

comment:4 Changed 11 years ago by robertm

Status: infoneeded_newnew

comment:5 Changed 11 years ago by robertm

Owner: changed from Isaac Richards to cpinkham
Status: newassigned

comment:6 Changed 11 years ago by cpinkham

Milestone: unknown0.24
Version: UnspecifiedTrunk Head

comment:7 Changed 11 years ago by cpinkham

Milestone: 0.240.25
Severity: mediumlow
Type: defecttask

This is actually a feature request and not a bugfix, so unfortunately it is going to have to wait until after 0.24 is released since we are in a Feature Freeze. I can't find anywhere where this feature was present in older code, if it was, please point me at the code. I have a patch which does enable filters during transcoding, but it needs some further testing. I might be able to get this into trunk sometime soon after the 0.24 branch is cut. Leaving the ticket open for now, since I have a patch, even though it's a feature request.

comment:8 Changed 11 years ago by anonymous

With all due respect, but if it's a feature request, what does this wiki describe then?

comment:9 Changed 11 years ago by cpinkham

With all due respect, if you can show me the code, I'll gladly turn it back into a bug and try to fix it prior to 0.24. Myself and one other developer looked at the code and don't see where this was happening in the past and I recall others claiming this was 'broken' prior to this ticket being created.

comment:10 Changed 11 years ago by anonymous

I'm not a code-guru, but what are lines 542 and 563 in mythtranscode.cpp supposed to do?

vidfilters = get_str_option(profile, "transcodefilters");

comment:11 Changed 11 years ago by cpinkham

Setting and using are 2 different things. The above lines of code setup the filters in the old NuppelVideoPlayer?, but those filters have to be used in NVP somewhere and that's the code that doesn't seem to have been hooked up previously. There are questions/complaints on the mailing list dating back to at least 2007 about filters not being applied during transcoding. I think it was a feature that was never fully hooked up. And the people that thought it was working for deinterlacing were actually benefitting from deinterlacing during decoding of the interlaced transcoded material.



videoOutput->ProcessFrame?(buffer, osd, videoFilters, pip_players, ps);

But neither of those appear to be used anywhere related to NuppelVideoPlayer::TranscodeGetNextFrame?() which is what mythtranscode uses to get video frames from NVP.

Again, if you can show me the code, I'm happy to fix, either my replicating the original code or by applying my patch. My patch does seem to work although I believe there are a couple other open tickets being worked on relating to MPEG4 transcoding, and applying the filters seems to tickle one or both of those so it's hard to verify. I'm attaching my patch if you want to use/test it.

Changed 11 years ago by cpinkham

Patch to enable filters during transcoding.

comment:12 Changed 11 years ago by mrvanes@…

Well, then maybe temporarily removing the filter interface widget from transcode setup and updating the wiki documentation would be helpfull for the 0.24 release? I'm not able to help out on the first, but I'd be more than happy to fix the latter...

comment:13 Changed 11 years ago by stuartm

Milestone: 0.25

Milestone 0.25 deleted

comment:14 Changed 10 years ago by Github

Resolution: fixed
Status: assignedclosed

Fix mythtranscode filter use.

The setting for mythranscode filters has existed for a long time, but it doesn't look like it was ever fully hooked up or else it was removed somewhere along the line during a code restructure.

This adds a call to videoFilters->ProcessFrame?() in MythPlayer::TranscodeGetNextFrame?() to process the last decoded frame.

Fixes #8533.

Branch: master Changeset: 9a54edf1d3931bc3e4ea9c8697addb015706f106

comment:15 Changed 10 years ago by mrvanes@…

Thx! Will this eventually trickle down into 0.24-fixes or do I have to wait for 0.25?

Note: See TracTickets for help on using tickets.