[FFmpeg-user] Issue trimming an AVI

CJ Myers cjandash at gmail.com
Tue Feb 19 01:53:26 CET 2013


I am trying to trim a long AVI file into episodes.  I do not want to
re-encode, so I use the copy feature when I identify the codecs.  I can
successfully get the chunk I want, but it doesn't play properly in WMP or
VLC.  ffplay works fine.

Originally, when I attempted to play the trimmed file, the video and audio
was garbled and unwatchable.  I installed a new codec pack, and that
helped, but didn't fix it.  Now in WMP, the video seems fine, but the audio
doesn't play except for random "clicks"  In VLC, the audio plays along with
the video, but it is MUCH faster than the video.  (It's like listening to
the chipmunks).

When I take the file and upload it to YouTube, it works fine in YouTube!

Here is the command I used:
ffmpeg -i "java 2013-02-09 15-27-08-331.avi" -t 0:38:19.90 -c:v copy -c:a
copy -map 0 Ep1test.avi

(I also tried the above with just -c copy, with identical results)

Here is the output I get when I run the command:
ffmpeg version N-49997-gb9c5448 Copyright (c) 2000-2013 the FFmpeg
developers
  built on Feb 16 2013 02:32:10 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-
libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.101 / 52. 17.101
  libavcodec     54. 91.103 / 54. 91.103
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 37.103 /  3. 37.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[avi @ 000000000030c140] non-interleaved AVI
Input #0, avi, from 'java 2013-02-09 15-27-08-331.avi':
  Metadata:
    encoder         : BandiAviMuxer 1.0
  Duration: 03:01:48.46, start: 0.000000, bitrate: 2694 kb/s
    Stream #0:0: Video: mpeg1video (MPEG / 0x4745504D), yuv420p, 1224x720
[SAR 1:1 DAR 17:10], 104857 kb/s, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p,
160 kb/s
[NULL @ 00000000003301a0] requested bits_per_coded_sample (16) and actually
stored (0) differ
Output #0, avi, to 'Ep1test.avi':
  Metadata:
    ISFT            : Lavf54.63.100
    Stream #0:0: Video: mpeg1video (mpg1 / 0x3167706D), yuv420p, 1224x720
[SAR 1:1 DAR 17:10], q=2-31, 104857 kb/s, 30 tbn, 30 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, 160
kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=68998 fps=2789 q=-1.0 Lsize=  756917kB time=00:38:19.93
bitrate=2696.0kbits/s
video:708103kB audio:44920kB subtitle:0 global headers:0kB muxing overhead
0.517093%

And here is the header info on the source and dest files:
D:\Media\Videos\BandiCam\Minecraft Edited>ffmpeg -i "java 2013-02-09
15-27-08-331.avi"
ffmpeg version N-49997-gb9c5448 Copyright (c) 2000-2013 the FFmpeg
developers
  built on Feb 16 2013 02:32:10 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-
libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.101 / 52. 17.101
  libavcodec     54. 91.103 / 54. 91.103
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 37.103 /  3. 37.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[avi @ 000000000030bd20] non-interleaved AVI
Input #0, avi, from 'java 2013-02-09 15-27-08-331.avi':
  Metadata:
    encoder         : BandiAviMuxer 1.0
  Duration: 03:01:48.46, start: 0.000000, bitrate: 2694 kb/s
    Stream #0:0: Video: mpeg1video (MPEG / 0x4745504D), yuv420p, 1224x720
[SAR 1:1 DAR 17:10], 104857 kb/s, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p,
160 kb/s
At least one output file must be specified

D:\Media\Videos\BandiCam\Minecraft Edited>ffplay -i Ep1test.avi
ffplay version N-49997-gb9c5448 Copyright (c) 2003-2013 the FFmpeg
developers
  built on Feb 16 2013 02:32:10 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-
libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.101 / 52. 17.101
  libavcodec     54. 91.103 / 54. 91.103
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 37.103 /  3. 37.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[avi @ 00000000020932e0] sample size (1) != block align (1152)0KB sq=    0B
f=0/0
[avi @ 00000000020932e0] non-interleaved AVIaq=    0KB vq=    0KB sq=    0B
f=0/0
[mpeg1video @ 00000000020a5340] sequence header damagedvq=    0KB sq=    0B
f=0/0
-922Input #0, avi, from 'Ep1test.avi':=   0 aq=    0KB vq=    0KB sq=    0B
f=0/0
3372  Metadata:
0368    encoder         : 5477Lavf54.63.1005808
.00 A  Duration: -V: 00:38:19.93 0.0, start: 00 f0.000000d=  , bitrate:  0
a2696 kb/sq=
  0KB    Stream #0:0 vq= : Video: mpeg1video (mpg1 / 0x3167706D), yuv420p,
1224x720 [SAR 1:1 DAR 17:10], 104857 kb/s   0, 30 tbrKB s, 30 tbnq=  , 30
tbc  0B
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p,
160 kb/s
[mpeg1video @ 00000000020a5340] sequence header damaged
   1.82 A-V: -0.424 fd=   0 aq=   37KB vq=   12KB sq=    0B f=0/0

Thanks for the help!

~CJ


More information about the ffmpeg-user mailing list