Method for producing the longitudinal sealed seam and the transverse sealed seam in the production of tubular bags (3") on the film tube running in the direction of passage at a variable tube speed, wherein the longitudinal sealed seam is produced by ultrasonic sealing and - thereby, by changing ultrasonic sealing parameters, the energy input into the film to be sealed is being adapted in real time by means of the sonotrode, wherein the transverse sealed seam is produced by - pressing against each other two transverse sealing elements (4, 5) lying opposite each other with respect to the film tube in a first transverse direction to the direction of passage during a sealing time with a sealing pressure and heating and transverse sealing of the film tube located between them, - wherein the contact surfaces (4a, 5a) of the two transverse sealing elements (4, 5), which are directed towards each other, are moved substantially synchronously along a limited sealing path with the film tube abutted thereto, wherein depending on the changing tube speed, the operating parameters of the sealing elements (4, 5), namely - the sealing time or - the length of the sealing distance are controlled automatically in such a way that the energy input caused during transverse sealing into the transverse sealed seam of the film, which is to be specifically produced, is kept within a predetermined target range. wherein the longitudinal sealed seam is produced by ultrasonic sealing and - thereby, by changing ultrasonic sealing parameters, the energy input into the film to be sealed is being adapted in real time by means of the sonotrode, - thereby, by changing ultrasonic sealing parameters, the energy input into the film to be sealed is being adapted in real time by means of the sonotrode, wherein the transverse sealed seam is produced by - pressing against each other two transverse sealing elements (4, 5) lying opposite each other with respect to the film tube in a first transverse direction to the direction of passage during a sealing time with a sealing pressure and heating and transverse sealing of the film tube located between them, - wherein the contact surfaces (4a, 5a) of the two transverse sealing elements (4, 5), which are directed towards each other, are moved substantially synchronously along a limited sealing path with the film tube abutted thereto, - pressing against each other two transverse sealing elements (4, 5) lying opposite each other with respect to the film tube in a first transverse direction to the direction of passage during a sealing time with a sealing pressure and heating and transverse sealing of the film tube located between them, - wherein the contact surfaces (4a, 5a) of the two transverse sealing elements (4, 5), which are directed towards each other, are moved substantially synchronously along a limited sealing path with the film tube abutted thereto, wherein depending on the changing tube speed, the operating parameters of the sealing elements (4, 5), namely - the sealing time or - the length of the sealing distance - the sealing time or - the length of the sealing distance are controlled automatically in such a way that the energy input caused during transverse sealing into the transverse sealed seam of the film, which is to be specifically produced, is kept within a predetermined target range.