MARTIN Scorsese's ''GoodFellas'' is a good film, maybe a great film, but it is also difficult to watch at times. At times, it is so brutal you will find yourself looking away. At other times, it is very funny, and you will wonder why you are laughing at a movie with this much brutality.
The new film, which may be the best Scorsese has ever done, is based on ''Wiseguy,'' the book by Nicholas Pileggi, perhaps the nation's foremost authority on the Mafia.
Pileggi's book was based on the experiences of a half-Irish, half-Sicilian mobster who just seemed to fall into it.
The future mobster was born in a neighborhood where the gangster was the big guy and where everyone else treated him with respect. He began as a runner and by the time he was an adult was part of the gangland hierarchy.
There was nothing funny about the book, and the film begins on a very harsh note, the butchery of a rival gang member. A few minutes later, the mood shifts, and we are into a freeze frame with Henry Hill (Ray Liotta) telling us that he always wanted to be a member of the mob.
The film, for a half hour or so, is the chronicling of Hill's early experiences with the mob. You laugh. You shudder, then when the movie is an hour old, you laugh a lot less. At the same time, however, you marvel at the storytelling ability of the director, who also co-wrote the script with Pileggi.
''GoodFellas'' is two-and-one-half hours long, but there isn't one dull moment in it. There are many horrifying moments, but none is dull. Scorsese doesn't allow the film to dull, and those who have watched his movies from the beginning will be amazed by the way the director manages to move his latest. The camera work, for instance, is fluid and swift, just the kind of motion needed for an epic of this sort.
Robert De Niro is in the film. He gets star billing, but this is really Liotta's movie, and not just because he has the bigger role. He also plays it big. Hill is a young man who fell into something because it was glamorous to him, but he was never really a killer. He never ''whacked'' anybody. Others did that, and while he didn't seem to object to all this, his heart wasn't totally with it.
In the end, he went to the FBI and became a federal witness. He also became part of the witness protection program, which was when Pileggi got to know him.
Hill went over to the other side as much for safety as for principle. He and several others had participated in the Lufthansa Airlines robbery, one that was masterminded by James Conway (De Niro), who took care of his partners by ''whacking'' them. Knowing it was only a matter of time before he would be eliminated, Hill went to the law.
''GoodFellas'' proves that Scorsese is one of the best film makers around. You may quarrel with his choice of topic. You may wonder why he doesn't choose to do more positive films about the Italian-American, but then Scorsese is nothing if not honest.
''GoodFellas'' purports to tell the story of 30 years of mob history through the eyes of Hill, and does so. It's all there, the hijacking, the killings, the bribing of the cops, the bribing of the judges and the eventual entry of the mob into drugs.
The story, meanwhile, is given a those-were-the-days treatment, and, of course, that is exactly the way Hill viewed them. Those were the good days to him. He was a big shot. He was treated with respect until he became part of the whacking order.
The mood of the film is underscored by the music Scorsese has chosen. Played very loudly, matching the broadness of the violence that is taking place on the screen, the songs include ''Rags to Riches,'' ''Stardust,'' ''Sincerely,'' ''Roses Are Red,'' ''Leader of the Pack,'' ''Ain't That a Kick in the Head,'' ''Monkey Man'' and ''My Way.''
''GoodFellas'' includes the mandatory wedding scene, but in this instance it is a legitimate part of the texture of the film. The wedding is that of Hill and the Jewish girl he marries. She is brightly played by Lorraine Bracco, and others whose work is of invaluable aid to this film are Joe Pesci as the psycho Tommy DeVito and Paul Sorvino as a senior member of the mob.
Catherine Scorsese, mother of the director, plays the mother to Tommy (Pesci), and appearing as themselves are Henny Youngman and Jerry Vale (singing ''Pretend You Don't See Her'').
Bobby Vinton Jr. plays his father singing ''Roses Are Red.''
''GoodFellas'' is funny-violent, then ugly-violent. It will turn number of people off, but it cannot be denied that Scorsese is a superb film maker, a man who continues to surprise.
''GoodFellas'' opens here today.
*** Thirty years in the life of the Mob as seen through the eyes of one of its members.
CAST: Robert De Niro, Ray Liotta, Joe Pesci, Lorraine Bracco, Paul Sorvino
DIRECTOR: Martin Scorsese
RATING: R (sex, language, violence)
RUNNING TIME: Two hours and 30 minutes