Page MenuHomePhabricator

Incorrect duration of WEBM file
Closed, ResolvedPublic

Description

This file's duration is about 15 seconds, but

WebM audio/video file, VP8/Vorbis, length 12 d 3 h 56 min 6 s, 720 × 1,280 pixels, 40 bps overall

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald TranscriptMay 11 2019, 2:23 PM
Reedy updated the task description. (Show Details)May 11 2019, 2:24 PM
Reedy updated the task description. (Show Details)
Reedy added a subscriber: Reedy.May 11 2019, 2:28 PM

Looks like it's a problem with the metadata embedded in the file... exiftool gives a similar duration off the bat...

$ exiftool Alveolar-trill-slomo.webm 
ExifTool Version Number         : 11.30
File Name                       : Alveolar-trill-slomo.webm
Directory                       : .
File Size                       : 5.0 MB
File Modification Date/Time     : 2019:05:11 15:25:31+01:00
File Access Date/Time           : 2019:05:11 15:27:37+01:00
File Inode Change Date/Time     : 2019:05:11 15:25:33+01:00
File Permissions                : rw-r--r--
File Type                       : WEBM
File Type Extension             : webm
MIME Type                       : video/webm
EBML Version                    : 1
EBML Read Version               : 1
Doc Type                        : webm
Doc Type Version                : 2
Doc Type Read Version           : 2
Timecode Scale                  : 1 ms
Muxing App                      : Lavf56.40.101
Writing App                     : Lavf56.40.101
Duration                        : 12 days 3:56:06
Codec ID                        : A_VORBIS
Audio Channels                  : 2
Audio Sample Rate               : 44100
Track Number                    : 2
Track Language                  : und
Audio Codec ID                  : V_VP8
Track Type                      : Video
Video Frame Rate                : 0
Image Width                     : 720
Image Height                    : 1280
Display Width                   : 720
Display Height                  : 1280
Image Size                      : 720x1280
Megapixels                      : 0.922
Restricted Application added a project: Multimedia. · View Herald TranscriptMay 11 2019, 2:30 PM
Zoranzoki21 closed this task as Resolved.May 12 2019, 12:02 AM
Zoranzoki21 claimed this task.
Zoranzoki21 added a subscriber: Zoranzoki21.

Per https://superuser.com/questions/1027303/correcting-for-wildly-incorrect-time-of-webm-with-ffmpeg I executed command suggested there and this was output:

kizule@kizule:~/Downloads$ ffmpeg -i Alveolar-trill-slomo.webm -c copy -fflags +genpts Alveolar-trill-slomo-new.webm
ffmpeg version 4.1.3-0ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Ubuntu 8.3.0-6ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  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, matroska,webm, from 'Alveolar-trill-slomo.webm':
  Metadata:
    encoder         : Lavf56.40.101
  Duration: 291:56:05.76, start: 1050945.066000, bitrate: 0 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp (default)
    Stream #0:1: Video: vp8, yuv420p(progressive), 720x1280, SAR 1:1 DAR 9:16, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Output #0, webm, to 'Alveolar-trill-slomo-new.webm':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: vp8, yuv420p(progressive), 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  615 fps=0.0 q=-1.0 Lsize=    5099kB time=00:00:20.69 bitrate=2018.4kbits/s speed=64.8x    
video:4947kB audio:137kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.304564%
kizule@kizule:~/Downloads$

Looks like it fixed problem:

Restricted Application added a project: User-Zoranzoki21. · View Herald TranscriptMay 12 2019, 12:02 AM

Looks like it's a problem with the metadata embedded in the file... exiftool gives a similar duration off the bat...

$ exiftool Alveolar-trill-slomo.webm 
ExifTool Version Number         : 11.30
File Name                       : Alveolar-trill-slomo.webm
Directory                       : .
File Size                       : 5.0 MB
File Modification Date/Time     : 2019:05:11 15:25:31+01:00
File Access Date/Time           : 2019:05:11 15:27:37+01:00
File Inode Change Date/Time     : 2019:05:11 15:25:33+01:00
File Permissions                : rw-r--r--
File Type                       : WEBM
File Type Extension             : webm
MIME Type                       : video/webm
EBML Version                    : 1
EBML Read Version               : 1
Doc Type                        : webm
Doc Type Version                : 2
Doc Type Read Version           : 2
Timecode Scale                  : 1 ms
Muxing App                      : Lavf56.40.101
Writing App                     : Lavf56.40.101
Duration                        : 12 days 3:56:06
Codec ID                        : A_VORBIS
Audio Channels                  : 2
Audio Sample Rate               : 44100
Track Number                    : 2
Track Language                  : und
Audio Codec ID                  : V_VP8
Track Type                      : Video
Video Frame Rate                : 0
Image Width                     : 720
Image Height                    : 1280
Display Width                   : 720
Display Height                  : 1280
Image Size                      : 720x1280
Megapixels                      : 0.922

And this shows better results:

kizule@kizule:~/Downloads$ exiftool Alveolar-trill-slomo.webm
ExifTool Version Number         : 11.16
File Name                       : Alveolar-trill-slomo.webm
Directory                       : .
File Size                       : 5.0 MB
File Modification Date/Time     : 2019:05:12 09:48:03+02:00
File Access Date/Time           : 2019:05:12 09:48:05+02:00
File Inode Change Date/Time     : 2019:05:12 09:48:06+02:00
File Permissions                : rw-rw-r--
File Type                       : WEBM
File Type Extension             : webm
MIME Type                       : video/webm
EBML Version                    : 1
EBML Read Version               : 1
Doc Type                        : webm
Doc Type Version                : 2
Doc Type Read Version           : 2
Timecode Scale                  : 1 ms
Muxing App                      : Lavf58.20.100
Writing App                     : Lavf58.20.100
Duration                        : 20.72 s
Codec ID                        : V_VP8
Video Frame Rate                : 30
Image Width                     : 720
Image Height                    : 1280
Video Scan Type                 : Unknown (2)
Track Number                    : 2
Track Language                  : und
Video Codec ID                  : A_VORBIS
Track Type                      : Audio
Audio Channels                  : 2
Audio Sample Rate               : 44100
Audio Bits Per Sample           : 32
Tag Name                        : DURATION
Tag String                      : 00:00:20.719000000
Image Size                      : 720x1280
Megapixels                      : 0.922
kizule@kizule:~/Downloads$