[FFmpeg-trac] #4233(ffmpeg:new): FFmpeg adds 3 frames on reencode with timecode burnin
FFmpeg
trac at avcodec.org
Thu Jan 8 14:15:06 CET 2015
#4233: FFmpeg adds 3 frames on reencode with timecode burnin
------------------------------------+----------------------------------
Reporter: steved | Owner:
Type: defect | Status: new
Priority: normal | Component: ffmpeg
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+----------------------------------
Comment (by steved):
I checked the framerate again and mediainfo and ffprobe are slightly
different. Mediainfo gives 23.976 and ffprobe gives 23.98 as a framerate.
So I re-ran the commands once with ommiting the framerate as below and
still have one frame more then in the source file.
{{{
% ffmpeg -t 15.182 -i "163304323.mp4" -pix_fmt yuv420p -aspect 640/360
-vf
"scale='ceil(iw*sar/2)*2':'ceil(ih/2)*2',pad='max(iw,ih*(640/360))':'ow/(640/360
)':'(ow-iw)/2':'(oh-ih)/2':black,scale=640:360" -c:v libx264 -b:v 1500k
-c:a libfdk_aac -b:a 128k -g 50 -keyint_min 50 -movflags faststart -y
"out.mp4"
}}}
ffprobe:
{{{
% ffprobe out.mp4
ffprobe version N-68933-gad465e7 Copyright (c) 2007-2015 the FFmpeg
developers
built on Jan 7 2015 15:54:46 with gcc 4.4.7 (GCC) 20120313 (Red Hat
4.4.7-11)
configuration: --prefix=/opt/sb4/stage --extra-
cflags=-I/opt/sb4/stage/include --extra-ldflags=-L/opt/sb4/stage/lib
--extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfaac --enable-
libx264 --enable-libfreetype --enable-pthreads --enable-libvpx --enable-
libvorbis --enable-libfdk-aac
libavutil 54. 16.100 / 54. 16.100
libavcodec 56. 20.100 / 56. 20.100
libavformat 56. 18.100 / 56. 18.100
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 6.100 / 5. 6.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.18.100
Duration: 00:00:15.23, start: 0.042667, bitrate: 1599 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
640x360 [SAR 1:1 DAR 16:9], 1465 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
}}}
I also reran the command with 23.98 as the destination framerate and still
have one additional frame:
{{{
% ffmpeg -t 15.182 -i "163304323.mp4" -r 23.98 -pix_fmt yuv420p -aspect
640/360 -vf
"scale='ceil(iw*sar/2)*2':'ceil(ih/2)*2',pad='max(iw,ih*(640/360))':'ow/(640/360
)':'(ow-iw)/2':'(oh-ih)/2':black,scale=640:360" -c:v libx264 -b:v 1500k
-c:a libfdk_aac -b:a 128k -g 50 -keyint_min 50 -movflags faststart -y
"out.mp4"
}}}
{{{
% ffprobe out.mp4
ffprobe version N-68933-gad465e7 Copyright (c) 2007-2015 the FFmpeg
developers
built on Jan 7 2015 15:54:46 with gcc 4.4.7 (GCC) 20120313 (Red Hat
4.4.7-11)
configuration: --prefix=/opt/sb4/stage --extra-
cflags=-I/opt/sb4/stage/include --extra-ldflags=-L/opt/sb4/stage/lib
--extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfaac --enable-
libx264 --enable-libfreetype --enable-pthreads --enable-libvpx --enable-
libvorbis --enable-libfdk-aac
libavutil 54. 16.100 / 54. 16.100
libavcodec 56. 20.100 / 56. 20.100
libavformat 56. 18.100 / 56. 18.100
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 6.100 / 5. 6.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.18.100
Duration: 00:00:15.23, start: 0.042667, bitrate: 1599 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
640x360 [SAR 1:1 DAR 16:9], 1465 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
}}}
It is one additional frame less then with the framerate mediainfo
proposes, but still one additional frame compared to the original.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4233#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list