def METHOD_NAME(queryset, request):
    """Filter encoded media files."""
    encoded_audios = queryset
    if request.GET.get("video"):
        encoded_audios = encoded_audios.filter(video__id=request.GET.get("video"))
    if request.GET.get("extension"):
        encoded_audios = encoded_audios.filter(
            source_file__iendswith=request.GET.get("extension")
        )
    return encoded_audios