Ubuntu – How to play a G2M4 encoded .wmv file (Ubuntu)

codecUbuntuvideovlc

I was using Ubuntu 13.04 (end of life) – now using 13.10. I have this .wmv video file.
When I try to play it on vlc, it shows the error below, there is no video but the audio is working properly:

No suitable decoder module:
VLC does not support the audio or video format "G2M4".
Unfortunately there is no way for you to fix this.

Do I need to install any codec? How can I play this file?


When I run it with totem movie player, I get:

Required plugin could not be found

Videos requires to install plugins to play media files of the following
type: video/x-asf-unknown decoder

EDIT#1

This edit is after trying the answers given.

1) I installed mplayer. When I ran the video file it was processing something which would have taken a long time to complete. Please see the screen shot below(look at the last line).
enter image description here

2) Then I installed smplayer (GUI). When I tried running the .wmv file, only audio came but not video (as with the case of vlc).

3) I tried upgrading my vlc version from the current version 2.0.8 to a higher one. I googled & tried different ways but to no avail. Then I removed it & reinstalled it.

1) sudo apt-get purge vlc

2) sudo apt-get autoremove

3) sudo apt-get install vlc

After doing all this, still the version of the vlc was the same 2.0.8! Why so? Is it because Ubuntu 13.04 isn't supported any more? So from Ubuntu repository, only that version can be installed? Is it that for installing latest or further versions I need to get it from website? Now also the video of the .wmv file didn't run.

4) `ubuntu-restricted-extras` are already installed.

I would like to repeat that I'm working on Ubuntu 13.04 which is not supported since last 5 months. This may be the issue.

I'm preparing my laptop now for upgrading to newer versions of Ubuntu. Once I install the new OS, I will check whether the video file runs there!

EDIT#2

I've installed Ubuntu13.10 on my laptop now & removed the older unsupported one (Ubuntu 13.04). Now I tried to run the video but failed.

1) 1st I write with respect to what Seth has written.
I ran sudo apt-get install ubuntu-restricted-extras but still the video part isn't running.

2) Now I write with respect to what Erik wrote in his answer.

After installing Ubuntu13.10, I installed vlc player via sudo apt-get install vlc. The version of VLC was 2.0.8. (Erik, one thing to be noted. This is the same version as with ubuntu13.04.) To upgrade to 2.1.0., I ran the 3 commands (using ppa). I found the version now to be VLC media player 2.0.10 Twoflower (revision 2.0.8+git20140326+r49189+13+8~ubuntu13.10.1) & not 2.1.0. With this version, the .wmv file couldn't run the video part as earlier. Only audio is running as was earlier. Here the screen shot is the same as the 1st image in this Q. So, using PPA, I couldn't upgrade to 2.1.0.

So, it's working the same way as with previous O.S. Only audio is functioning but not video.

EDIT#3

This edit is with reference to the answer posted by @erik

I'm able to compile vlc from source (option 1 as mentioned in his answer) but still the video part couldn't be played, only the audio is working as earlier.

sudo apt-get build-dep vlc
./configure
make
sudo make install

I didn't find any error in running the above commands.

Now in this version ( 2.1.0. ) also, only audio is working and not video. So, is it that G2M4 support is there in vlc version 2.1.4 (which is in ubuntu 14.04) but not in 2.1.0.?

EDIT#4

As per illuminE's answer, I'm writing the output of the ffmpeg command below. I installed ffmpeg version 0.10 via ppa as available in one of his link. But still the command failed. I feel this version can't convert the G2M4 encoded .wmv file. I'm searching for another PPA or something else to install latest version.

ravi@ravi-Aspire-5315:~$ ffmpeg -i '/home/ravi/2014-04-12_11.39_Equity_Markets-I.wmv'  -c:v libx264 -crf 23 -c:a ac3 -q:a 100 output.mp4
ffmpeg version 0.10.12-7:0.10.12-1~saucy1 Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr 26 2014 10:04:40 with gcc 4.8.1
  configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu --enable-shared --disable-static
  avutil      configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  avcodec     configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  avformat    configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  avdevice    configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  avfilter    configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  swscale     configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  swresample  configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  postproc    configuration: --arch=i386 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~saucy1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[asf @ 0x9396ac0] max_analyze_duration 5000000 reached at 5194000
[asf @ 0x9396ac0] decoding for stream 1 failed
[asf @ 0x9396ac0] decoding for stream 2 failed
[asf @ 0x9396ac0] Could not find codec parameters (Video: g2m (G2M4 / 0x344D3247), 1920x1080, 97 kb/s)
Input #0, asf, from '/home/ravi/2014-04-12_11.39_Equity_Markets-I.wmv':
  Metadata:
    WMFSDKVersion   : 12.0.9600.16384
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 1
    WM/ToolVersion  : 6.2.1 Build 1350
    WM/ToolName     : 㙉䜴呯䵯敥楴杮
    BitRateFrom the writer: 145
    Audio samples   : 612
    Video samples   : 393
    recording time  : Sat, 12 Apr 2014 13:26:37 India Standard Time
  Duration: 01:42:11.56, start: 0.000000, bitrate: 149 kb/s
    Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 1 channels, s16, 48 kb/s
    Stream #0:1: Data: none
    Stream #0:2: Video: g2m (G2M4 / 0x344D3247), 1920x1080, 97 kb/s, 10 tbr, 1k tbn, 1k tbc
Video pixel format is unknown, stream cannot be encoded

Best Answer

ffmpeg supports decoding of the G2M4 format. Why not try encoding your file to another format such as mpeg-4? Maybe:

ffmpeg -i input.wmv -c:v libx264 -crf 23 -c:a ac3 -q:a 100 output.mp4

like explained in this Q&A. I have converted the g2m4.wmv sample file here successfully. Make sure you have a recent version of ffmpeg(2.2.4 in my case). You can always try a precompiled version so you don't need to compile anything nor modify your package sources. Depending on the options chosen for encoding, this may require extra packages such as libavcodec-extra-53. In that respect you should keep track of the default packages available for your version of the distribution. You can see that vlc 2.1.4 is in 14.04 only and that both 13.04 and 13.10 have version 2.0.8.

You should note that Ubuntu's release model is not that of a rolling release so you shouldn't expect cutting edge software with older versions. Looking up the aforementioned website will let you know in advance what to expect. Otherwise as others have explained you can also resort to compiling VLC or adding a repository to use a more recent version(2.1.4 plays the G2M4 sample on my system).

Finally, you could try avconv(many examples provided) from the libav-tools package which is maybe favored by Ubuntu. It works in a very similar fashion to ffmpeg so I would try with the same options and debug from there. If you have one file it makes no sense to reinstall a distribution to try to play it.

Related Question