tux-admin.de

Valid CSS! Valid HTML 4.01 Transitional

* The ffmpeg program has been deprecated and replaced with avconv.
The ffmpeg program is only provided for compatibility purposes and
will be removed in a future release. For a list of the
incompatible changes between the two programs, see
/usr/share/doc/ffmpeg/changelog.gz.

Ich bastel mir ein Video für meine Webseiten

$Id: bunte_bewegte_bilder_fuers_web.html,v 1.2 2007-12-02 13:23:09 andreas Exp $

Spielereien mit meiner OLYMPUS C-220

Umwandlung von Quicktime-Format in Macromedia Fash Video Fomart mittels mencoder
Video in Einzelbilder zerlegen
Logo in Einzelbilder einfügen
Einzelbilder zu Video zusammensetzen
Videos zusammenfügen
Ton zu Video hinzufügen
Das Ergebnis

Die OLYMPUS C-220 kann kleine Videos aufnehmen:
Playing /bilder/bilder.2007/20070408.1/p4080092.mov.
Quicktime/MOV file format detected.
ID_VIDEO_ID=0
VIDEO:  [jpeg]  320x240  24bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=/bilder/bilder.2007/20070408.1/p4080092.mov
ID_DEMUXER=mov
ID_VIDEO_FORMAT=jpeg
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=320
ID_VIDEO_HEIGHT=240
ID_VIDEO_FPS=15.000
ID_VIDEO_ASPECT=0.0000
ID_LENGTH=15.00

Nach dem Kauf unserer Alleweder habe ich einige Filmchen aufgenommen.
Natürlich wollte ich die auch auf unsere Alleweder Webseite der Menschheit zur Verfügung stellen. Dazu war die Umwandlung der Dateien aus dem Quicktime/MOV file format in das Macromedia Flash Video Format nötig, um die Filme auf Webseiten mit Hilfe des Flash-Video-Player flvplayer.swf (s. deine favorisierte Suchmaschine) darstellen zu können.

Umwandlung von Quicktime-Format in Macromedia Fash Video Fomart mittels mencoder


[andreas@marsu 100_1407]  mencoder p4270010.mov -o aaa.flv \
-ovc lavc -lavcopts vcodec=flv \
-of lavf \
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames
MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x2ed360
Quicktime/MOV file format detected.
VIDEO:  [jpeg]  320x240  24bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7  fourcc:0x6765706A  size:320x240  fps:15.00  ftime:=0.0667
** MUXER_LAVF *****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 320 x 240 (preferred colorspace: Planar 422P)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar 422P as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 0x8412910]SwScaler: BICUBIC scaler, from yuv422p to yuv420p using MMX2
[swscaler @ 0x8412910]SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0x8412910]SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0x8412910]SwScaler: using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0x8412910]SwScaler: 320x240 -> 320x240
videocodec: libavcodec (320x240 fourcc=31564c46 [FLV1])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
VIDEO CODEC ID: 22
Writing header...
[mjpeg @ 0xb7683ba8]huffman table decode errorn   0mb  A-V:0.000 [1223:0]
Error while decoding frame!
Pos:   3.5s     54f ( 0%) 14.82fps Trem:   0min   0mb  A-V:0.000 [1206:0]
1 duplicate frame(s)!
[mjpeg @ 0xb7683ba8]huffman table decode errorn   0mb  A-V:0.000 [1023:0]
Error while decoding frame!
Pos:   5.7s     87f ( 0%) 15.60fps Trem:   0min   0mb  A-V:0.000 [1023:0]
1 duplicate frame(s)!
Pos:  15.0s    225f ( 0%) 16.45fps Trem:   0min   0mb  A-V:0.000 [887:0]]
Flushing video frames.
Writing index...

Video stream:  887.193 kbit/s  (110899 B/s)  size: 1663487 bytes  15.000 secs  225 frames
[andreas@marsu 100_1407] file aaa.flv
aaa.flv: Macromedia Flash Video
[andreas@marsu 100_1407] 

Video in Einzelbilder zerlegen

[andreas@marsu tmp] mplayer -vo png p4270010.mov
MPlayer 1.0rc1-4.1.2-DFSG-free (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing p4270010.mov.
Quicktime/MOV file format detected.
VIDEO:  [jpeg]  320x240  24bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar 422P)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar 422P as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: using unscaled yuv422p -> bgr24 special converter
VO: [png] 320x240 => 320x240 BGR 24-bit
[VO_PNG] Warning: compression level set to 0, compression disabled!
[VO_PNG] Info: Use -vo png:z=<n> to set compression level from 0 to 9.
[VO_PNG] Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression)
V:  14.9 225/225 18% 185%  0.0% 0 0

Exiting... (End of file)

Logo in Einzelbilder einfügen

[andreas@marsu imagemagick] composite -verbose -compose atop \
-geometry +10+10 alleweder.net.schriftzug.png 00000211.png neu.png

alleweder.net.schriftzug.png PNG 146x34 146x34+0+0 DirectClass 6kb
00000211.png PNG 320x240 320x240+0+0 DirectClass 226kb
alleweder.net.schriftzug.png PNG 146x34 146x34+0+0 DirectClass 6kb
00000211.png[1] PNG 320x240 320x240+0+0 DirectClass 226kb 0.190u 0:02
00000211.png=>neu.png[1] PNG 320x240 320x240+0+0 DirectClass 213kb 0.730u 0:02
Natürlich in einer Schleife für alle Bilder des Videos.

Einzelbilder zu Video zusammensetzen

[andreas@marsu 100_1407] mencoder "mf://neu.000*.jpg" -mf fps=15 \
        -o testi3.flv -ovc lavc -lavcopts vcodec=flv -of lavf  \
        -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 16  data: 0x0 - 0x0
MF file format detected.
[mf] search expr: neu.000*.jpg
[mf] number of files: 225 (900)
[demux_mf] file type was not set! trying 'type=jpg'...
VIDEO:  [IJPG]  0x0  24bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16  fourcc:0x47504A49  size:0x0  fps:15.00  ftime:=0.0667
** MUXER_LAVF *****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 3)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (320x240 fourcc=31564c46 [FLV1])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
VIDEO CODEC ID: 22
Writing header...
Pos:  15.0s    225f (100%) 15.48fps Trem:   0min   1mb  A-V:0.000 [906:0]
Flushing video frames.
Writing index...

Video stream:  906.010 kbit/s  (113251 B/s)  size: 1698769 bytes  15.000 secs  225 frames

[andreas@marsu 100_1407] file testi3.flv
testi3.flv: Macromedia Flash Video

Videos zusammenfügen

[andreas@marsu 100_1407] mencoder testi2.flv abspann.flv \
        -oac copy -ovc copy -ovc lavc \
        -lavcopts vcodec=flv -of lavf \
        -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \
        -o ta.flv

MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x76b71
libavformat file format detected.
VIDEO:  [FLV1]  320x240  0bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:35  fourcc:0x31564C46  size:320x240  fps:15.00  ftime:=0.0667
** MUXER_LAVF *****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
==========================================================================
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (320x240 fourcc=31564c46 [FLV1])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
VIDEO CODEC ID: 22
Writing header...
success: format: 0  data: 0x0 - 0x38290m:   0min   0mb  A-V:0.000 [904:0]
AVI file format detected.
AVI: No audio stream found -> no sound.
VIDEO:  [FLV1]  320x240  0bpp  15.000 fps  353.8 kbps (43.2 kbyte/s)
[V] filefmt:3  fourcc:0x31564C46  size:320x240  fps:15.00  ftime:=0.0667
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
==========================================================================
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
Pos:  14.1s    212f (99%) 24.99fps Trem:   0min   1mb  A-V:0.000 [707:0]
Flushing video frames.
Writing index...

Video stream:  707.950 kbit/s  (88493 B/s)  size: 1250712 bytes  14.133 secs  212 frames
[andreas@marsu 100_1407] file ta.flv
ta.flv: Macromedia Flash Video

Ton zu Video hinzufügen

[andreas@marsu 100_1407] mencoder ta.flv -ovc lavc \
        -lavcopts vcodec=flv -of lavf  \
        -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \
        -oac mp3lame -audiofile inside.ogg -o ta_ton.flv

MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x1339f0
libavformat file format detected.
VIDEO:  [FLV1]  320x240  0bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
[Ogg] stream 0: audio (Vorbis), -aid 0
Ogg file format detected.
[V] filefmt:65536  fourcc:0x31564C46  size:320x240  fps:15.00  ftime:=0.0667
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 112.0 kbit/7.94% (ratio: 14000->176400)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
** MUXER_LAVF *****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
==========================================================================
MP3 audio selected.
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (320x240 fourcc=31564c46 [FLV1])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
VIDEO CODEC ID: 22
AUDIO CODEC ID: 15001, TAG: 0
Writing header...
Pos:   3.1s     47f (20%)  8.94fps Trem:   0min   2mb  A-V:0.133 [1029:169]
Skipping frame!
[flv @ 0xb717b110]skipping flv packet: type 106, size 12636735, flags 087]]

Flushing video frames.
Writing index...

Video stream:  705.235 kbit/s  (88154 B/s)  size: 1240038 bytes  14.067 secs  212 frames

Audio stream:  188.209 kbit/s  (23526 B/s)  size: 342925 bytes  14.576 secs
[andreas@marsu 100_1407] file ta_ton.flv
ta_ton.flv: Macromedia Flash Video

Das Ergebnis

Alleweder 2 (mit Ton)

(2.5 MB)
Musik: OpenMusic

Artist: Maxwell Strait
Song: inside (OGG-Vorbis format, 3,1 MB)
License: Green OpenMusic License