Author Topic: Webm VP9 play failed after editing  (Read 1903 times)

Kelvin

  • Newbie
  • *
  • Posts: 7
Webm VP9 play failed after editing
« on: June 04, 2017, 04:57:19 AM »
Hi guys
I got some video from youtube, format webm VP9. After I edit it with avidemux, it cannot play.
Settings in avidemux are simple:
 Video Output: copy
 Audio Output: copy
 Output format: webm muxer
Avidemux 2.6.21 64bit on Windows 10 64bit.
You can download my sample video here:
https://drive.google.com/open?id=0B6d2Gb56opTaTndYaGQ3eTBFTU0

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: Webm VP9 play failed after editing
« Reply #1 on: June 04, 2017, 05:22:15 AM »
I can't reproduce the issue with avidemux 2.7.0 (170603 80c98b0) (on Ubuntu 16.04.2 LTS 64-bit)
I did cut down video to 55 secs (removing blocks)
I does play well in VLC 3.0.0 (Vetinari)
You are aware sample video has no audio track.


Download link https://we.tl/1avInFAY65
1 file testsample.webm, 1080x1920 portrait mode 55 sec
testsample.webm 1 file, 43.5 MB in total
Will be deleted on 11 June, 2017

perhaps you could try and test:
avidemux_2.7.0_r170603_win64.exe @ http://www.avidemux.org/nightly/win64/
« Last Edit: June 04, 2017, 05:26:36 AM by Jan Gruuthuse »

Kelvin

  • Newbie
  • *
  • Posts: 7
Re: Webm VP9 play failed after editing
« Reply #2 on: June 04, 2017, 07:07:26 AM »
Hi Jan,
Version 2.7.0_r170603 work good with that specified video. But it's not with another one.
Please try to edit video https://we.tl/o5ocX3yhQl

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3178
Re: Webm VP9 play failed after editing
« Reply #3 on: June 04, 2017, 09:28:16 AM »
This is closely related to http://avidemux.org/smif/index.php/topic,17782.msg81026.html#msg81026. There is a sanity check for decoding timestamps which fails sometimes, resulting in the frame being rejected and dropped, which in turn results in video artifacts, especially bad when a keyframe goes missing, but quite noticeable also if this happens to other frame types too.

(edit: completely skipping the sanity check allows Avidemux to cut the sample fine.)
« Last Edit: June 04, 2017, 09:30:40 AM by eumagga0x2a »

Kelvin

  • Newbie
  • *
  • Posts: 7
Re: Webm VP9 play failed after editing
« Reply #4 on: June 04, 2017, 10:07:43 AM »
Hi eumagga0x2a,
I'm not sure I undertand what you said because it's quite technically.
But I'm sure I always cut at I-Frame (both start & end point).
Will the issue be recorded and will be fixed in next version?

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3178
Re: Webm VP9 play failed after editing
« Reply #5 on: June 04, 2017, 10:20:39 AM »
But I'm sure I always cut at I-Frame (both start & end point).

The bug strikes independently from cuts being on I-frames or not. It is just worse with cuts on I-frames because you don't get any warning that the resulting video will likely be corrupted.

Quote
Will the issue be recorded and will be fixed in next version?

The issue was known since ages but not understood. The spot in the code directly related to the issue was finally identified two days ago and fixed yesterday (partially, as it turned out to be). It is very likely that a more profound fix will be developed soon, so it will be in the next release.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3178
Re: Webm VP9 play failed after editing
« Reply #6 on: June 04, 2017, 10:38:51 AM »
By the way, which application produced this video? Directly downloaded from YouTube? If you remux it with ffmpeg

Code: [Select]
ffmpeg -i your-source-video.webm -c copy remuxed-video.webm
(which happens to eliminate numerous duplicated presentation timestamps), Avidemux can load and cut it in copy mode without issues.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3178
Re: Webm VP9 play failed after editing
« Reply #7 on: June 04, 2017, 10:50:26 AM »
By the way #2: the VP9 version is not offered by YouTube for this video anymore, but you can get a perfectly fine h264+opus fullHD in portrait mode version using

Code: [Select]
youtube-dl https://www.youtube.com/watch?v=5n9fICImcaM

Kelvin

  • Newbie
  • *
  • Posts: 7
Re: Webm VP9 play failed after editing
« Reply #8 on: June 04, 2017, 03:33:28 PM »
Appreciate for your suppport eumagga0x2a.
I downloaded these video by youtube-dl for ages, downloaded video and audio separately and then using ffmeg to mux them as you think. Now I have just redownloaded them again and they are not be corrupted after editing with avidemux. Maybe youtube had fixed or removed the VP9 format for these video, i guess.