By means of high-sensitivity capacitance torque magnetometers we have measured the superconducting current j(s) and the dynamic magnetic-moment relaxation of YBa2Cu3O7 and YBa2Cu4O8 films of typically 100 nm thickness at temperatures between 2 K and T-c in magnetic fields up to 6 T. For the measurements of the dynamic relaxation rate Q = dlnj(s)/dln(dB(e)/dt) magnetic-field sweep rates were varied between 0.5 and 40 mT/s. At low fields (typically 0.5 T) the dynamical relaxation rate exhibits a plateau at Q approximate to 0.06 in YBa2Cu3O7 and 0.04 in YBa2Cu4O8. At high fields (B-e = mu(0)H(e) approximate to 6 T) the plateaus have completely disappeared and Q increases almost linearly with increasing temperature. At all fields a sharp increase up to Q congruent to 1 is observed when the irreversibility line is approached. By means of the generalized inversion scheme (GIS), the j(s)(T, B-e) and and(T, B-e) data are used to determine the current dependent activation energy U(j, T, B-e) for thermally activated flux creep. Although the GIS does not make any a priori assumptions about the explicit functional dependences on T and j, the U(j, T = O, B-e) function derived from the experimental data by means of the GIS can remarkably well be described with the collective-creep interpolation formula U(j) = (U-c/mu)[ (j(c)/j)(mu)-1] with mu approximate to 0.6 for currents j > 0.15j(c)(T = 0, B-e) where j(c)(T = 0, B-e) is the critical current at T = 0, and with U-c depending on B-e. At lower current densities U(j, T = 0, B-e) does not diverge as j(-0.6) but shifts gradually to a weaker 1n(j(c)/j) dependence. At low temperatures the current and relaxation data cannot be explained in terms of a thermally activated flux-motion model. Quantum creep has an influence up to similar to 13 K.