Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 4 years ago

Closed 3 years ago

Last modified 3 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

Description

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 4 years ago.
Patch to enable filters during transcoding.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 4 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 4 years ago by robertm

  • Status changed from new to infoneeded_new

Are you attempting to use filters in lossless cut mode?

comment:3 Changed 4 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 4 years ago by robertm

  • Status changed from infoneeded_new to new

comment:5 Changed 4 years ago by robertm

  • Owner changed from ijr to cpinkham
  • Status changed from new to assigned

comment:6 Changed 4 years ago by cpinkham

  • Milestone changed from unknown to 0.24
  • Version changed from Unspecified to Trunk Head

comment:7 Changed 4 years ago by cpinkham

  • Milestone changed from 0.24 to 0.25
  • Severity changed from medium to low
  • Type changed from defect to task

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 4 years ago by anonymous

With all due respect, but if it's a feature request, what does this wiki describe then?
http://www.mythtv.org/wiki/Using_playback_filters#Transcode_Filters

comment:9 Changed 4 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 4 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");
...
nvp->SetVideoFilters(vidfilters);

comment:11 Changed 4 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.

videoFilters->ProcessFrame?(frame);

or

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 4 years ago by cpinkham

Patch to enable filters during transcoding.

comment:12 Changed 4 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 4 years ago by stuartm

  • Milestone 0.25 deleted

Milestone 0.25 deleted

comment:14 Changed 3 years ago by Github

  • Resolution set to fixed
  • Status changed from assigned to closed

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 3 years ago by mrvanes@…

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.