[FFmpeg-user] cutting iFrame only media

Mohammadtorabi mohammad.torabi at chz.com
Tue Apr 28 19:02:03 CEST 2015


Hi,I have created an iFrame only MXF file by the command below using
FFmpeg:value of -ss and -t is base on nearest iFrame before the mark-in and
after mark-out.[code]ffmpeg -ss 3020.58 -i "input file name.MXF" -t 20.5205
-threads 4 -pix_fmt yuv420p-flags +ildct+ilme -vcodec mpeg2video -top 1 -dc
10 -intra_vlc 1 -qmin 1 -lmin 1*QP2LAMBDA -vtag xd5c -g 0 -rc_max_vbv_use 1
-rc_min_vbv_use 1 -b:v 35000k -bufsize 35000k -minrate 35000k -maxrate
35000k -aspect 16:9 -vf "scale=-1:1080" -r 29.97 -f mxf -y "iFrame Only
output file name.MXF"[/code]the log of running command is below:[code]ffmpeg
version N-71737-gb410c69 Copyright (c) 2000-2015 the FFmpeg developers 
built with gcc 4.9.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-libbs2b --enable-libcaca --enable-libdcadec
--enable-libfreetype --enable-libgme --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-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--enable-decklink --enable-zlib  libavutil      54. 23.101 / 54. 23.101 
libavcodec     56. 35.101 / 56. 35.101  libavformat    56. 31.100 / 56.
31.100  libavdevice    56.  4.100 / 56.  4.100  libavfilter     5. 14.100 / 
5. 14.100  libswscale      3.  1.101 /  3.  1.101  libswresample   1.  1.100
/  1.  1.100  libpostproc    53.  3.100 / 53.  3.100Guessed Channel Layout
for  Input Stream #0.1 : stereoInput #0, mxf, from 'input file name.MXF': 
Metadata:    uid             : adab4424-2f25-4dc7-92ff-29bd000b0000   
generation_uid  : adab4424-2f25-4dc7-92ff-29bd000b0001    company_name    :
FFmpeg    product_name    : OP1a Muxer    product_version : 54.63.104   
product_uid     : adab4424-2f25-4dc7-92ff-29bd000b0002    modification_date:
0000-01-01 00:00:00    material_package_umid:
0x060A2B340101010501010D0013E00EE4529471344CE00EE400529471344CE000   
timecode        : 00:00:00;00  Duration: 01:00:00.03, start: 0.000000,
bitrate: 4592 kb/s    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv,
unknown/bt709/bt709), 1920x1080 [SAR 1:1 DAR 16:9], max. 35000 kb/s, 29.97
fps, 29.97 tbr, 29.97 tbn, 59.94 tbc    Metadata:      file_package_umid:
0x060A2B340101010501010D0013E00EE4529471344CE00EE400529471344CE001    Stream
#0:1: Audio: pcm_s24le, 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s   
Metadata:      file_package_umid:
0x060A2B340101010501010D0013E00EE4529471344CE00EE400529471344CE001[mpeg2video
@ 0000000004edd140] Warning vbv_delay will be set to 0xFFFF (=VBR) as the
specified vbv buffer is too large for the given bitrate!Output #0, mxf, to
'iFrame Only output file name.MXF':  Metadata:    uid             :
adab4424-2f25-4dc7-92ff-29bd000b0000    generation_uid  :
adab4424-2f25-4dc7-92ff-29bd000b0001    company_name    : FFmpeg   
product_name    : OP1a Muxer    product_version : 54.63.104    product_uid    
: adab4424-2f25-4dc7-92ff-29bd000b0002    modification_date: 0000-01-01
00:00:00    material_package_umid:
0x060A2B340101010501010D0013E00EE4529471344CE00EE400529471344CE000   
timecode        : 00:00:00;00    encoder         : Lavf56.31.100    Stream
#0:0: Video: mpeg2video (xd5c / 0x63356478), yuv420p, 1920x1080 [SAR 1:1 DAR
16:9], q=1-31, 35000 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc    Metadata:     
file_package_umid:
0x060A2B340101010501010D0013E00EE4529471344CE00EE400529471344CE001     
encoder         : Lavc56.35.101 mpeg2video    Stream #0:1: Audio: pcm_s16le,
48000 Hz, stereo, s16 (24 bit), 1536 kb/s    Metadata:     
file_package_umid:
0x060A2B340101010501010D0013E00EE4529471344CE00EE400529471344CE001     
encoder         : Lavc56.35.101 pcm_s16leStream mapping:  Stream #0:0 ->
#0:0 (mpeg2video (native) -> mpeg2video (native))  Stream #0:1 -> #0:1
(pcm_s24le (native) -> pcm_s16le (native))Press [q] to stop, [?] for
help[mxf @ 0000000002d98440] -d10_channelcount requires MXF D-10 and will be
ignoredframe=  615 fps=313 q=0.8 Lsize=   91196kB time=00:00:20.52
bitrate=36406.4kbits/svideo:86605kB audio:3848kB subtitle:0kB other
streams:0kB global headers:0kB muxing overhead: 0.822079%[/code]then used
the iFrame only file as input file and the command below to cut a chunk of
it.[code]ffmpeg -ss 0.2002 -i "iFrame Only output file name.MXF" -c:v copy
-t [b]19.9533[/b] -an -f MXF -y "iFrame Only Video_1.MXF"[/code]the log of
the command is:[code]ffmpeg version N-71737-gb410c69 Copyright (c) 2000-2015
the FFmpeg developers  built with gcc 4.9.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-libbs2b
--enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme
--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-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--enable-decklink --enable-zlib  libavutil      54. 23.101 / 54. 23.101 
libavcodec     56. 35.101 / 56. 35.101  libavformat    56. 31.100 / 56.
31.100  libavdevice    56.  4.100 / 56.  4.100  libavfilter     5. 14.100 / 
5. 14.100  libswscale      3.  1.101 /  3.  1.101  libswresample   1.  1.100
/  1.  1.100  libpostproc    53.  3.100 / 53.  3.100Guessed Channel Layout
for  Input Stream #0.1 : stereoInput #0, mxf, from 'iFrame Only output file
name.MXF':  Metadata:    uid             :
adab4424-2f25-4dc7-92ff-29bd000c0000    generation_uid  :
adab4424-2f25-4dc7-92ff-29bd000c0001    company_name    : FFmpeg   
product_name    : OP1a Muxer    product_version : 56.31.100    product_uid    
: adab4424-2f25-4dc7-92ff-29bd000c0002    modification_date: 0000-01-01
00:00:00    material_package_umid:
0x060A2B340101010501010D001346374B529471349946374B0052947134994600   
timecode        : 00:00:00;00  Duration: 00:00:20.52, start: 0.000000,
bitrate: 36406 kb/s    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv),
1920x1080 [SAR 1:1 DAR 16:9], max. 35000 kb/s, 29.97 fps, 29.97 tbr, 29.97
tbn, 59.94 tbc    Metadata:      file_package_umid:
0x060A2B340101010501010D001346374B529471349946374B0052947134994601    Stream
#0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s    Metadata:     
file_package_umid:
0x060A2B340101010501010D001346374B529471349946374B0052947134994601Output #0,
mxf, to 'iFrame Only Video_1.MXF':  Metadata:    uid             :
adab4424-2f25-4dc7-92ff-29bd000c0000    generation_uid  :
adab4424-2f25-4dc7-92ff-29bd000c0001    company_name    : FFmpeg   
product_name    : OP1a Muxer    product_version : 56.31.100    product_uid    
: adab4424-2f25-4dc7-92ff-29bd000c0002    modification_date: 0000-01-01
00:00:00    material_package_umid:
0x060A2B340101010501010D001346374B529471349946374B0052947134994600   
timecode        : 00:00:00;00    encoder         : Lavf56.31.100    Stream
#0:0: Video: mpeg2video, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, max.
35000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc    Metadata:     
file_package_umid:
0x060A2B340101010501010D001346374B529471349946374B0052947134994601Stream
mapping:  Stream #0:0 -> #0:0 (copy)Press [q] to stop, [?] for helpframe= 
600 fps=0.0 q=-1.0 Lsize=   85564kB [b]time=00:00:19.98[/b]
bitrate=35070.5kbits/svideo:84986kB audio:0kB subtitle:0kB other streams:0kB
global headers:0kB muxing overhead: 0.679815%[/code]as you can compare the
command and log, value of -t in command is 19.9533 and time in log is 19.98.
(the log shows that the output is one Frame longer). but when I check the
specs of output by MediaInfo it show that the duration is 20.020 (two frames
longer than the command).any comments or suggestion on why it happens?thanks



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/cutting-iFrame-only-media-tp4670115.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list