Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a file downloaded from the web this is the media below.

Format                                   : WebM
Format version                           : Version 2
File size                                : 10.3 MiB
Duration                                 : 6mn 30s
Overall bit rate mode                    : Variable
Overall bit rate                         : 222 Kbps
Movie name                               : Untitled
Writing application                      : Lavf53.13.0
Writing library                          : Lavf53.13.0

ID                                       : 1
Format                                   : VP8
Codec ID                                 : V_VP8
Duration                                 : 6mn 30s
Bit rate                                 : 76.6 Kbps
Width                                    : 1 024 pixels
Height                                   : 768 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 15.000 fps
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.006
Stream size                              : 3.57 MiB (34%)
Language                                 : English
Default                                  : Yes
Forced                                   : No

ID                                       : 2
Format                                   : Vorbis
Format settings, Floor                   : 1
Codec ID                                 : A_VORBIS
Duration                                 : 6mn 30s
Bit rate mode                            : Variable
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 5.96 MiB (58%)
Writing library                          : libVorbis (Schaufenugget) (20101101 (Schaufenugget))
Language                                 : English
Default                                  : Yes
Forced                                   : No
Writing application                      : Lavc53.19.0

I tried transcoding the file into MKV but no luck I could not get it to fix the seek issues:

mkvextract tracks file.webm 0:file.ivf
mkvextract tracks file.webm 1:file.ogg
mkvmerge -o file.mkv file.ivf file.ogg

I also tried fixing the indexes using mencoder but it got worse.

mencoder input.mkv -idx -ovc copy -oac copy -o output.mkv

I also tried Metorite

Meteorite is MKV / Matroska file repair engine. That repairs MKV files and can repair MKV files still downloading from internet.

I was able to seek but the video halts after moving the video sliders , the audio remains normal.

Do you know other ways to fix the seek issues?

share|improve this question
Is file.ivg a typo? Could you maybe supply the sample? – slhck Oct 17 '12 at 15:57
Yes its a typo sorry. It should be ivf. I don't think I could give the sample it has a copyright. I updated my post by the way. – Aivan Monceller Oct 17 '12 at 17:08
up vote 1 down vote accepted

I solved the seek issues by using this FFmpeg command

ffmpeg -i file.webm -vcodec copy -acodec libvo_aacenc -b:a 128k file.avi

This command copies the video stream from the webm file and re encodes the audio using livbo_aacenc codec or AAC. Then it muxes the streams into an AVI container.

share|improve this answer
THANK YOU for posting your own answer. I can confirm for anyone coming from google that this will fix seeking problems on MKV files when trying to play in VLC or any other media player. You will probably get an encoding error if you are using libvo_aacenc so either add -ac 2 to the audio parameters to force 2 channels, OR use a different audio encoder like aac with the -strict experimental flag (didn't work for me on Windows though). – degenerate Feb 16 '14 at 21:57

To elaborate on Aivan's solution above, if you want to convert ALL your MKV videos to seekable AVI really fast, use the following batch script I wrote:

@echo on
set /A nfile=0
@echo Copying directory structure from %0 to %1 ...
xcopy /T %1 %2
for /R %1 %%i in (*.mkv) do (
    ffmpeg -i "%%i" -c:v copy -c:a libvo_aacenc -b:a 320k -ac 2 "%2%%~pi%%~ni.avi"
    set /A nfile+=1

echo Done! Converted %nfile% file(s)

You will need to put ffmpeg.exe in the same folder as all the videos and save this as go.bat and run it. The -ac 2 flag sets all the sound to 2-channel stereo, as a warning. I don't know another way to get libvo_aacenc to work properly without throwing an error.

share|improve this answer
thanks for taking some time to read into this. No one has really bothered answering this question so I posted what I discovered. Thanks for the script! – Aivan Monceller Feb 19 '14 at 10:59

The WebM project container guidelines page discusses this specifically and offers the tool mkclean.

Although my transcodes were seekable before using mkclean, remuxing them with it has:

  • Cut down the size per file.
  • Greatly improved seeking performance
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .