[FFmpeg-user] problems with IPB Frames

Guido Holz guido.holz at googlemail.com
Tue Jan 28 16:03:12 CET 2014


The job is to cut quikly out a piece from a big videostream (MTS) and to
stitch this piece with others together. The problem is, that I have many
times no I-frame as my first frame what means that I have some artifacts at
the beginning.

first I cut quick a bigger piece out of the big stream.

\>ffmpeg.exe -ss 00:07:12.0 -i 00005.MTS -vf yadif=1 -r 25 -t 00:00:20.0
-an -y tmp.mp4

after I let run the video 4 seconds to cut after 4 seconds 12 seconds out
of the video (to catch an I-Frame for getting a smooth start of the video)

\>ffmpeg.exe -i tmp.mp4 -ss 00:00:04.0 -t 00:00:12.0 -y out.mp4

I need to convert from mp4 to ts because after I have to concatenate the
videos together

\>ffmpeg.exe -i out.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts -y out.ts

\>ffmpeg -i "concat:out.ts|out.ts" -i  a_sound_file.aac -c copy -bsf:a
aac_adtstoasc -y finish.mp4

the  ouptut of the source-video is

ffmpeg.exe -i 00005.MTS
ffmpeg version N-60202-g6369766 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Jan 27 2014 02:02:32 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264
--enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 49.100 / 55. 49.100
  libavformat    55. 26.100 / 55. 26.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  1.101 /  4.  1.101
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from '00005.MTS':
  Duration: 00:16:31.57, start: 4961.872000, bitrate: 17147 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
fltp, 256 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
0x0090), 1920x1080
At least one output file must be specified


what can I do to get no artifacts?

--


More information about the ffmpeg-user mailing list