Opened 12 years ago
Closed 12 years ago
#1839 closed defect (needs_more_info)
the pts can not copy from transcode orig video file
Reported by: | Steven Liu | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | lingjiujianke@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% ffmpeg -v debug -y -i input.mkv -strict -2 -ss 00:00:10.00 -t 00:00:10.00 -acodec aac -vcodec libx264 -map 0:0 -map 0:1 -pix_fmt yuv420p -b:v 2000k -b:a 192k -ar 44100 -preset ultrafast -vprofile main -vlevel 3.1 -window_size hd720 -v debug -mpegts_copyts 1 -async 1 -f mpegts -bsf h264_mp4toannexb output.ts ffmpeg git-master built on ... I have used the copyts mpegts_copyts, the output.ts start time always from 0s I wish the start time from time -ss the ffprobe -show_packets output.ts is attached who can upload the patch thanks
Attachments (1)
Change History (9)
by , 12 years ago
Attachment: | show_packets added |
---|
follow-up: 2 comment:1 by , 12 years ago
Could you test curent git head? This may be fixed.
If it is still reproducible, please post your command line together with complete, uncut console output.
comment:2 by , 12 years ago
Replying to cehoyos:
Could you test curent git head? This may be fixed.
If it is still reproducible, please post your command line together with complete, uncut console output.
Hi cehoyos,
The problem is always there.
The command line input is :
./ffmpeg -y -ss 00:00:10.00 -t 20 -copyts -i kaka.mkv -strict experimental -acodec aac -vcodec libx264 -r 15 -s 1280x720 -b:v 2000k -b:a 88k -ar 44100 -preset ultrafast -vprofile baseline -vlevel 1.0 -map 0:0 -map 0:1 -bsf h264_mp4toannexb -async 1 -f mpegts test-12.ts
complete output:
frame= 300 fps= 12 q=30.0 Lsize= 6469kB time=00:00:20.01 bitrate=2647.5kbits/s dup=135 drop=96
video:5880kB audio:75kB subtitle:0 global headers:0kB muxing overhead 8.624364%
[libx264 @ 0x1ba80e0] frame I:2 Avg QP:24.50 size:113392
[libx264 @ 0x1ba80e0] frame P:298 Avg QP:18.73 size: 19443
[libx264 @ 0x1ba80e0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x1ba80e0] mb P I16..4: 8.1% 0.0% 0.0% P16..4: 40.5% 0.0% 0.0% 0.0% 0.0% skip:51.4%
[libx264 @ 0x1ba80e0] final ratefactor: 25.67
[libx264 @ 0x1ba80e0] coded y,uvDC,uvAC intra: 36.2% 37.3% 15.9% inter: 20.4% 12.1% 3.9%
[libx264 @ 0x1ba80e0] i16 v,h,dc,p: 34% 24% 26% 16%
[libx264 @ 0x1ba80e0] i8c dc,h,v,p: 52% 19% 22% 8%
[libx264 @ 0x1ba80e0] kb/s:2408.32
But when i use codec copy, the problem have fixed, perhaps i have use error parameters?
Use command follow is no problem:
ffmpeg -y -ss 00:00:10.00 -t 20 -copyts -i kaka.mkv -scodec copy -vcodec copy -acodec copy -bsf h264_mp4toannexb -f mpegts test-12.ts
complete output :
frame= 266 fps=0.0 q=-1.0 Lsize= 23300kB time=00:00:20.01 bitrate=9534.2kbits/s
video:19368kB audio:2018kB subtitle:0 global headers:0kB muxing overhead 8.948324%
I want to transcode change the video codec from other to H264/AVC, not just only copyts.
follow-up: 4 comment:3 by , 12 years ago
To make this a valid ticket, please post the command line you used together with complete, uncut console output (so far you have posted a very small part of the console output).
comment:4 by , 12 years ago
Replying to cehoyos:
To make this a valid ticket, please post the command line you used together with complete, uncut console output (so far you have posted a very small part of the console output).
Hi cehoyos,
command line is :
./ffmpeg -y -ss 00:00:10.00 -t 10 -i kaka.mkv -strict experimental -acodec aac -vcodec libx264 -r 15 -s 1280x720 -b:v 2000k -b:a 88k -ar 44100 -preset ultrafast -vprofile baseline -vlevel 1.0 -map 0:0 -map 0:1 -copyts -bsf h264_mp4toannexb -vsync 1 -f mpegts test-12.ts
console output:
Input #0, matroska,webm, from 'kaka.mkv': Metadata: creation_time : 2009-10-07 15:23:35 Duration: 00:01:02.44, start: 0.000000, bitrate: 13589 kb/s Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x796, SAR 1:1 DAR 480:199, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: title : Transformers.Revenge.of.the.Fallen.2009 Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default) Metadata: title : DTS-HDMA core 1536k Stream #0:2(chi): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s Metadata: title : DD2.0 192K Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, s16, 224 kb/s Metadata: title : DD2.0 224K -t is not an input option, keeping it for the next output; consider fixing your command line. [libx264 @ 0x29bd0e0] using SAR=270/199 [libx264 @ 0x29bd0e0] frame MB size (80x45) > level limit (99) [libx264 @ 0x29bd0e0] DPB size (1 frames, 1382400 bytes) > level limit (0 frames, 152064 bytes) [libx264 @ 0x29bd0e0] MB rate (54000) > level limit (1485) [libx264 @ 0x29bd0e0] using cpu capabilities: none! [libx264 @ 0x29bd0e0] profile Constrained Baseline, level 1.0 Output #0, mpegts, to 'test-12.ts': Metadata: encoder : Lavf54.37.100 Stream #0:0(eng): Video: h264, yuv420p, 1280x720 [SAR 270:199 DAR 480:199], q=-1--1, 2000 kb/s, 90k tbn, 15 tbc (default) Metadata: title : Transformers.Revenge.of.the.Fallen.2009 Stream #0:1(eng): Audio: aac, 44100 Hz, 5.1(side), fltp, 88 kb/s (default) Metadata: title : DTS-HDMA core 1536k Stream mapping: Stream #0:0 -> #0:0 (h264 -> libx264) Stream #0:1 -> #0:1 (dca -> aac) Press [q] to stop, [?] for help [aac @ 0x29adfc0] Que input is backward in time [mpegts @ 0x29bc7c0] st:0 PTS: -70486 DTS: -70486 < -69123 invalid, clipping Que input is backward in timee= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=0 drop=19 [mpegts @ 0x29bc7c0] st:0 PTS: -19400 DTS: -19400 < -18938 invalid, clipping [adts @ 0x30ece20] Encoder did not produce proper pts, making some up. Que input is backward in timeze= 515kB time=00:00:02.00 bitrate=2109.4kbits/s dup=0 drop=40 [mpegts @ 0x29bc7c0] st:0 PTS: 189594 DTS: 189594 < 190099 invalid, clipping Que input is backward in timeze= 977kB time=00:00:03.53 bitrate=2266.2kbits/s dup=0 drop=54 [mpegts @ 0x29bc7c0] st:0 PTS: 330694 DTS: 330694 < 332146 invalid, clipping Que input is backward in timeze= 1245kB time=00:00:04.46 bitrate=2283.9kbits/s dup=0 drop=61 [mpegts @ 0x29bc7c0] st:0 PTS: 407241 DTS: 407241 < 411617 invalid, clipping [mpegts @ 0x29bc7c0] st:0 PTS: 409255 DTS: 409255 < 411618 invalid, clipping [mpegts @ 0x29bc7c0] st:0 PTS: 411227 DTS: 411227 < 411619 invalid, clipping Que input is backward in timeze= 1573kB time=00:00:05.80 bitrate=2221.3kbits/s dup=0 drop=73 [mpegts @ 0x29bc7c0] st:0 PTS: 515800 DTS: 515800 < 518197 invalid, clipping [mpegts @ 0x29bc7c0] st:0 PTS: 517816 DTS: 517816 < 518198 invalid, clipping Que input is backward in timeze= 1883kB time=00:00:06.60 bitrate=2337.6kbits/s dup=0 drop=81 [mpegts @ 0x29bc7c0] st:0 PTS: 587939 DTS: 587939 < 591281 invalid, clipping [mpegts @ 0x29bc7c0] st:0 PTS: 589908 DTS: 589908 < 591282 invalid, clipping Que input is backward in timeze= 2546kB time=00:00:08.66 bitrate=2406.5kbits/s dup=0 drop=99 [mpegts @ 0x29bc7c0] st:0 PTS: 794739 DTS: 794739 < 798140 invalid, clipping [mpegts @ 0x29bc7c0] st:0 PTS: 796708 DTS: 796708 < 798141 invalid, clipping Que input is backward in timeze= 2766kB time=00:00:09.60 bitrate=2360.0kbits/s dup=0 drop=108 [mpegts @ 0x29bc7c0] st:0 PTS: 866751 DTS: 866751 < 869162 invalid, clipping [mpegts @ 0x29bc7c0] st:0 PTS: 868720 DTS: 868720 < 869163 invalid, clipping frame= 150 fps=7.9 q=30.0 Lsize= 2942kB time=00:00:10.00 bitrate=2407.9kbits/s dup=0 drop=111 video:2638kB audio:67kB subtitle:0 global headers:0kB muxing overhead 8.756399% [libx264 @ 0x29bd0e0] frame I:1 Avg QP:23.00 size: 78607 [libx264 @ 0x29bd0e0] frame P:149 Avg QP:27.71 size: 17599 [libx264 @ 0x29bd0e0] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x29bd0e0] mb P I16..4: 14.4% 0.0% 0.0% P16..4: 39.9% 0.0% 0.0% 0.0% 0.0% skip:45.7% [libx264 @ 0x29bd0e0] final ratefactor: 28.14 [libx264 @ 0x29bd0e0] coded y,uvDC,uvAC intra: 32.1% 33.9% 12.2% inter: 21.1% 12.3% 0.8% [libx264 @ 0x29bd0e0] i16 v,h,dc,p: 37% 24% 24% 16% [libx264 @ 0x29bd0e0] i8c dc,h,v,p: 53% 18% 21% 7% [libx264 @ 0x29bd0e0] kb/s:2160.68
When i use command line:
ffmpeg -i test-12.ts
console output :
[mpegts @ 0x278f240] max_analyze_duration 5000000 reached at 5013600 Input #0, mpegts, from 'test-12.ts': Duration: 00:00:10.97, start: 0.362811, bitrate: 2196 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 270:199 DAR 480:199], 15 fps, 15 tbr, 90k tbn, 30 tbc Stream #0:1[0x101](eng): Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, 5.1, s16, 45 kb/s
Thanks
follow-up: 6 comment:5 by , 12 years ago
To make this a valid ticket, please post the command line you used together with complete, uncut console output.
Please do not post a part of the console output, it usually does not help.
comment:6 by , 12 years ago
Replying to cehoyos:
To make this a valid ticket, please post the command line you used together with complete, uncut console output.
Please do not post a part of the console output, it usually does not help.
Hi cehoyos:
I input:
./ffmpeg -y -ss 00:00:10.00 -t 20 -i kaka.mkv -strict experimental -acodec aac -vcodec libx264 -r 15 -s 1280x720 -b:v 2000k -b:a 88k -ar 44100 -preset ultrafast -vprofile baseline -vlevel 1.0 -map 0:0 -map 0:1 -copyts -bsf h264_mp4toannexb -vsync 1 -f mpegts test-12.ts
all the console output:
ffmpeg version N-46881-g45d8537 Copyright (c) 2000-2012 the FFmpeg developers built on Nov 19 2012 17:53:01 with gcc 4.4.4 (GCC) 20100726 (Red Hat 4.4.4-13) configuration: --enable-libx264 --enable-gpl --disable-yasm --libdir=/usr/local/lib --enable-debug --enable-debug=3 --enable-avfilter --disable-stripping libavutil 52. 8.100 / 52. 8.100 libavcodec 54. 73.100 / 54. 73.100 libavformat 54. 37.100 / 54. 37.100 libavdevice 54. 3.100 / 54. 3.100 libavfilter 3. 23.101 / 3. 23.101 libswscale 2. 1.102 / 2. 1.102 libswresample 0. 16.100 / 0. 16.100 libpostproc 52. 2.100 / 52. 2.100 Input #0, matroska,webm, from 'kaka.mkv': Metadata: creation_time : 2009-10-07 15:23:35 Duration: 00:01:02.44, start: 0.000000, bitrate: 13589 kb/s Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x796, SAR 1:1 DAR 480:199, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: title : Transformers.Revenge.of.the.Fallen.2009 Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default) Metadata: title : DTS-HDMA core 1536k Stream #0:2(chi): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s Metadata: title : DD2.0 192K Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, s16, 224 kb/s Metadata: title : DD2.0 224K -t is not an input option, keeping it for the next output; consider fixing your command line. [libx264 @ 0x25480e0] using SAR=270/199 [libx264 @ 0x25480e0] frame MB size (80x45) > level limit (99) [libx264 @ 0x25480e0] DPB size (1 frames, 1382400 bytes) > level limit (0 frames, 152064 bytes) [libx264 @ 0x25480e0] MB rate (54000) > level limit (1485) [libx264 @ 0x25480e0] using cpu capabilities: none! [libx264 @ 0x25480e0] profile Constrained Baseline, level 1.0 Output #0, mpegts, to 'test-12.ts': Metadata: encoder : Lavf54.37.100 Stream #0:0(eng): Video: h264, yuv420p, 1280x720 [SAR 270:199 DAR 480:199], q=-1--1, 2000 kb/s, 90k tbn, 15 tbc (default) Metadata: title : Transformers.Revenge.of.the.Fallen.2009 Stream #0:1(eng): Audio: aac, 44100 Hz, 5.1(side), fltp, 88 kb/s (default) Metadata: title : DTS-HDMA core 1536k Stream mapping: Stream #0:0 -> #0:0 (h264 -> libx264) Stream #0:1 -> #0:1 (dca -> aac) Press [q] to stop, [?] for help [aac @ 0x2538fc0] Que input is backward in time [mpegts @ 0x25477c0] st:0 PTS: -70486 DTS: -70486 < -69123 invalid, clipping Que input is backward in timee= 0kB time=00:00:00.00 bitrate= 0.0kbits/s dup=0 drop=19 [mpegts @ 0x25477c0] st:0 PTS: -19400 DTS: -19400 < -18938 invalid, clipping [adts @ 0x2c77e20] Encoder did not produce proper pts, making some up. Que input is backward in timeze= 515kB time=00:00:02.00 bitrate=2109.4kbits/s dup=0 drop=40 [mpegts @ 0x25477c0] st:0 PTS: 189594 DTS: 189594 < 190099 invalid, clipping Que input is backward in timeze= 950kB time=00:00:03.46 bitrate=2243.9kbits/s dup=0 drop=53 st:0 PTS: 330694 DTS: 330694 < 332146 invalid, clipping3.80 bitrate=2272.2kbits/s dup=0 drop=56 Que input is backward in timeze= 1242kB time=00:00:04.40 bitrate=2313.1kbits/s dup=0 drop=61 [mpegts @ 0x25477c0] st:0 PTS: 407241 DTS: 407241 < 411617 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 409255 DTS: 409255 < 411618 invalid, clipping st:0 PTS: 411227 DTS: 411227 < 411619 invalid, clipping4.66 bitrate=2279.5kbits/s dup=0 drop=63 Que input is backward in timeze= 1573kB time=00:00:05.80 bitrate=2221.3kbits/s dup=0 drop=74 [mpegts @ 0x25477c0] st:0 PTS: 515800 DTS: 515800 < 518197 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 517816 DTS: 517816 < 518198 invalid, clipping Que input is backward in timeze= 1770kB time=00:00:06.40 bitrate=2265.2kbits/s dup=0 drop=79 st:0 PTS: 587939 DTS: 587939 < 591281 invalid, clipping6.66 bitrate=2349.4kbits/s dup=0 drop=82 [mpegts @ 0x25477c0] st:0 PTS: 589908 DTS: 589908 < 591282 invalid, clipping Que input is backward in timeze= 2546kB time=00:00:08.66 bitrate=2406.5kbits/s dup=0 drop=99 [mpegts @ 0x25477c0] st:0 PTS: 794739 DTS: 794739 < 798140 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 796708 DTS: 796708 < 798141 invalid, clipping Que input is backward in timeze= 2766kB time=00:00:09.60 bitrate=2360.0kbits/s dup=0 drop=108 [mpegts @ 0x25477c0] st:0 PTS: 866751 DTS: 866751 < 869162 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 868720 DTS: 868720 < 869163 invalid, clipping Que input is backward in timeze= 2974kB time=00:00:10.20 bitrate=2388.3kbits/s dup=0 drop=113 [mpegts @ 0x25477c0] st:0 PTS: 914878 DTS: 914878 < 917289 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 916847 DTS: 916847 < 917290 invalid, clipping Que input is backward in timeze= 3167kB time=00:00:10.80 bitrate=2402.4kbits/s dup=0 drop=118 [mpegts @ 0x25477c0] st:0 PTS: 970386 DTS: 970386 < 973772 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 972341 DTS: 972341 < 973773 invalid, clipping Que input is backward in timeze= 3592kB time=00:00:12.26 bitrate=2399.1kbits/s dup=0 drop=132 [mpegts @ 0x25477c0] st:0 PTS: 1116671 DTS: 1116671 < 1120058 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 1118688 DTS: 1118688 < 1120059 invalid, clipping Que input is backward in timeze= 4002kB time=00:00:13.73 bitrate=2387.4kbits/s dup=0 drop=145 [mpegts @ 0x25477c0] st:0 PTS: 1242820 DTS: 1242820 < 1243325 invalid, clipping Que input is backward in timeze= 4156kB time=00:00:14.33 bitrate=2375.4kbits/s dup=0 drop=151 [mpegts @ 0x25477c0] st:0 PTS: 1300373 DTS: 1300373 < 1301870 invalid, clipping Que input is backward in timeze= 4634kB time=00:00:16.73 bitrate=2268.9kbits/s dup=0 drop=171 [mpegts @ 0x25477c0] st:0 PTS: 1500190 DTS: 1500190 < 1504521 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 1502159 DTS: 1502159 < 1504522 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 1504069 DTS: 1504069 < 1504523 invalid, clipping Que input is backward in timeze= 5166kB time=00:00:18.60 bitrate=2275.2kbits/s dup=0 drop=189 [mpegts @ 0x25477c0] st:0 PTS: 1682978 DTS: 1682978 < 1686362 invalid, clipping [mpegts @ 0x25477c0] st:0 PTS: 1684992 DTS: 1684992 < 1686363 invalid, clipping frame= 300 fps=8.1 q=29.0 Lsize= 5591kB time=00:00:20.01 bitrate=2288.0kbits/s dup=0 drop=201 video:5011kB audio:129kB subtitle:0 global headers:0kB muxing overhead 8.783942% [libx264 @ 0x25480e0] frame I:2 Avg QP:24.50 size: 81238 [libx264 @ 0x25480e0] frame P:298 Avg QP:28.63 size: 16672 [libx264 @ 0x25480e0] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x25480e0] mb P I16..4: 10.1% 0.0% 0.0% P16..4: 41.5% 0.0% 0.0% 0.0% 0.0% skip:48.4% [libx264 @ 0x25480e0] final ratefactor: 28.51 [libx264 @ 0x25480e0] coded y,uvDC,uvAC intra: 35.5% 36.0% 14.1% inter: 20.4% 10.5% 0.5% [libx264 @ 0x25480e0] i16 v,h,dc,p: 34% 24% 27% 15% [libx264 @ 0x25480e0] i8c dc,h,v,p: 53% 20% 20% 7% [libx264 @ 0x25480e0] kb/s:2052.30
to see the start time
I input:
ffmpeg -i test-12.ts
all the console output:
ffmpeg version N-46881-g45d8537 Copyright (c) 2000-2012 the FFmpeg developers built on Nov 19 2012 17:53:01 with gcc 4.4.4 (GCC) 20100726 (Red Hat 4.4.4-13) configuration: --enable-libx264 --enable-gpl --disable-yasm --libdir=/usr/local/lib --enable-debug --enable-debug=3 --enable-avfilter --disable-stripping libavutil 52. 8.100 / 52. 8.100 libavcodec 54. 73.100 / 54. 73.100 libavformat 54. 37.100 / 54. 37.100 libavdevice 54. 3.100 / 54. 3.100 libavfilter 3. 23.101 / 3. 23.101 libswscale 2. 1.102 / 2. 1.102 libswresample 0. 16.100 / 0. 16.100 libpostproc 52. 2.100 / 52. 2.100 [mpegts @ 0x1f8f240] max_analyze_duration 5000000 reached at 5013600 Input #0, mpegts, from 'test-12.ts': Duration: 00:00:20.97, start: 0.362811, bitrate: 2184 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 270:199 DAR 480:199], 15 fps, 15 tbr, 90k tbn, 30 tbc Stream #0:1[0x101](eng): Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, 5.1, s16, 45 kb/s At least one output file must be specified
All of the console have no other message,
What message can i input?
comment:7 by , 12 years ago
What is wrong with the start time of test-12.ts ?
Afaik, mpeg transport streams are allowed to have arbitrary start times.
comment:8 by , 12 years ago
Component: | FFmpeg → undetermined |
---|---|
Resolution: | → needs_more_info |
Status: | new → closed |
Please reopen this ticket if you can explain what is wrong with the output file test-12.ts
show packets result