AnswerBun.com

Getting weird errors in ffmpeg when seeking, "co located POCs unavailable", "mmco: unref short failure"

Super User Asked by mikey_john on December 25, 2020

I’ve seen other people have the issue but I haven’t seen a solution. If I try to seek with ffmpeg I get some errors and the resulting video freezes at a frame at the beginning before moving. Even if I open the video in VLC I cannot seek to that exact point when the issue is occuring. It seems like the video is corrupted somehow, but it plays fine, can it be fixed?

If I change the container format of the input from ts to mp4, the error doesn’t occur but instead of the frozen frame I have a black screen.

Full command and output:

$ ffmpeg -ss 5.5 -i video.ts -to 10 -avoid_negative_ts make_zero -vcodec libx264 -crf 23 -acodec copy output.ts

ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mpegts, from 'video.ts':
  Duration: 00:32:50.07, start: 1.407811, bitrate: 2227 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 117 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264 @ 0x7fa933003c00] co located POCs unavailable
[h264 @ 0x7fa933001800] mmco: unref short failure
[h264 @ 0x7fa931800000] co located POCs unavailable
[h264 @ 0x7fa933003c00] mmco: unref short failure
[libx264 @ 0x7fa932801000] using SAR=1/1
[libx264 @ 0x7fa932801000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fa932801000] profile High, level 3.1
Output #0, mpegts, to 'output.ts':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 117 kb/s
frame=  236 fps= 38 q=-1.0 Lsize=    2974kB time=00:00:09.98 bitrate=2439.3kbits/s speed=1.62x    
video:2559kB audio:165kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.200110%
[libx264 @ 0x7fa932801000] frame I:4     Avg QP:20.49  size: 56038
[libx264 @ 0x7fa932801000] frame P:115   Avg QP:22.34  size: 15286
[libx264 @ 0x7fa932801000] frame B:117   Avg QP:24.56  size:  5452
[libx264 @ 0x7fa932801000] consecutive B-frames: 18.2% 44.1%  8.9% 28.8%
[libx264 @ 0x7fa932801000] mb I  I16..4: 26.5% 32.9% 40.6%
[libx264 @ 0x7fa932801000] mb P  I16..4:  7.4% 12.8%  3.4%  P16..4: 30.6%  8.0%  4.0%  0.0%  0.0%    skip:33.8%
[libx264 @ 0x7fa932801000] mb B  I16..4:  1.5%  2.3%  1.1%  B16..8: 20.9%  4.1%  0.6%  direct: 3.1%  skip:66.4%  L0:38.0% L1:58.6% BI: 3.4%
[libx264 @ 0x7fa932801000] 8x8 transform intra:50.8% inter:63.0%
[libx264 @ 0x7fa932801000] coded y,uvDC,uvAC intra: 40.3% 71.6% 31.3% inter: 9.5% 21.8% 1.4%
[libx264 @ 0x7fa932801000] i16 v,h,dc,p: 42% 35% 15%  8%
[libx264 @ 0x7fa932801000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 25% 27%  4%  3%  3%  5%  3%  6%
[libx264 @ 0x7fa932801000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 27% 15%  6%  6%  5%  7%  5%  6%
[libx264 @ 0x7fa932801000] i8c dc,h,v,p: 42% 28% 22%  8%
[libx264 @ 0x7fa932801000] Weighted P-Frames: Y:4.3% UV:4.3%
[libx264 @ 0x7fa932801000] ref P L0: 74.0% 13.6%  9.5%  2.9%  0.1%
[libx264 @ 0x7fa932801000] ref B L0: 85.0% 13.2%  1.8%
[libx264 @ 0x7fa932801000] ref B L1: 98.3%  1.7%
[libx264 @ 0x7fa932801000] kb/s:2220.26

One Answer

Solved... first:

ffmpeg -i video.ts -c copy video.mp4

and then instead of:

ffmpeg -ss 5.5 -i video.mp4 -to 10 -avoid_negative_ts make_zero -vcodec libx264 -crf 23 -acodec copy output.ts

you do:

ffmpeg -ss 5.5 -i video.mp4 -ss 0 -to 10 -avoid_negative_ts make_zero -vcodec libx264 -crf 23 -acodec copy output.ts

Answered by mikey_john on December 25, 2020

Add your own answers!

Related Questions

Ubuntu Mate freezes after user login

1  Asked on November 9, 2021 by nathaniel-graham

       

Keep getting “Index out of range” error

1  Asked on November 9, 2021 by jerunenchaussettes

       

How does Iconv handle endianness?

1  Asked on November 9, 2021

       

MSI BIOS Distorted

0  Asked on November 9, 2021 by karma-blackshaw

         

Network problems using WSL2

3  Asked on November 7, 2021 by lars-rdal

       

With Bash + iTerm2, how to name tabs?

16  Asked on November 7, 2021

     

How to increase the font size for Skype on OS X?

4  Asked on November 7, 2021 by user2225404

   

How can I stop photos I download from popping up in Preview?

2  Asked on November 7, 2021 by mike-mercer

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP