Movie about 2 kids finding a magician trapped in a pen

Movie is definitely older than 7 years ( probably even more than that). Two kids, a boy and a girl, siblings or probably friends, go to an old mansion where they find many interesting things. They find a retractable sword (the kind used by circus performers when they swallow swords) and a fountain pen (or similarly shaped object) that has a see-through top with a person inside.If I remember correctly he got trapped inside it during his last magic show and stayed trapped until they found him. Somehow they manage to free him, and it turns out he used to be a big performer back in the day but now since they freed him he wants to help them as a way of thanking them. The magician wears a distinct suit (maybe red, very like the matador outfits or 18th century naval officers) and wears the sword with him.
Since he is from a different time he acts and bahaves differently which is what a lot of the movie is about.

Thanks :slight_smile:

Danish film, Fakiren fra Bilbao. Magician in the pen is seen on the trailer around 1:15

Thank you so much!!!