[FFmpeg-user] can not clip/trim some files made by ffmpeg same version

S Andreason sandreas41 at gmail.com
Fri Jan 23 00:44:44 CET 2015


After starting with a raw camera file, after I process it by resizing 
and/or cropping etc, using the h264 codec, When I later try to use that 
output file as an input file for further processing, (intending to trim 
the length and starting time) it gives an error and drops the video stream.

Two output logs to show how I can reproduce this bug. Watch the 
beginning and ending tbc and tbn.
Step 1, resize:

ffmpeg version N-68814-gc6bb651 Copyright (c) 2000-2014 the FFmpeg 
developers
   built on Jan  2 2015 12:09:28 with gcc 4.9.1 (GCC)
   configuration: --enable-gpl --enable-libx264 --disable-doc 
--disable-htmlpages --disable-podpages --disable-ffserver 
--disable-network --enable-libfreetype --enable-libfontconfig
   libavutil      54. 16.100 / 54. 16.100
   libavcodec     56. 19.100 / 56. 19.100
   libavformat    56. 16.102 / 56. 16.102
   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
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 
'20150112_0958_rec_5310.MOV'.
Reading option '-c:v' ... matched as option 'c' (codec name) with 
argument 'h264'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or 
abbreviation)) with argument '960x540'.
Reading option '-c:a' ... matched as option 'c' (codec name) with 
argument 'copy'.
Reading option '20150112_0958_rec_5310-h960x540.mov' ... matched as 
output file.
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 20150112_0958_rec_5310.MOV.
Successfully parsed a group of options.
Opening an input file: 20150112_0958_rec_5310.MOV.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] Format mov,mp4,m4a,3gp,3g2,mj2 
probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] ISO: File Type Major Brand: qt
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] Before avformat_find_stream_info() 
pos: 147048059 bytes read:83571 seeks:2
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] After avformat_find_stream_info() 
pos: 2689024 bytes read:2536703 seeks:4 frames:31
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20150112_0958_rec_5310.MOV':
   Metadata:
     major_brand     : qt
     minor_version   : 0
     compatible_brands: qt
     creation_time   : 2015-01-12 09:58:08
     original_format : DVR-CD
     original_format-eng: DVR-CD
     comment         : HDDVR-Mobius
     comment-eng     : HDDVR-Mobius
   Duration: 00:01:04.00, start: 0.000000, bitrate: 18381 kb/s
     Stream #0:0(eng), 30, 1/30000: Video: h264 (High) (avc1 / 
0x31637661), yuv420p(left), 1920x1080 (1920x1088), 1/60000, 17680 kb/s, 
30 fps, 30 tbr, 30k tbn, 60k tbc (default)
     Metadata:
       creation_time   : 2015-01-12 09:58:08
       handler_name    : DataHandler
       encoder         : h264
     Stream #0:1(eng), 1, 1/32000: Audio: pcm_s16le (sowt / 0x74776F73), 
32000 Hz, 1 channels, s16, 512 kb/s (default)
     Metadata:
       creation_time   : 2015-01-12 09:58:08
       handler_name    : DataHandler
Successfully opened the file.
Parsing a group of options: output file 20150112_0958_rec_5310-h960x540.mov.
Applying option c:v (codec name) with argument h264.
Applying option s (set frame size (WxH or abbreviation)) with argument 
960x540.
Applying option c:a (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: 20150112_0958_rec_5310-h960x540.mov.
Matched encoder 'libx264' for codec 'h264'.
Successfully opened the file.
detected 1 logical cores
[graph 0 input from stream 0:0 @ 0x93bb420] Setting 'video_size' to 
value '1920x1080'
[graph 0 input from stream 0:0 @ 0x93bb420] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x93bb420] Setting 'time_base' to value 
'1/30000'
[graph 0 input from stream 0:0 @ 0x93bb420] Setting 'pixel_aspect' to 
value '0/1'
[graph 0 input from stream 0:0 @ 0x93bb420] Setting 'sws_param' to value 
'flags=2'
[graph 0 input from stream 0:0 @ 0x93bb420] Setting 'frame_rate' to 
value '30/1'
[graph 0 input from stream 0:0 @ 0x93bb420] w:1920 h:1080 pixfmt:yuv420p 
tb:1/30000 fr:30/1 sar:0/1 sws_param:flags=2
[scaler for output stream 0:0 @ 0x93b3920] Setting 'w' to value '960'
[scaler for output stream 0:0 @ 0x93b3920] Setting 'h' to value '540'
[scaler for output stream 0:0 @ 0x93b3920] Setting 'flags' to value '0x4'
[scaler for output stream 0:0 @ 0x93b3920] w:960 h:540 flags:'0x4' interl:0
[format @ 0x93bb640] compat: called with 
args=[yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16]
[format @ 0x93bb640] Setting 'pix_fmts' to value 
'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16'
[AVFilterGraph @ 0x93b3f40] query_formats: 5 queried, 4 merged, 0 
already done, 0 delayed
[scaler for output stream 0:0 @ 0x93b3920] w:1920 h:1080 fmt:yuv420p 
sar:0/1 -> w:960 h:540 fmt:yuv420p sar:0/1 flags:0x4
[libx264 @ 0x93d9080] using cpu capabilities: MMX2 SSE SlowCTZ
[libx264 @ 0x93d9080] profile High, level 3.1
[libx264 @ 0x93d9080] 264 - core 142 r2479 dd79a61 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - 
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf 
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 
aq=1:1.00
Output #0, mov, to '20150112_0958_rec_5310-h960x540.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 0
     compatible_brands: qt
     comment-eng     : HDDVR-Mobius
     original_format : DVR-CD
     original_format-eng: DVR-CD
     comment         : HDDVR-Mobius
     encoder         : Lavf56.16.102
     Stream #0:0(eng), 0, 1/15360: Video: h264 (libx264) (avc1 / 
0x31637661), yuv420p(left), 960x540, 1/30, q=-1--1, 30 fps, 15360 tbn, 
30 tbc (default)
     Metadata:
       creation_time   : 2015-01-12 09:58:08
       handler_name    : DataHandler
       encoder         : Lavc56.19.100 libx264
     Stream #0:1(eng), 0, 1/32000: Audio: pcm_s16le (sowt / 0x74776F73), 
32000 Hz, mono, 512 kb/s (default)
     Metadata:
       creation_time   : 2015-01-12 09:58:08
       handler_name    : DataHandler
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=    7 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A 
    frame=   15 fps= 14 q=0.0 size=       0kB time=00:00:00.00 
bitrate=N/A     frame=   26 fps= 17 q=0.0 size=       0kB 
time=00:00:00.00 bitrate=N/A     frame=   35 fps= 17 q=0.0 size= 
0kB time=00:00:01.00 bitrate=   0.3kbits/s     [libx264 @ 0x93d9080] 
frame=   0 QP=22.95 NAL=3 Slice:I Poc:0   I:2040 P:0    SKIP:0 
size=56288 bytes
[libx264 @ 0x93d9080] frame=   1 QP=22.89 NAL=2 Slice:P Poc:8   I:54 
P:1467 SKIP:519  size=12943 bytes
frame=   43 fps= 14 q=29.0 size=      68kB time=00:00:01.00 bitrate= 
559.7kbits/s     [libx264 @ 0x93d9080] frame=   2 QP=25.39 NAL=2 Slice:B 
Poc:4   I:9    P:1031 SKIP:980  size=1861 bytes

[clipping 284Kb of unnecessary repetitive output...]

frame= 1911 fps=3.9 q=29.0 size=   17467kB time=00:01:03.00 
bitrate=2271.3kbits/s     [libx264 @ 0x93d9080] frame=1870 QP=25.00 
NAL=0 Slice:B Poc:238 I:0    P:10   SKIP:2030 size=36 bytes
[libx264 @ 0x93d9080] frame=1871 QP=21.45 NAL=2 Slice:P Poc:248 I:0 
P:242  SKIP:1798 size=746 bytes
[libx264 @ 0x93d9080] frame=1872 QP=22.77 NAL=2 Slice:B Poc:244 I:0 
P:173  SKIP:1867 size=165 bytes
[libx264 @ 0x93d9080] frame=1873 QP=25.00 NAL=0 Slice:B Poc:242 I:0 
P:132  SKIP:1908 size=117 bytes
frame= 1915 fps=3.9 q=29.0 size=   17476kB time=00:01:03.00 
bitrate=2272.4kbits/s     [libx264 @ 0x93d9080] frame=1874 QP=25.00 
NAL=0 Slice:B Poc:246 I:0    P:10   SKIP:2030 size=37 bytes
[libx264 @ 0x93d9080] frame=1875 QP=21.00 NAL=2 Slice:P Poc:256 I:0 
P:352  SKIP:1688 size=1173 bytes
[libx264 @ 0x93d9080] frame=1876 QP=21.80 NAL=2 Slice:B Poc:252 I:0 
P:238  SKIP:1802 size=199 bytes
[libx264 @ 0x93d9080] frame=1877 QP=25.00 NAL=0 Slice:B Poc:250 I:0 
P:151  SKIP:1889 size=140 bytes
frame= 1919 fps=3.9 q=29.0 size=   17485kB time=00:01:03.00 
bitrate=2273.7kbits/s     [libx264 @ 0x93d9080] frame=1878 QP=25.00 
NAL=0 Slice:B Poc:254 I:0    P:29   SKIP:2011 size=57 bytes
[output stream 0:0 @ 0x93abfe0] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
[libx264 @ 0x93d9080] frame=1879 QP=21.37 NAL=2 Slice:P Poc:264 I:1 
P:664  SKIP:1375 size=2275 bytes
[libx264 @ 0x93d9080] frame=1880 QP=22.08 NAL=2 Slice:B Poc:260 I:1 
P:427  SKIP:1612 size=302 bytes
[libx264 @ 0x93d9080] frame=1881 QP=25.00 NAL=0 Slice:B Poc:258 I:0 
P:326  SKIP:1714 size=227 bytes
[libx264 @ 0x93d9080] frame=1882 QP=24.18 NAL=0 Slice:B Poc:262 I:0 
P:209  SKIP:1831 size=165 bytes
[libx264 @ 0x93d9080] frame=1883 QP=22.26 NAL=2 Slice:P Poc:272 I:1 
P:439  SKIP:1600 size=1444 bytes
[libx264 @ 0x93d9080] frame=1884 QP=21.80 NAL=2 Slice:B Poc:268 I:0 
P:311  SKIP:1729 size=250 bytes
[libx264 @ 0x93d9080] frame=1885 QP=22.59 NAL=0 Slice:B Poc:266 I:0 
P:254  SKIP:1786 size=196 bytes
[libx264 @ 0x93d9080] frame=1886 QP=25.00 NAL=0 Slice:B Poc:270 I:0 
P:119  SKIP:1921 size=116 bytes
[libx264 @ 0x93d9080] frame=1887 QP=21.11 NAL=2 Slice:P Poc:280 I:0 
P:638  SKIP:1402 size=2042 bytes
[libx264 @ 0x93d9080] frame=1888 QP=22.54 NAL=2 Slice:B Poc:276 I:0 
P:459  SKIP:1581 size=344 bytes
[libx264 @ 0x93d9080] frame=1889 QP=23.65 NAL=0 Slice:B Poc:274 I:0 
P:314  SKIP:1726 size=236 bytes
[libx264 @ 0x93d9080] frame=1890 QP=22.94 NAL=0 Slice:B Poc:278 I:0 
P:235  SKIP:1805 size=186 bytes
[libx264 @ 0x93d9080] frame=1891 QP=20.41 NAL=2 Slice:P Poc:282 I:0 
P:177  SKIP:1863 size=582 bytes
[libx264 @ 0x93d9080] frame=1892 QP=21.99 NAL=2 Slice:P Poc:290 I:0 
P:306  SKIP:1734 size=736 bytes
[libx264 @ 0x93d9080] frame=1893 QP=21.30 NAL=2 Slice:B Poc:286 I:0 
P:196  SKIP:1844 size=197 bytes
[libx264 @ 0x93d9080] frame=1894 QP=23.20 NAL=0 Slice:B Poc:284 I:0 
P:124  SKIP:1916 size=129 bytes
[libx264 @ 0x93d9080] frame=1895 QP=23.88 NAL=0 Slice:B Poc:288 I:0 
P:104  SKIP:1936 size=109 bytes
[libx264 @ 0x93d9080] frame=1896 QP=20.28 NAL=2 Slice:P Poc:292 I:1 
P:321  SKIP:1718 size=997 bytes
[libx264 @ 0x93d9080] frame=1897 QP=22.90 NAL=2 Slice:P Poc:300 I:2 
P:531  SKIP:1507 size=1580 bytes
[libx264 @ 0x93d9080] frame=1898 QP=22.58 NAL=2 Slice:B Poc:296 I:0 
P:433  SKIP:1607 size=322 bytes
[libx264 @ 0x93d9080] frame=1899 QP=23.45 NAL=0 Slice:B Poc:294 I:0 
P:319  SKIP:1721 size=241 bytes
[libx264 @ 0x93d9080] frame=1900 QP=24.25 NAL=0 Slice:B Poc:298 I:0 
P:182  SKIP:1858 size=157 bytes
[libx264 @ 0x93d9080] frame=1901 QP=23.06 NAL=2 Slice:P Poc:308 I:0 
P:149  SKIP:1891 size=389 bytes
[libx264 @ 0x93d9080] frame=1902 QP=21.30 NAL=2 Slice:B Poc:304 I:0 
P:134  SKIP:1905 size=162 bytes
[libx264 @ 0x93d9080] frame=1903 QP=25.00 NAL=0 Slice:B Poc:302 I:0 
P:106  SKIP:1934 size=109 bytes
[libx264 @ 0x93d9080] frame=1904 QP=25.00 NAL=0 Slice:B Poc:306 I:0 
P:43   SKIP:1997 size=69 bytes
[libx264 @ 0x93d9080] frame=1905 QP=21.78 NAL=2 Slice:P Poc:316 I:0 
P:281  SKIP:1759 size=658 bytes
[libx264 @ 0x93d9080] frame=1906 QP=21.29 NAL=2 Slice:B Poc:312 I:0 
P:245  SKIP:1795 size=210 bytes
[libx264 @ 0x93d9080] frame=1907 QP=25.00 NAL=0 Slice:B Poc:310 I:0 
P:171  SKIP:1869 size=149 bytes
[libx264 @ 0x93d9080] frame=1908 QP=25.00 NAL=0 Slice:B Poc:314 I:0 
P:80   SKIP:1960 size=95 bytes
[libx264 @ 0x93d9080] frame=1909 QP=22.59 NAL=2 Slice:P Poc:324 I:0 
P:103  SKIP:1937 size=263 bytes
[libx264 @ 0x93d9080] frame=1910 QP=24.85 NAL=2 Slice:B Poc:320 I:0 
P:92   SKIP:1948 size=118 bytes
[libx264 @ 0x93d9080] frame=1911 QP=23.44 NAL=0 Slice:B Poc:318 I:0 
P:62   SKIP:1978 size=83 bytes
[libx264 @ 0x93d9080] frame=1912 QP=25.00 NAL=0 Slice:B Poc:322 I:0 
P:40   SKIP:2000 size=66 bytes
[libx264 @ 0x93d9080] frame=1913 QP=22.45 NAL=2 Slice:P Poc:332 I:0 
P:50   SKIP:1990 size=117 bytes
[libx264 @ 0x93d9080] frame=1914 QP=21.20 NAL=2 Slice:B Poc:328 I:0 
P:52   SKIP:1988 size=89 bytes
[libx264 @ 0x93d9080] frame=1915 QP=25.00 NAL=0 Slice:B Poc:326 I:0 
P:33   SKIP:2007 size=59 bytes
[libx264 @ 0x93d9080] frame=1916 QP=25.00 NAL=0 Slice:B Poc:330 I:0 
P:20   SKIP:2020 size=48 bytes
[libx264 @ 0x93d9080] frame=1917 QP=23.20 NAL=2 Slice:P Poc:338 I:0 
P:242  SKIP:1798 size=305 bytes
[libx264 @ 0x93d9080] frame=1918 QP=24.21 NAL=2 Slice:B Poc:336 I:0 
P:301  SKIP:1739 size=247 bytes
[libx264 @ 0x93d9080] frame=1919 QP=23.45 NAL=0 Slice:B Poc:334 I:0 
P:262  SKIP:1778 size=186 bytes
frame= 1920 fps=3.8 q=29.0 Lsize=   17637kB time=00:01:04.00 
bitrate=2257.5kbits/s
video:13594kB audio:4000kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.241710%
Input file #0 (20150112_0958_rec_5310.MOV):
   Input stream #0:0 (video): 1920 packets read (141443980 bytes); 1920 
frames decoded;
   Input stream #0:1 (audio): 2048 packets read (4096000 bytes);
   Total: 3968 packets (145539980 bytes) demuxed
Output file #0 (20150112_0958_rec_5310-h960x540.mov):
   Output stream #0:0 (video): 1920 frames encoded; 1920 packets muxed 
(13920615 bytes);
   Output stream #0:1 (audio): 2048 packets muxed (4096000 bytes);
   Total: 3968 packets (18016615 bytes) muxed
1920 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x94c5600] Statistics: 64 seeks, 4031 writeouts
[libx264 @ 0x93d9080] frame I:8     Avg QP:20.88  size: 72492
[libx264 @ 0x93d9080] frame P:694   Avg QP:23.75  size: 15386
[libx264 @ 0x93d9080] frame B:1218  Avg QP:28.74  size:  2185
[libx264 @ 0x93d9080] consecutive B-frames:  1.1% 26.4% 49.4% 23.1%
[libx264 @ 0x93d9080] mb I  I16..4:  5.2% 44.8% 50.0%
[libx264 @ 0x93d9080] mb P  I16..4:  0.8%  1.3%  0.5%  P16..4: 36.2% 
21.0% 13.0%  0.0%  0.0%    skip:27.2%
[libx264 @ 0x93d9080] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 39.8% 
4.2%  0.9%  direct: 1.0%  skip:54.0%  L0:39.5% L1:54.2% BI: 6.3%
[libx264 @ 0x93d9080] 8x8 transform intra:49.4% inter:59.4%
[libx264 @ 0x93d9080] coded y,uvDC,uvAC intra: 60.2% 46.2% 12.2% inter: 
13.5% 4.7% 0.0%
[libx264 @ 0x93d9080] i16 v,h,dc,p: 11% 53% 18% 17%
[libx264 @ 0x93d9080] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8% 30% 39%  3%  3% 
  2%  4%  2%  8%
[libx264 @ 0x93d9080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 28% 17%  5%  7% 
  5%  8%  5% 11%
[libx264 @ 0x93d9080] i8c dc,h,v,p: 60% 29%  9%  2%
[libx264 @ 0x93d9080] Weighted P-Frames: Y:0.6% UV:0.0%
[libx264 @ 0x93d9080] ref P L0: 62.5% 18.2% 13.2%  6.0%  0.0%
[libx264 @ 0x93d9080] ref B L0: 86.0% 12.0%  2.0%
[libx264 @ 0x93d9080] ref B L1: 88.2% 11.8%
[libx264 @ 0x93d9080] kb/s:1739.99
[AVIOContext @ 0x93b3b00] Statistics: 145765650 bytes read, 59 seeks

Step 2, the attempt to trim/clip that gives the invalid error:

ffmpeg version N-68814-gc6bb651 Copyright (c) 2000-2014 the FFmpeg 
developers
   built on Jan  2 2015 12:09:28 with gcc 4.9.1 (GCC)
   configuration: --enable-gpl --enable-libx264 --disable-doc 
--disable-htmlpages --disable-podpages --disable-ffserver 
--disable-network --enable-libfreetype --enable-libfontconfig
   libavutil      54. 16.100 / 54. 16.100
   libavcodec     56. 19.100 / 56. 19.100
   libavformat    56. 16.102 / 56. 16.102
   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
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 
'20150112_0958_rec_5310-h960x540.mov'.
Reading option '-ss' ... matched as option 'ss' (set the start time 
offset) with argument '17'.
Reading option '-t' ... matched as option 't' (record or transcode 
"duration" seconds of audio/video) with argument '7'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 
'copy'.
Reading option '20150112_0958_rec_5310-h960x540_c17t7.mov' ... matched 
as output file.
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 20150112_0958_rec_5310-h960x540.mov.
Successfully parsed a group of options.
Opening an input file: 20150112_0958_rec_5310-h960x540.mov.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] Format mov,mp4,m4a,3gp,3g2,mj2 
probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] ISO: File Type Major Brand: qt
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] Before avformat_find_stream_info() 
pos: 18060163 bytes read:76279 seeks:1
[h264 @ 0x93bc200] no picture
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x93bb9e0] After avformat_find_stream_info() 
pos: 73866 bytes read:166025 seeks:2 frames:4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
'20150112_0958_rec_5310-h960x540.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf56.16.102
     comment         : HDDVR-Mobius
     comment-eng     : HDDVR-Mobius
   Duration: 00:01:04.00, start: 0.000000, bitrate: 2257 kb/s
     Stream #0:0(eng), 3, 1/15360: Video: h264 (High) (avc1 / 
0x31637661), yuv420p(left), 960x540 (960x544), 1/60, 1740 kb/s, 30 fps, 
30 tbr, 15360 tbn, 60 tbc (default)
     Metadata:
       handler_name    : DataHandler
       encoder         : Lavc56.19.100 libx264
     Stream #0:1(eng), 1, 1/32000: Audio: pcm_s16le (sowt / 0x74776F73), 
32000 Hz, mono, s16, 512 kb/s (default)
     Metadata:
       handler_name    : DataHandler
Successfully opened the file.
Parsing a group of options: output file 
20150112_0958_rec_5310-h960x540_c17t7.mov.
Applying option ss (set the start time offset) with argument 17.
Applying option t (record or transcode "duration" seconds of 
audio/video) with argument 7.
Applying option c (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: 20150112_0958_rec_5310-h960x540_c17t7.mov.
Successfully opened the file.
[mov @ 0x93c2680] timecode: tbc=15360/1 invalid, fallback on 30/1
Output #0, mov, to '20150112_0958_rec_5310-h960x540_c17t7.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     comment-eng     : HDDVR-Mobius
     comment         : HDDVR-Mobius
     encoder         : Lavf56.16.102
     Stream #0:0(eng), 0, 1/15360: Video: h264 (avc1 / 0x31637661), 
yuv420p(left), 960x540 (0x0), 1/15360, q=2-31, 1740 kb/s, 30 fps, 30 
tbr, 15360 tbn, 15360 tbc (default)
     Metadata:
       handler_name    : DataHandler
       encoder         : Lavc56.19.100 libx264
     Stream #0:1(eng), 0, 1/32000: Audio: pcm_s16le (sowt / 0x74776F73), 
32000 Hz, mono, 512 kb/s (default)
     Metadata:
       handler_name    : DataHandler
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
No more output streams to write to, finishing.
frame=    0 fps=0.0 q=-1.0 Lsize=     438kB time=00:00:07.00 bitrate= 
512.8kbits/s
video:0kB audio:438kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.163839%
Input file #0 (20150112_0958_rec_5310-h960x540.mov):
   Input stream #0:0 (video): 751 packets read (7493096 bytes);
   Input stream #0:1 (audio): 798 packets read (1597440 bytes);
   Total: 1549 packets (9090536 bytes) demuxed
Output file #0 (20150112_0958_rec_5310-h960x540_c17t7.mov):
   Output stream #0:0 (video): 0 packets muxed (0 bytes);
   Output stream #0:1 (audio): 224 packets muxed (448000 bytes);
   Total: 224 packets (448000 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x93c3dc0] Statistics: 32 seeks, 249 writeouts
[AVIOContext @ 0x93b3b00] Statistics: 9166815 bytes read, 2 seeks


There are no video frames, and no video stream written.

ffprobe version N-68814-gc6bb651 Copyright (c) 2007-2014 the FFmpeg
developers
  built on Jan  2 2015 12:09:28 with gcc 4.9.1 (GCC)
  configuration: --enable-gpl --enable-libx264 --disable-doc
--disable-htmlpages --disable-podpages --disable-ffserver
--disable-network --enable-libfreetype --enable-libfontconfig
  libavutil      54. 16.100 / 54. 16.100
  libavcodec     56. 19.100 / 56. 19.100
  libavformat    56. 16.102 / 56. 16.102
  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
'20150112_0958_rec_5310-h960x540_c17t7.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf56.16.102
    comment         : HDDVR-Mobius
    comment-eng     : HDDVR-Mobius
  Duration: 00:00:07.00, start: 0.000000, bitrate: 512 kb/s
    Stream #0:0(eng): Audio: pcm_s16le (sowt / 0x74776F73), 32000 Hz,
mono, s16, 512 kb/s (default)
    Metadata:
      handler_name    : DataHandler

Why does the "stream #0:0" lines not match in describing the codec
details? Also it changed the aspect ratio on it's own. Also the tbc
don't match. Step 1 wrote the tbc as 30, it becomes 60 at the 2nd stage
input.

Which tbc is (default)?

Error message: " tbc=15360/1 invalid" seems like it is confusing tbc and
tbn.

Further testing, if I add -aspect 16:9 to step 1, step 2 still reports a
different size in parenthesis,

Stream #0:0(eng), 3, 1/15360: Video: h264 (High) (avc1 / 0x31637661),
yuv420p(left), 960x540 (960x544) [SAR 1:1 DAR 16:9], 1/60, 1740kb/s, 30
fps, 30 tbr, 15360 tbn, 60 tbc (default)


Further testing: If I use the mpeg4 codec and output to avi, then it
works. But in this scenario, tbn and tbc are equal. both are 30.

Stewart




More information about the ffmpeg-user mailing list