Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avcut does not work with the new OTR-HD format #18

Open
geimist opened this issue Apr 4, 2020 · 3 comments
Open

avcut does not work with the new OTR-HD format #18

geimist opened this issue Apr 4, 2020 · 3 comments

Comments

@geimist
Copy link

geimist commented Apr 4, 2020

OTR is currently implementing a new HD-Format.
When trying to cut these files with avcut, it ends with this error:

Input #0, avi, from '/volume1/video/_synOTR/_decodiert/Wunderwelt_Erde_20.03.31_11-00_arte_45_TVOON_DE.mpg.HD.avi': 
Metadata: 
    comment         :  
    encoder         : Lavf58.42.100
    encoded_by      : www.onlinetvrecorder.com
  Duration: 01:00:48.52, start: 0.000000, bitrate: 2277 kb/s
    Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2067 kb/s, 50 fps, 50 tbr, 50 tbn, 100 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 192 kb/s
Settings from profile:
  Preset: medium
  Tune: film
  x264opts: direct=auto:aq-mode=3:force-cfr=1:b-adapt=2:rc-lookahead=60:weightp=0
[libx264 @ 0x2bbb840] using SAR=1/1
[libx264 @ 0x2bbb840] using cpu capabilities: none!
[libx264 @ 0x2bbb840] profile Main, level 3.2
Output #0, avi, to '/volume1/video/_synOTR/Wunderwelt_Erde_20.03.31_11-00_arte_45_TVOON_DE.mpg.HD.avi-cut.avi':
  Metadata:
    comment         :  
    encoder         : Lavf58.42.100
    encoded_by      : www.onlinetvrecorder.com
    Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 50 tbn, 100 tbc
    Stream #0:1: Audio: mp3, 48000 Hz, stereo, s16p, 192 kb/s
size mismatch 249:6238 247:3863 (diff: 0, try: -2375)
packet for frame 249 (cpn 249) not found

Would a customized profile be sufficient to correct this error?
Unfortunately I have no idea which parameters are necessary for this.

@geimist
Copy link
Author

geimist commented Apr 9, 2020

A user has found out about these profile settings, but unfortunately they do not work here yet.

avcut_otr_newHD.profile

preset=veryfast
tune=film
x264opts=pic-struct:sps-id=1:stitchable

@geimist
Copy link
Author

geimist commented May 13, 2021

Has no one an idea? 😥

@anyc
Copy link
Owner

anyc commented Apr 10, 2022

Sorry for the late response, I do not have much time to invest in avcut anymore.

After encoding or decoding, avcut needs to match the input item (frame or packet) to the output item. This is more difficult with codecs like h264 as, after decoding for example, we do not immediately get the frame after calling the decode function with a packet. In this case, it failed to find the matching frame or packet because the sizes did not match.

I just released a new version with a fix related to this, could you test it again?

If it does not work, an example video would help analyzing the issue. If that is not (legally) possible, please build avcut with "make debug" and send the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants