[FFmpeg-user] Need help splitting files

Tim Hiles thiles at confex.com
Tue Mar 18 01:14:40 CET 2014


Hello all,

Whenever I split video files it creates output files with the correct
duration (start and stop point). However, VLC plays them but there is about
10 seconds of black video at the beginning, ffplay AND windows Media Player
plays them but when it gets to the end of the file you hear a stuttering
sound that goes on infinitely.  And when I try to convert the split files
to an MP4 it fails immediately.

1st note:  I tried this same ffmpeg command on a .mpg file and it plays
fine.  I put the ffprobe info at the bottom of the email in case it's
useful.

2nd note: I tried the split command from a 64 bit version of ffmpeg "FFmpeg
version: 2013-11-18 git-260fc0d" as well and got the same result below.

FFMPEG OUTPUT from split command

c:\ffmpeg\ffmpeg\bin\ffmpeg.exe -i FortWorth5-7WedAfternoon1.mp4 -ss
00:00:11 -to 00:49:24 -c copy "C:\Users\thiles
\Videos\tandem\ARS captures\Fort Worth 5-7\FortWorth5-7WedAfternoon1_1.mp4"
ffmpeg version N-51683-g9dc88ac Copyright (c) 2000-2013 the FFmpeg
developers
  built on Apr  8 2013 21:19:21 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-li
bopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsoxr --enable-libspeex --enable-libtheo
ra --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 25.100 / 52. 25.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 49.101 /  3. 49.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FortWorth5-7WedAfternoon1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2014-02-27 12:09:29
    encoder         : HandBrake 0.9.9 2013052900
  Duration: 01:51:44.44, start: 0.000000, bitrate: 306 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1024x768 [SAR 1:1 DAR 4:3], 139 kb/s, 30 fps, 60
tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2014-02-27 12:09:29
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 159 kb/s
    Metadata:
      creation_time   : 2014-02-27 12:09:29
Output #0, mp4, to 'C:\Users\thiles\Videos\tandem\ARS captures\Fort Worth
5-7\FortWorth5-7WedAfternoon1_1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    encoder         : Lavf55.1.100
    Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
1024x768 [SAR 1:1 DAR 4:3], q=2-31, 139 kb/s, 30 fp
s, 90k tbn, 90k tbc
    Metadata:
      creation_time   : 2014-02-27 12:09:29
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz,
stereo, 159 kb/s
    Metadata:
      creation_time   : 2014-02-27 12:09:29
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=88329 fps=61166 q=-1.0 Lsize=  109486kB time=00:49:13.00 bitrate=
303.7kbits/s
video:48226kB audio:57672kB subtitle:0 global headers:0kB muxing overhead
3.388943%

FFPROBE output of the output file

ffprobe version N-51683-g9dc88ac Copyright (c) 2007-2013 the FFmpeg
developers
  built on Apr  8 2013 21:19:21 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-li
bopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsoxr --enable-libspeex --enable-libtheo
ra --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 25.100 / 52. 25.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 49.101 /  3. 49.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 023bf8a0] max_analyze_duration 5000000 reached
at 5015510 microseconds
[mov,mp4,m4a,3gp,3g2,mj2 @ 023bf8a0] Could not find codec parameters for
stream 0 (Video: h264 (avc1 / 0x31637661), 1024
x768, 134 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\thiles\Videos\tandem\ARS
captures\Fort Worth 5-7\FortWorth5-7WedA
fternoon1_1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.1.100
  Duration: 00:49:13.00, start: 0.006009, bitrate: 303 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), 1024x768, 134 kb/s,
30 fps, 90k tbr, 90k tbn, 180k tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 159 kb/s
    Metadata:
      handler_name    : SoundHandler

OUTPUT WHEN CONVERTING TO MP4

c:\ffmpeg\ffmpeg\bin\ffmpeg.exe -i "C:\Users\thiles\
Videos\tandem\ARS captures\Fort Worth 5-7\FortWorth5-7WedAfternoon1_1.mp4"
-loglevel error -stats -c:v libx264 -qscale:v
 22 -async 1 -c:a  aac -strict experimental
"C:\Users\thiles\Videos\tandem\ARS captures\Fort Worth 5-7\FortWorth5-7
WedAfternoon1_1converted.mp4"
[buffer @ 0417e420] Unable to parse option value "-1" as pixel format
Error opening filters!

FFPROBE OUTPUT OF .MPG FILE when using same command as above:

c:\ffmpeg\ffmpeg\bin\ffmpeg.exe -i part_005.mpg -ss 00:00:11
 -to 00:15:00 -c copy part_005_1.mpg
ffmpeg version N-51683-g9dc88ac Copyright (c) 2000-2013 the FFmpeg
developers
  built on Apr  8 2013 21:19:21 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-li
bopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsoxr --enable-libspeex --enable-libtheo
ra --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 25.100 / 52. 25.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 49.101 /  3. 49.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg @ 003ab900] max_analyze_duration 5000000 reached at 5005000
microseconds
Input #0, mpeg, from 'part_005.mpg':
  Duration: 00:15:43.41, start: 0.360000, bitrate: 2774 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9
DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.
94 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16p, 128 kb/s
Output #0, mpeg, to 'part_005_1.mpg':
  Metadata:
    encoder         : Lavf55.1.100
    Stream #0:0: Video: mpeg2video, yuv420p, 720x480 [SAR 8:9 DAR 4:3],
q=2-31, 29.97 fps, 90k tbn, 29.97 tbc
    Stream #0:1: Audio: mp2, 44100 Hz, stereo, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=26644 fps=11732 q=-1.0 Lsize=  298570kB time=00:14:49.03
bitrate=2751.2kbits/s
video:283166kB audio:13859kB subtitle:0 global headers:0kB muxing overhead
0.520312%


Thanks in advance for any help.  I'm not a novice at ffmpeg, but I'm far
from an expert so please pardon my ignorance if I don't understand your
answer at first.

Tim


More information about the ffmpeg-user mailing list