[FFmpeg-trac] #3353(undetermined:new): Transcode to .ts format gives unexpected video start time
FFmpeg
trac at avcodec.org
Mon Jan 27 10:35:37 CET 2014
#3353: Transcode to .ts format gives unexpected video start time
-------------------------------------+-------------------------------------
Reporter: | Type: defect
wdelstrother | Priority: normal
Status: new | Version:
Component: | unspecified
undetermined | Blocked By:
Keywords: ts, | Reproduced by developer: 0
timestamp, start time |
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I am trying to transcode video to .ts format, but the start time on the
output video is always non-zero.
I've generated the input video from a raw video format, so it should have
no start time information. If I transcode to .avi, .flv or .mp4 format,
the reported start time is zero, as expected. However, if I transcode to
.ts format, the start time is (repeatably) 1.43333s.
I've seen this with various files, using various codec, and using the "-f
ssegment -initial_offset" option, and have seen the same problem each
time. For this bug report, to keep things simple, I'm not using any codec
specifications.
ffmpeg pulled from Git development branch, 27th Jan 2014,
(6369766f015f930ea0fc86a2d425fe7fc4f95ed9).
I generated the ts file as follows:
{{{
%ffmpeg -i input_with_zero_start_time.avi -an -y
output_with_nonzero_start_time.ts
ffmpeg version N-60202-g6369766 Copyright (c) 2000-2014 the FFmpeg
developers
built on Jan 27 2014 08:55:15 with gcc 4.6 (Ubuntu/Linaro
4.6.4-1ubuntu1~12.04)
configuration:
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
Input #0, avi, from 'input_with_zero_start_time.avi':
Metadata:
encoder : Lavf55.26.100
Duration: 00:00:05.00, start: 0.000000, bitrate: 484 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46),
yuv420p, 480x270 [SAR 1:1 DAR 16:9], 30 tbr, 30 tbn, 30 tbc
Output #0, mpegts, to 'output_with_nonzero_start_time.ts':
Metadata:
encoder : Lavf55.26.100
Stream #0:0: Video: mpeg2video, yuv420p, 480x270 [SAR 1:1 DAR 16:9],
q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> mpeg2video)
Press [q] to stop, [?] for help
frame= 150 fps=0.0 q=31.0 Lsize= 337kB time=00:00:04.96 bitrate=
556.6kbits/s
video:294kB audio:0kB subtitle:0 global headers:0kB muxing overhead
14.672569%
}}}
Input file information:
{{{
%ffmpeg -v 9 -loglevel 99 -i input_with_zero_start_time.avi
ffmpeg version N-60202-g6369766 Copyright (c) 2000-2014 the FFmpeg
developers
built on Jan 27 2014 08:55:15 with gcc 4.6 (Ubuntu/Linaro
4.6.4-1ubuntu1~12.04)
configuration:
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
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument '99'.
Reading option '-i' ... matched as input file with argument
'input_with_zero_start_time.avi'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file input_with_zero_start_time.avi.
Successfully parsed a group of options.
Opening an input file: input_with_zero_start_time.avi.
[avi @ 0x2310180] Format avi probed with size=2048 and score=100
[avi @ 0x2310800] use odml:1
[avi @ 0x2310180] Before avformat_find_stream_info() pos: 5674 bytes
read:103112 seeks:4
[avi @ 0x2310180] All info found
[avi @ 0x2310180] After avformat_find_stream_info() pos: 24335 bytes
read:103112 seeks:4 frames:1
Input #0, avi, from 'input_with_zero_start_time.avi':
Metadata:
encoder : Lavf55.26.100
Duration: 00:00:05.00, start: 0.000000, bitrate: 484 kb/s
Stream #0:0, 1, 1/30: Video: mpeg4 (Simple Profile) (FMP4 /
0x34504D46), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 1/30, 30 tbr, 30 tbn, 30
tbc
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 0x2318860] Statistics: 103112 bytes read, 4 seeks
}}}
Output file information:
{{{
%ffmpeg -v 9 -loglevel 99 -i output_with_nonzero_start_time.ts
ffmpeg version N-60202-g6369766 Copyright (c) 2000-2014 the FFmpeg
developers
built on Jan 27 2014 08:55:15 with gcc 4.6 (Ubuntu/Linaro
4.6.4-1ubuntu1~12.04)
configuration:
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
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument '99'.
Reading option '-i' ... matched as input file with argument
'output_with_nonzero_start_time.ts'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file output_with_nonzero_start_time.ts.
Successfully parsed a group of options.
Opening an input file: output_with_nonzero_start_time.ts.
[mpegts @ 0x27c7180] Format mpegts probed with size=2048 and score=100
[mpegts @ 0x27c7180] stream=0 stream_type=2 pid=100 prog_reg_desc=
[mpegts @ 0x27c7180] Before avformat_find_stream_info() pos: 0 bytes
read:32768 seeks:0
[mpegts @ 0x27c7180] All programs have pmt, headers found
[mpegts @ 0x27c7180] All info found
[mpegts @ 0x27c7180] After avformat_find_stream_info() pos: 0 bytes
read:345544 seeks:1 frames:21
Input #0, mpegts, from 'output_with_nonzero_start_time.ts':
Duration: 00:00:04.97, start: 1.433333, bitrate: 556 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100], 21, 1/90000: Video: mpeg2video (Main)
([2][0][0][0] / 0x0002), yuv420p(tv), 480x270 [SAR 1:1 DAR 16:9], 1/60,
max. 104857 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 0x27cf8c0] Statistics: 345544 bytes read, 1 seeks
}}}
Note the small change in duration, and very large change in start time.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3353>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list