Am Mittwoch, 8. Oktober 2008 schrieb Manfred Tremmel:
Am Freitag 03 Oktober 2008 schrieb Jan Ritzerfeld:
Hallo Liste!
Irgendwie schaffe ich es mit dem Kaffeine von Packman[0] nicht, Videos einschließlich Ton abzuspielen wenn ich den Ton mp2-codiert habe. Ich erzeuge solche Videos im Prinzip mit folgendem Befehl: mencoder abc.avi -o abc_mp2.avi -ovc lavc -oac lavc
"-oac lavc" ist ein codieren mit der libavcodec.
Genau.
Gibst Du auch -lavcopts mit an, oder lässt Du die Sache einfach mit den Defaultwerten durch.
Um eigene Dummheit möglichst auszuschließen, habe ich es bisher mit den Default-Werten probiert, also genau so (bis auf den Dateinamen) wie oben geschrieben.
Mit dem MPlayer kann ich das Video abspielen, inklusive Ton.
Hm, Mencoder ist Teil von MPlayer, von daher ist das nicht unbedingt verwunderlich.
Das stimmt natürlich. Aber immerhin ist es ein Hinweis, daß der Ton tatsächlich noch da ist und nicht einfach entfernt wurde. :) Der Verdacht ist nicht ganz unbegründet, da mencoder mal locker doppelt so schnell konvertiert, wenn ich den Ton mit lavc mp2-codiere.
Kaffeine hingegen sagt mir unter "Abspielgerät"->"Stück-Info" "Audio: MPEG layer 2/3 0kb/s" gibt aber keinen Ton von sich.
Kaffeine bzw. libxine nutzt zur Decodierung einen eigenen decoder. Das bedeutet, entweder die libavcodec erzeugt kein korrektes mp2 oder der mp2 demuxer kommt mit einer korrekten mp2-Variante nicht zurecht. Da es bei DVB-[CST] keine Probleme gibt, halte ich erstere Variante für wahrscheinlicher.
Mit "-oac twolame" geht es auch mit mp2. Es liegt wohl eher an irgendetwas von lavc, denn tatsächlich funktionieren mit Kaffeine nicht: ... -oac lavc -lavcopts acodec=libmp3lame ... -oac lavc -lavcopts acodec=ac3 ... -oac lavc -lavcopts acodec=vorbis Ich sehe aber leider auch keine Unterschiede zwischen den erzeugten Dateien. Zuerst das taubstumme "-oac lavc": jan@karl:~/Anim> tcprobe -i lavc_mp2.avi [tcprobe] RIFF data, AVI video [avilib] V: 1000.000 fps, codec=FMP4, frames=35484, width=640, height=480 [avilib] A: 44100 Hz, format=0x50, bits=0, channels=2, bitrate=224 kbps, [avilib] 1366 chunks, 999131 bytes, VBR [tcprobe] summary for lavc_mp2.avi, (*) = not default, 0 = not detected import frame size: -g 640x480 [720x576] (*) frame rate: -f 1000.000 [25.000] frc=0 (*) audio track: -a 0 [0] -e 44100,0,2 [48000,16,2] -n 0x50 [0x2000] (*) bitrate=224 kbps length: 35484 frames, frame_time=0 msec, duration=0:00:35.484 Und dann das korrekte "-oac twolame -twolameopts br=224" jan@karl:~/Anim> tcprobe -i twolame_mp2.avi [tcprobe] RIFF data, AVI video [avilib] V: 1000.000 fps, codec=FMP4, frames=35484, width=640, height=480 [avilib] A: 44100 Hz, format=0x50, bits=0, channels=2, bitrate=223 kbps, [avilib] 1366 chunks, 998546 bytes, VBR [tcprobe] summary for twolame_mp2.avi, (*) = not default, 0 = not detected import frame size: -g 640x480 [720x576] (*) frame rate: -f 1000.000 [25.000] frc=0 (*) audio track: -a 0 [0] -e 44100,0,2 [48000,16,2] -n 0x50 [0x2000] (*) bitrate=223 kbps length: 35484 frames, frame_time=0 msec, duration=0:00:35.484 Ich hab also nochmal die xine-gui installiert, um mir die Debug-Ausgaben ansehen zu können. Die Unterschiede sind eigentlich minimal, aber bei der zweiten, funktionierenden Datei meldet sich alsa zu Wort, da es die 44,1 kHz in die 48 kHz umwandeln muß. Bei der ersten Datei fehlen diese Ausgaben komplett. jan@karl:~/Anim> xine --verbose=99 lavc_mp2.avi (...). failed to read 8 bytes at pos 2907542 demux_avi: 35484 frames xine: Demultiplexer-Plugin gefunden: AVI/RIFF demux plugin demux_avi: audio format[0] = 0x50 demux_avi: audio type MPEG layer 2/3 (wFormatTag 0x50) demux_avi: video codec is 'ISO-MPEG4/OpenDivx' audio discontinuity #1, type is 0, disc_off 0 waiting for in_discontinuity update #1 video discontinuity #1, type is 0, disc_off 0 vpts adjusted with prebuffer to 25424 load_plugins: plugin ffmpegvideo will be used for video streamtype 01. ffmpeg_video_dec: Direktausgabe aktiviert load_plugins: plugin mad will be used for audio streamtype 01. av_offset=0 pts spu_offset=0 pts xine_play ao_flush (loop running: 1) start pos is 0, start time is 0 video_pts = 0 audio discontinuity #2, type is 3, disc_off 0 waiting for in_discontinuity update #2 video discontinuity #2, type is 3, disc_off 0 vpts adjusted with prebuffer to 25843 video discontinuity #3, type is 3, disc_off 0 waiting for audio discontinuity #3 audio discontinuity #3, type is 3, disc_off 0 waiting for in_discontinuity update #3 vpts adjusted with prebuffer to 25850 video jump play_internal ...done (...). jan@karl:~/Anim> xine --verbose=99 twolame_mp2.avi (...). failed to read 8 bytes at pos 2907542 demux_avi: 35484 frames xine: Demultiplexer-Plugin gefunden: AVI/RIFF demux plugin demux_avi: audio format[0] = 0x50 demux_avi: audio type MPEG layer 2/3 (wFormatTag 0x50) video discontinuity #1, type is 0, disc_off 0 waiting for audio discontinuity #1 audio discontinuity #1, type is 0, disc_off 0 waiting for in_discontinuity update #1 vpts adjusted with prebuffer to 23000 demux_avi: video codec is 'ISO-MPEG4/OpenDivx' load_plugins: plugin ffmpegvideo will be used for video streamtype 01. load_plugins: plugin mad will be used for audio streamtype 01. ffmpeg_video_dec: Direktausgabe aktiviert av_offset=0 pts spu_offset=0 pts xine_play ao_flush (loop running: 1) start pos is 0, start time is 0 video_pts = 0 audio discontinuity #2, type is 3, disc_off 0 waiting for in_discontinuity update #2 video discontinuity #2, type is 3, disc_off 0 vpts adjusted with prebuffer to 23577 video discontinuity #3, type is 3, disc_off 0 waiting for audio discontinuity #3 audio discontinuity #3, type is 3, disc_off 0 waiting for in_discontinuity update #3 vpts adjusted with prebuffer to 23609 video jump audio_alsa_out: audio rate : 44100 requested, 48000 provided by device/sec audio_alsa_out:open pause_resume=0 output sample rate 48000 will resample audio from 44100 to 48000 audio jump, diff=-2356 play_internal ...done (...). Gruß Jan -- I can understand that the Universe is unfair, but why isn't ever unfair in my favor? -- To unsubscribe, e-mail: opensuse-multimedia-de+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-multimedia-de+help@opensuse.org