stash icon indicating copy to clipboard operation
stash copied to clipboard

[Feature] Support deinterlacing during playback

Open neru2132 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Currently there is no good way of watching interlaced content in Stash even when transcoding the video. While there are a million different deinterlacing options and none of them are perfect, I think it could be nice to provide a basic option that could already cover a lot of bases.

Describe the solution you'd like Make it possible to apply something like the ffmpeg option -filter:v bwdif=mode=send_field:parity=auto:deint=all to the video stream.

Describe alternatives you've considered I can only think of re-encoding the video which would be undesirable in a lot of instances. Not supporting the feature in Stash is, of course, a valid stance.

Additional context I have no idea if something like this is even possible within the Stash architecture, so please feel free to shut it down bluntly.

neru2132 avatar Sep 28 '24 11:09 neru2132

Under transcoding, there's a section for transcode args, if it's not visible enable the advanced toggle and reload. This should address your needs if it also needs to be transcoded (not sure if browsers can even play interlaced video) image

feederbox826 avatar Sep 29 '24 05:09 feederbox826

Thank you for your reply. I didn't know about this feature. I gave it a shot by putting the filter from above in the FFmpeg Live Transcode Output Args. Unfortunately, I'm getting this error:

[transcode] ffmpeg error when running command </usr/bin/ffmpeg -hide_banner -v error -i /media/interlaced.wmv -c:v libx264 -pix_fmt yuv420p -preset veryfast -crf 25 -sc_threshold 0 -movflags frag_keyframe+empty_moov -ac 2 -f mp4 -filter:v bwdif=mode=send_field:parity=auto:deint=all pipe:>: At least one output file must be specified

Running the command locally writes resulting stream into the file pipe with the expected outcome. I'm not quite sure what the problem is.

As far as playback of interlaced video is concerned, the browser doesn't really care about it as long as the video format is supported, but it will present the video raw meaning you will see the lines in all their glory. I understand that this use case would currently be considered an edge case and with the passage of time it might admittedly veer even more into that direction, but it does affect pretty much all raw DVD and many BD streams which might start to matter a little bit more if Stash decides to expand support for movies.

neru2132 avatar Sep 29 '24 12:09 neru2132