Je veux concaténer deux fichiers flv (téléchargés sur Youtube.com) avec des outils de ligne de commande Linux.
Le site ffmpeg
tutoriel est trop compliqué, j'ai donc essayé la mencode
tutoriel .
Mais j'obtiens une sortie vide. Je ne sais pas comment résoudre le problème.
ffmpeg -i input_1.flv
ffmpeg version 0.8.1-4:0.8.1-0ubuntu1, Copyright (c) 2000-2011 the Libav developers
built on Mar 22 2012 05:29:10 with gcc 4.6.3
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
[flv @ 0x89faaa0] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (30000/1001)
Input #0, flv, from 'input_1.flv':
Metadata:
starttime : 0
totalduration : 173
totaldatarate : 457
bytelength : 9874241
canseekontime : true
sourcedata : B4A7D6704MH1334385311768958
purl :
pmsg :
Duration: 00:02:52.83, start: 0.000000, bitrate: 459 kb/s
Stream #0.0: Video: h264 (Main), yuv420p, 640x360 [PAR 1:1 DAR 16:9], 360 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 99 kb/s
At least one output file must be specified
ffmpeg -i input_2.flv
ffmpeg version 0.8.1-4:0.8.1-0ubuntu1, Copyright (c) 2000-2011 the Libav developers
built on Mar 22 2012 05:29:10 with gcc 4.6.3
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
[flv @ 0x85b7aa0] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (30000/1001)
Input #0, flv, from 'input_2.flv':
Metadata:
starttime : 0
totalduration : 488
totaldatarate : 254
bytelength : 15467674
canseekontime : true
sourcedata : BADC21903MH1334385484128583
purl :
pmsg :
Duration: 00:08:07.54, start: 0.000000, bitrate: 250 kb/s
Stream #0.0: Video: h264 (Main), yuv420p, 640x360 [PAR 1:1 DAR 16:9], 151 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 99 kb/s
At least one output file must be specified
mencoder -of lavf -oac copy -ovc copy -o output.flv input_1.flv input_2.flv
MEncoder svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
success: format: 0 data: 0x0 - 0x96ab41
libavformat version 53.21.0 (external)
Mismatching header version 53.19.0
libavformat file format detected.
[flv @ 0xb6b09d80]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO: [H264] 640x360 0bpp 29.970 fps 360.0 kbps (43.9 kbyte/s)
[V] filefmt:44 fourcc:0x34363248 size:640x360 fps:29.970 ftime:=0.0334
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can 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.
videocodec: framecopy (640x360 0bpp fourcc=34363248)
Audio format 0x4134504d is incompatible with '-oac copy', please try '-oac pcm' instead or use '-fafmttag' to override it.
Exiting...
mencoder -of lavf -oac pcm -ovc copy -o output.flv input_1.flv input_2.flv
MEncoder svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
success: format: 0 data: 0x0 - 0x96ab41
libavformat version 53.21.0 (external)
Mismatching header version 53.19.0
libavformat file format detected.
[flv @ 0xb6bb6d80]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO: [H264] 640x360 0bpp 29.970 fps 360.0 kbps (43.9 kbyte/s)
[V] filefmt:44 fourcc:0x34363248 size:640x360 fps:29.970 ftime:=0.0334
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
AUDIO: 44100 Hz, 2 ch, s16le, 99.0 kbit/7.02% (ratio: 12376->176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can 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.
videocodec: framecopy (640x360 0bpp fourcc=34363248)
VIDEO CODEC ID: 28
AUDIO CODEC ID: 2e, TAG: 0
Writing header...
[flv @ 0xb6bb6d80]Codec for stream 0 does not use global headers but container format requires global headers
[flv @ 0xb6bb6d80]Codec for stream 1 does not use global headers but container format requires global headers
[NULL @ 0xb6472380]codec not compatible with flv
Floating point exception (core dumped)
stat output.flv
File: `output.flv'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 700h/1792d Inode: 1722857 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ kev) Gid: ( 1000/ kev)
Access: 2012-05-04 10:44:45.153319669 +0800
Modify: 2012-05-04 10:44:45.153319669 +0800
Change: 2012-05-04 10:44:45.153319669 +0800
Birth: -