I’m using ffmpeg to split .flv files without re-encoding but I’m having limited success. For example, in this case:
ffmpeg -i michelle.flv -ss 00:00:00 -t 00:00:02 -vcodec copy -acodec copy michelle2.txt
the file is one minute and 6 seconds long, instead of 2 seconds long.
In this case:
ffmpeg -i michelle.flv -ss 00:00:02 -t 00:00:02 -vcodec copy -acodec copy michelle3.txt
the file is one minute and 8 seconds long, starting at 00:00:02 of the original but with no video from 00:00:00-00:00:02.
Any suggestions?
For reference, I posted the .flv files (input and output) here:
http://drop.io/l92vi42
The ffmpeg command output is here:
$ ffmpeg -i michelle.flv -ss 00:00:00 -t 00:00:02 -vcodec copy -acodec copy michelle2.flv
FFmpeg version SVN-r19159-Sherpya, Copyright (c) 2000-2009 Fabrice Bellard, et al.
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.30. 2 / 52.30. 2
libavformat 52.34. 0 / 52.34. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jun 12 2009 04:25:02, gcc: 4.5.0 20090517 (experimental)
[flv @ 0x2331650]skipping flv packet: type 18, size 294, flags 0
Seems stream 0 codec frame rate differs from container frame rate: 59.99 (14997/250) -> 29.97 (30000/1001)
Input #0, flv, from 'michelle.flv':
Duration: 00:02:55.28, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 854x480 [PAR 1:1 DAR 427:240], 29.97 tbr, 1k tbn, 59.99 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16
Output #0, flv, to 'michelle2.flv':
Stream #0.0: Video: libx264, yuv420p, 854x480 [PAR 1:1 DAR 427:240], q=2-31, 1k tbn, 1k tbc
Stream #0.1: Audio: 0x000a, 44100 Hz, stereo, s16
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 2000 fps= 0 q=-1.0 Lsize= 4616kB time=66.65 bitrate= 567.4kbits/s
video:3749kB audio:780kB global headers:0kB muxing overhead 1.923058%
$ ffmpeg -i michelle.flv -ss 00:00:02 -t 00:00:02 -vcodec copy -acodec copy michelle3.flv
FFmpeg version SVN-r19159-Sherpya, Copyright (c) 2000-2009 Fabrice Bellard, et al.
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.30. 2 / 52.30. 2
libavformat 52.34. 0 / 52.34. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jun 12 2009 04:25:02, gcc: 4.5.0 20090517 (experimental)
[flv @ 0x2e11650]skipping flv packet: type 18, size 294, flags 0
Seems stream 0 codec frame rate differs from container frame rate: 59.99 (14997/250) -> 29.97 (30000/1001)
Input #0, flv, from 'michelle.flv':
Duration: 00:02:55.28, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 854x480 [PAR 1:1 DAR 427:240], 29.97 tbr, 1k tbn, 59.99 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16
Output #0, flv, to 'michelle3.flv':
Stream #0.0: Video: libx264, yuv420p, 854x480 [PAR 1:1 DAR 427:240], q=2-31, 1k tbn, 1k tbc
Stream #0.1: Audio: 0x000a, 44100 Hz, stereo, s16
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 2000 fps= 0 q=-1.0 Lsize= 4791kB time=68.58 bitrate= 572.3kbits/s
video:3900kB audio:802kB global headers:0kB muxing overhead 1.881003%
+ Reply to Thread
Results 1 to 3 of 3
-
-
It's a bug in the FFmpeg version you use (tried it and got 1m 6sec).
Try the latest build from here; http://ffmpeg.arrozcru.org/autobuilds/
With that one I get 2s 33ms.
Similar Threads
-
Problems with splitting AVI in ffmpeg
By avalk in forum ProgrammingReplies: 0Last Post: 14th Feb 2011, 05:13 -
Splitting/cutting FLV
By optofonic in forum EditingReplies: 10Last Post: 16th Oct 2010, 16:28 -
Splitting FLV Videos WITHOUT Compression
By Shadowz O Death in forum EditingReplies: 3Last Post: 18th Apr 2010, 21:00 -
Mux a FLV AVI + MP3 -> FLV with ffmpeg or mencoder?
By Colmino in forum Video ConversionReplies: 9Last Post: 29th Mar 2008, 22:11 -
splitting a flv
By rancid in forum Video ConversionReplies: 1Last Post: 25th Sep 2007, 11:16