LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-02-2016, 12:52 PM   #1
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
WMV is driving me nuts


OK, first time in 13 years I need to work with WMV and so far no success. These are Windows 7 ScreenRecorder files, no audio. I need to cut and crop them. So far I haven't found software capable of this. Avidemux crashes, ffmpeg does something (trying to recode) but the output is no use.
Any hints how to recode these files to MPEG-4 or any other standard format are most appreciated.
 
Old 06-02-2016, 12:57 PM   #2
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
hmmm...

can you play the wmv file on your linux platform?
 
Old 06-02-2016, 01:03 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,309

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
mencoder / mplayer --dumpstream ?
 
1 members found this post helpful.
Old 06-02-2016, 01:10 PM   #4
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
I just tried using good ol' vlc for this. I used the Convert/Save feature to save a wmv file to a mp4. If all else fails, try vlc.
 
2 members found this post helpful.
Old 06-02-2016, 01:27 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Original Poster
Rep: Reputation: Disabled
Thanks for replies.

VLC does not display anything, just sits. Will try it from CLI when I get home.

MPV can play it. Maybe it can convert it into something useful, will try.
 
Old 06-02-2016, 01:35 PM   #6
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Thanks for replies.

VLC does not display anything, just sits. Will try it from CLI when I get home.

MPV can play it. Maybe it can convert it into something useful, will try.
you might need a codec pack. In the debian world it would be w32codecs or w64codecs, depending on 32bit or 64bit OS. Although that is interesting that mpv can play it.

*** I just noticed that I do not have those codecs install, so ??? However, I do have mpv. this worked for me do do a conversion.
Code:
$ mpv inputfile.wmv -o outputfilename.mp4 -ofps 30
the command failed for me without specifying the -ofps option (output frames per second). the autodetect failed on the wmv file.

Last edited by dolphin_oracle; 06-02-2016 at 01:44 PM.
 
1 members found this post helpful.
Old 06-03-2016, 08:55 AM   #7
seasons
Member
 
Registered: Dec 2014
Distribution: siduction
Posts: 264

Rep: Reputation: 58
It's been a while since I heard anyone talk about needing w32/64codecs. Modern ffmpeg versions should have all needed support for wmv formats (though it doesn't encode wmv3):
Code:
$ ffmpeg -codecs | grep -i wmv
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
<snip>
 DEV.L. wmv1                 Windows Media Video 7
 DEV.L. wmv2                 Windows Media Video 8
 D.V.L. wmv3                 Windows Media Video 9 (decoders: wmv3 wmv3_crystalhd wmv3_vdpau )
 D.V.L. wmv3image            Windows Media Video 9 Image
 
Old 06-03-2016, 09:12 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,952

Rep: Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073
I once went to a Linux conference where the session recordings (before live streaming) we were promised were (shock, horror) wmv.

The start of morning two was interesting. Everything was hastily converted, and the riots doused with liberal amounts of coffee ...
 
Old 06-04-2016, 09:14 AM   #9
teckk
Senior Member
 
Registered: Oct 2004
Distribution: Arch
Posts: 4,992
Blog Entries: 6

Rep: Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789
Just dug out a 15 year old CDR with some .wmv on it.
Code:
ffprobe test.wmv
ffprobe version 3.0 Copyright (c) 2007-2016 the FFmpeg developers
..........
Input #0, asf, from 'test.wmv':
  Metadata:
    WMFSDKVersion   : 7.01.00.3055
    WMFSDKNeeded    : 0.0.0.0000
  Duration: 00:28:33.21, start: 0.000000, bitrate: 354 kb/s
    Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 32000 Hz, 2 channels, fltp, 32 kb/s
    Stream #0:1: Video: wmv1 (WMV1 / 0x31564D57), yuv420p, 320x240, 14.99 fps, 14.99 tbr, 1k tbn, 1k tbc
mplayer, mpv, ffplay will play it.
Code:
mplayer test.wmv
.........
[asfheader] Audio stream found, -aid 1
[asfheader] Video stream found, -vid 2
VIDEO:  [WMV1]  320x240  24bpp  1000.000 fps    0.0 kbps ( 0.0 kbyte/s)
Load subtitles in /home/teckk/
SUB: Could not determine file format
Cannot load subtitles 'test.js'.
Opening video filter: [eq brightness=10]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.26.100 (internal)
Selected video codec: [ffwmv1] vfm: ffmpeg (FFmpeg WMV1/WMV7)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 32000 Hz, 2 ch, floatle, 32.0 kbit/1.56% (ratio: 4000->256000)
Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
I could not just simply change containers
Code:
ffmpeg -i test.wmv -c:a copy -c:v copy testout.mp4
...........
[mp4 @ 0x55b9048697c0] Could not find tag for codec wmv1 in stream #0, codec not currently supported in container
I was was able change codecs and containers at the same time
Code:
ffmpeg -i test.wmv -c:a aac -b:a 128k -c:v libx264 -b:v 600k testout2.mp4
If you can't do that then dump both video and audio streams to uncompresssed file.
Code:
ffmpeg -i test.wmv -f rawvideo -c:a rawvideo testvid.raw

ffmpeg -i test.wmv -c:a pcm_s16le testaud.wav
Then put it back together with aac audio x264 video for example.
Code:
ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 320x240 -i testvid.raw -i testaud.wav -c:v libx264 -b:v 600k -c:a aac -b:a 128k testout.mp4
Code:
mplayer testout.mp4
...........
Playing testout.mp4.
libavformat version 56.25.101 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  320x240  24bpp  25.000 fps  607.6 kbps (74.2 kbyte/s)
............
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.26.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 32000 Hz, 2 ch, floatle, 133.3 kbit/6.51% (ratio: 16662->256000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 320x240 => 320x240 Planar YV12 
A:   0.5 V:   0.5 A-V:  0.002 ct:  0.006   0/  0  5%  1%  1.1% 0 0
That's a raw video so don't forget to specify size before you try and encode it.

If you want more info, ask.

Last edited by teckk; 06-04-2016 at 09:17 AM.
 
2 members found this post helpful.
Old 06-06-2016, 07:39 AM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Original Poster
Rep: Reputation: Disabled
Thanks everybody, I've been away, will give it another try when I get home.
 
Old 06-07-2016, 07:46 AM   #11
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Original Poster
Rep: Reputation: Disabled
OK, ffmpeg starts recoding but has errors. I think the Screenrecorder application used to produce these files is outputting less than perfect files. I believe now that is the reason players and editors fail. Is there any known application to fix WMV files?
 
Old 06-07-2016, 02:53 PM   #12
teckk
Senior Member
 
Registered: Oct 2004
Distribution: Arch
Posts: 4,992
Blog Entries: 6

Rep: Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789
Quote:
MPV can play it.
Will ffplay play it?
Code:
ffplay file.wmv
If not, what error do you get.

Can you post the output of
Code:
ffprobe file.wmv
And the command line arguments you are giving ffmpeg, and the error it reports.
 
Old 06-07-2016, 07:50 PM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Original Poster
Rep: Reputation: Disabled
Below is the output requested. The problem is the files are broken, ffmpeg does not crash, but produces broken output, too. All editors I've tried so far crash. Some players have apparently more error tolerance and can play these files. There seem to be some WMV repair utilities but of course you need Windows for that. Giving up.

Code:
~ $ ffprobe downloads/WMV/04042016.wmv sq=    0B f=0/0    
ffprobe version 2.8.7 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.3.0 (Gentoo 5.3.0 p1.1, pie-0.6.5)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block -ftree-vectorize' --disable-static --enable-avfilter --enable-avresample --disable-stripping --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-iconv --disable-lzma --enable-network --disable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl --enable-vaapi --enable-vdpau --enable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disable-libmodplug --enable-libopus --disable-libquvi --disable-librtmp --disable-libssh --disable-libschroedinger --disable-libspeex --enable-libvorbis --enable-libvpx --disable-libzvbi --disable-libbs2b --disable-libflite --disable-frei0r --disable-libfribidi --enable-fontconfig --enable-ladspa --enable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libaacplus --disable-libfaac --disable-libsnappy --enable-libtheora --disable-libtwolame --enable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --disable-libxvid --enable-x11grab --disable-amd3dnow --disable-amd3dnowext --disable-fma4 --disable-xop --cpu=host
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, asf, from 'downloads/WMV/04042016.wmv':
  Metadata:
    title           : ScreenRecorder
    artist          : ScreenRecorder
    copyright       : ScreenRecorder
    comment         : ScreenRecorder
    WMFSDKNeeded    : 0.0.0.0000
    DeviceConformanceTemplate: @
    WMFSDKVersion   : 12.0.7601.17514
    IsVBR           : 0
  Duration: 01:17:12.98, start: 0.000000, bitrate: 50 kb/s
    Stream #0:0(eng): Video: mss2 (MSS2 / 0x3253534D), rgb24, 1600x900, 200 kb/s, 5 tbr, 1k tbn, 1k tbc
 
Old 06-07-2016, 09:45 PM   #14
teckk
Senior Member
 
Registered: Oct 2004
Distribution: Arch
Posts: 4,992
Blog Entries: 6

Rep: Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789Reputation: 1789
Quote:
Stream #0:0(eng): Video: mss2 (MSS2 / 0x3253534D), rgb24
Ok, I found some of those here to test.
http://trac.ffmpeg.org/raw-attachment/ticket/3255/

Is uses rgb24 instead of yuv420p.
Did a little more research. This codec of Microsoft's will only play on a 32 bit machine. No, not kidding. Do a search on mss2 in .wmv files.

https://fitzcarraldoblog.wordpress.c...-64-bit-linux/
http://ubuntuforums.org/archive/inde...t-1705713.html

So out of curiosity I got a copy of mplayer for 32 bit windoze.
Code:
wget --spider http://downloads.sourceforge.net/project/mplayerwin/MPlayer-MEncoder/r37871-2/mplayer-svn-37871-2.7z
.........
Length: 11541177 (11M) [application/x-7z-compressed]
Remote file exists.
Extracted mplayer.exe and in a 32 bit wine
Code:
wine mplayer.exe testmss.wmv
Still could not play it.

These will play.
http://download.wavetlan.com/SVV/Med...P/http-wmv.htm

Put those files on a windows 7, 8 machine and save them as something else like .mp4 with win media center.

Or search for more help with mss2 codec .wmv files on linux. Good luck.
 
1 members found this post helpful.
Old 06-09-2016, 01:24 PM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051
you've given up, that's understandable.

yet, i just thought of something:
Quote:
Originally Posted by Emerson View Post
Some players have apparently more error tolerance and can play these files.
you could play the files, then make another desktop recording of that, this time with linux. it's a hassle, but shouldn't be more resource intensive than transcoding...
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help - it's driving me nuts! n4ogl Linux - Newbie 4 11-13-2005 09:28 PM
Apache driving me nuts! metaldude Linux - Newbie 2 07-24-2005 06:45 AM
Driving me nuts!! jappstam12345 Linux - Newbie 7 03-11-2005 05:51 PM
This is driving me nuts! dareino Fedora 4 06-30-2004 02:17 AM
driving me nuts!!! ihatebillgates Linux - Newbie 6 12-12-2003 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration