[FFmpeg-user] seeking woes

Sean Darcy seandarcy2 at gmail.com
Mon Jun 2 17:29:39 CEST 2014


On 06/02/2014 11:10 AM, Carl Eugen Hoyos wrote:
> Sean Darcy <seandarcy2 <at> gmail.com> writes:
>
>> I've got a 2 hour dvd. I've used vobcopy to transfer it.
>> ffplay (and mplayer) can play all two hours.
>>
>> -rw-r--r--. 1 root  root  6989111296 Jun  2 09:54 BIG21.vob
>>
>> But when I try to transcode the second half, ffmpeg thinks
>> it's only 59 minutes long:
>
> I suspect the sample contains a timestamp discontinuity
> which makes seeking hard, you can use -skip_initial_bytes
> (or dd) as a workaround.
>
> (I just realize that -skip_initial_bytes only allows you
> to skip the first 2G....)
>
> And you can of course seek with:
> $ ffmpeg -i input -ss 1:00:00 (which takes long)
>
> Carl Eugen
>

Interestingly, if I don't seek at all, I get the full 2 hours:

frame=220225 fps=167 q=34.0 size=  447915kB time=02:02:25.83 bitrate= 
499.5kbits/s dup=42004 drop=0frame=220399 fps=167 q=33.0 size=  448056kB 
time=02:02:31.64 bitrate= 499.3kbits/s dup=42046 drop=0frame=220524 
fps=167 q=33.0 size=  448103kB time=02:02:35.81 bitrate= 499.0kbits/s 
dup=42080 drop=0frame=220609 fps=167 q=33.0 size=  448284kB 
time=02:02:38.65 bitrate= 499.1kbits/s dup=42101 drop=0frame=220624 
fps=167 q=-1.0 Lsize=  451317kB time=02:02:41.42 bitrate= 502.2kbits/s 
dup=42104 drop=0
video:448737kB audio:0kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.574938%
[libx264 @ 0x121b800] frame I:1942  Avg QP:26.12  size: 18584
[libx264 @ 0x121b800] frame P:74792 Avg QP:28.76  size:  3838
[libx264 @ 0x121b800] frame B:143890 Avg QP:31.66  size:   948
[libx264 @ 0x121b800] consecutive B-frames:  9.1%  6.4% 15.9% 68.6%
[libx264 @ 0x121b800] mb I  I16..4: 42.1%  0.0% 57.9%
[libx264 @ 0x121b800] mb P  I16..4: 15.9%  0.0%  0.0%  P16..4: 35.9% 
0.0%  0.0%  0.0%  0.0%    skip:48.2%
[libx264 @ 0x121b800] mb B  I16..4:  2.0%  0.0%  0.0%  B16..8: 14.7% 
0.0%  0.0%  direct: 3.6%  skip:79.7%  L0:36.5% L1:49.1% BI:14.4%
[libx264 @ 0x121b800] final ratefactor: 27.87
[libx264 @ 0x121b800] direct mvs  spatial:99.3% temporal:0.7%
[libx264 @ 0x121b800] coded y,uvDC,uvAC intra: 35.2% 17.0% 1.8% inter: 
6.5% 1.9% 0.0%
[libx264 @ 0x121b800] i16 v,h,dc,p: 38% 22% 27% 14%
[libx264 @ 0x121b800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 15%  8%  9% 
  9%  7%  8%  6%
[libx264 @ 0x121b800] i8c dc,h,v,p: 79%  9% 12%  1%
[libx264 @ 0x121b800] Weighted P-Frames: Y:5.3% UV:1.4%
[libx264 @ 0x121b800] kb/s:499.36

But even if I seek within the 59 minutes, that is, use -ss 00:45:00, it 
will stop at 59 minutes !!

Odd.

I'm going to transcode the whole thing, and then try to break that in 
half. Hopefully, the transcoding will fix whatever timestamp error is 
happening.

sean




More information about the ffmpeg-user mailing list