Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   convert wmv to mp4? (http://www.linux-archive.org/gentoo-user/661853-convert-wmv-mp4.html)

Mark Knecht 05-01-2012 03:52 PM

convert wmv to mp4?
 
I'm looking around on the web for ways to convert wmv files to mp4. So
far the most common solution seems to be ffmpeg but when I try that it
doesn't seem to understand the video files. The most common type of
comment people give is that this should be straight forward if 32-bit
codecs are installed. I'm running 64-bit and don't see what flags I
might need to set to get that?

There is a library (libwmf) which advertises the ability to do this
but I don't seem to be using it in any application right now:

* media-libs/libwmf
Available versions: 0.2.8.4-r4 {{X debug doc expat xml}}
Homepage: http://wvware.sourceforge.net/
Description: library for converting WMF files

mark@c2stable ~/WMV-Test $ equery depends libwfm
* These packages depend on libwfm:
mark@c2stable ~/WMV-Test $


Anyone doing this successfully today or what to suggest how to do this?

Thanks,
Mark


mark@c2stable ~/WMV-Test $ ffmpeg -i Test1.wmv -f mp4 -acodec mp2
Test1.mp4
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 27 2012 16:07:57 with gcc 4.5.3
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='-O2 -march=native -pipe'
--extra-cflags='-O2 -march=native -pipe' --extra-cxxflags='-O2
-march=native -pipe' --disable-static --enable-gpl --enable-version3
--enable-postproc --enable-avfilter --disable-stripping
--disable-debug --disable-doc --disable-network --disable-vaapi
--disable-vdpau --enable-libmp3lame --enable-libvo-aacenc
--enable-libvorbis --enable-libx264 --enable-libxvid
--disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss
--disable-indev=jack --enable-x11grab --disable-outdev=oss
--enable-libfreetype --enable-libopenjpeg --disable-amd3dnow
--disable-amd3dnowext --disable-altivec --disable-avx --disable-mmx2
--disable-vis --disable-neon --cpu=host --enable-hardcoded-tables
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 @ 0x626320] max_analyze_duration 5000000 reached at 5200000
[asf @ 0x626320] decoding for stream 1 failed
[asf @ 0x626320] Could not find codec parameters (Video: none (MSS2 /
0x3253534D), 1366x740, 4971 kb/s)
Input #0, asf, from 'Test1.wmv':
Metadata:
WMFSDKVersion : 12.0.7601.17514
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0
Duration: 02:32:10.26, start: 0.000000, bitrate: 42 kb/s
Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 1
channels, s16, 20 kb/s
Stream #0:1(eng): Video: none (MSS2 / 0x3253534D), 1366x740, 4971
kb/s, 1k tbr, 1k tbn, 1k tbc
File 'Test1.mp4' already exists. Overwrite ? [y/N] y
Video pixel format is unknown, stream cannot be encoded
mark@c2stable ~/WMV-Test $



[i] media-video/ffmpeg
Available versions: 0.7.8 0.10 0.10.2{tbz2} **9999 {{(+)3dnow
(+)3dnowext X aac aacplus alsa altivec amr ass avx bindist bluray
+bzip2 cdio celt cpudetection custom-cflags debug dirac doc +encode
faac +fftools_aviocat +fftools_cws2fws +fftools_ffeval
+fftools_graph2dot +fftools_ismindex +fftools_pktdumper
+fftools_qt-faststart +fftools_trasher fontconfig frei0r gnutls gsm
+hardcoded-tables ieee1394 iwmmxt jack jpeg2k libv4l (+)mmx (+)mmxext
modplug mp3 neon network openal openssl oss pic pulseaudio
+qt-faststart rtmp schroedinger sdl speex (+)ssse3 static-libs test
theora threads truetype v4l vaapi vdpau video_cards_nvidia vis vorbis
vpx x264 xvid +zlib}}
Installed versions: 0.10.2{tbz2}(04:08:05 PM 04/27/2012)(X aac
alsa bzip2 encode fftools_aviocat fftools_cws2fws fftools_ffeval
fftools_graph2dot fftools_ismindex fftools_pktdumper
fftools_qt-faststart fftools_trasher hardcoded-tables jpeg2k mmx mp3
sdl ssse3 truetype vorbis x264 xvid zlib -3dnow -3dnowext -aacplus
-altivec -amr -ass -avx -bindist -cdio -celt -cpudetection -debug
-dirac -doc -faac -frei0r -gnutls -gsm -ieee1394 -jack -libv4l -mmxext
-modplug -neon -network -openal -openssl -oss -pic -pulseaudio -rtmp
-schroedinger -speex -static-libs -test -theora -threads -v4l -vaapi
-vdpau -vis -vpx)
Homepage: http://ffmpeg.org/
Description: Complete solution to record, convert and
stream audio and video. Includes libavcodec.

Michael Mol 05-01-2012 04:01 PM

convert wmv to mp4?
 
On Tue, May 1, 2012 at 11:52 AM, Mark Knecht <markknecht@gmail.com> wrote:
> I'm looking around on the web for ways to convert wmv files to mp4. So
> far the most common solution seems to be ffmpeg but when I try that it
> doesn't seem to understand the video files. The most common type of
> comment people give is that this should be straight forward if 32-bit
> codecs are installed. I'm running 64-bit and don't see what flags I
> might need to set to get that?
>
> There is a library (libwmf) which advertises the ability to do this
> but I don't seem to be using it in any application right now:
>
> * media-libs/libwmf
> * * Available versions: *0.2.8.4-r4 {{X debug doc expat xml}}
> * * Homepage: * * * * * *http://wvware.sourceforge.net/
> * * Description: * * * * library for converting WMF files
>
> mark@c2stable ~/WMV-Test $ equery depends libwfm
> ** These packages depend on libwfm:
> mark@c2stable ~/WMV-Test $
>
>
> Anyone doing this successfully today or what to suggest how to do this?

What you need is likely a combination of 'w32codecs' (which I expect
is an ebuild somewhere) and multilib.

Unfortunately, I don't have a Gentoo box I can ssh into any more, at
least until inara and/or kaylee are fixed. But I did have this kind of
thing working on them previously.

--
:wq

Mark Knecht 05-01-2012 04:09 PM

convert wmv to mp4?
 
On Tue, May 1, 2012 at 9:01 AM, Michael Mol <mikemol@gmail.com> wrote:
> On Tue, May 1, 2012 at 11:52 AM, Mark Knecht <markknecht@gmail.com> wrote:
>> I'm looking around on the web for ways to convert wmv files to mp4. So
>> far the most common solution seems to be ffmpeg but when I try that it
>> doesn't seem to understand the video files. The most common type of
>> comment people give is that this should be straight forward if 32-bit
>> codecs are installed. I'm running 64-bit and don't see what flags I
>> might need to set to get that?
>>
>> There is a library (libwmf) which advertises the ability to do this
>> but I don't seem to be using it in any application right now:
>>
>> * media-libs/libwmf
>> * * Available versions: *0.2.8.4-r4 {{X debug doc expat xml}}
>> * * Homepage: * * * * * *http://wvware.sourceforge.net/
>> * * Description: * * * * library for converting WMF files
>>
>> mark@c2stable ~/WMV-Test $ equery depends libwfm
>> ** These packages depend on libwfm:
>> mark@c2stable ~/WMV-Test $
>>
>>
>> Anyone doing this successfully today or what to suggest how to do this?
>
> What you need is likely a combination of 'w32codecs' (which I expect
> is an ebuild somewhere) and multilib.
>
> Unfortunately, I don't have a Gentoo box I can ssh into any more, at
> least until inara and/or kaylee are fixed. But I did have this kind of
> thing working on them previously.
>
> --
> :wq
>

That's what I remembered but I don't even see that available here:

mark@c2stable ~ $ eix w32codecs
No matches found.
mark@c2stable ~ $

I was thinking maybe it got incorporated into something else.

Thanks,
Mark

Claudio Roberto Franša Pereira 05-01-2012 04:37 PM

convert wmv to mp4?
 
You almost got it:

$ eix -c w32
[N] dev-util/w32api (--): Free Win32 runtime and import library definitions
$ eix -c win32
[N] media-libs/win32codecs ((~)20071007-r4): Windows 32-bit binary
codecs for video and audio playback support


It's also a use flag for vlc and mplayer (that's for my setup,
probably other players support it too), it will pull the package for
you.

David W Noon 05-01-2012 05:04 PM

convert wmv to mp4?
 
On Tue, 1 May 2012 08:52:04 -0700, Mark Knecht wrote about
[gentoo-user] convert wmv to mp4?:

[snip]
> There is a library (libwmf) which advertises the ability to do this
> but I don't seem to be using it in any application right now:
>
> * media-libs/libwmf
> Available versions: 0.2.8.4-r4 {{X debug doc expat xml}}
> Homepage: http://wvware.sourceforge.net/
> Description: library for converting WMF files

Firstly, .wmf files and .wmv files are radically different.

Secondly, mencoder should be able to handle such a conversion quite
easily. Something like:
mencoder ./input_file.wmv -o ./output_file.mpeg
might do the job without further ado.
--
Regards,

Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Stroller 05-01-2012 05:35 PM

convert wmv to mp4?
 
On 1 May 2012, at 17:37, Claudio Roberto Franša Pereira wrote:

> You almost got it:
>
> $ eix -c w32
> [N] dev-util/w32api (--): Free Win32 runtime and import library definitions
> $ eix -c win32
> [N] media-libs/ ((~)20071007-r4): Windows 32-bit binary
> codecs for video and audio playback support
>
>
> It's also a use flag for vlc and mplayer (that's for my setup,
> probably other players support it too), it will pull the package for
> you.

I believed that upstream mplayer considered the win32codecs USE flag (or the equivalent --whatever build-time flag) to be depreciated.

AIUI win32codecs, as per the description, uses Microsoft *binary* blobs to do the decoding. If I `emerge -f win32codecs` and look inside the tarball, I see a bunch of .dll files.

I believe that mplayer will just use its own open-source decoding code in the absence of this package.

I am certainly able to play back .wmv files here without win32codecs installed. Admittedly, I'm using xbmc to do that, and haven't recently tested using VLC or mplayer, but I would avoid installing that package unless I was sure I needed it.

Stroller.

Stroller 05-01-2012 05:45 PM

convert wmv to mp4?
 
On 1 May 2012, at 16:52, Mark Knecht wrote:

> I'm looking around on the web for ways to convert wmv files to mp4. So
> far the most common solution seems to be ffmpeg but when I try that it
> doesn't seem to understand the video files. The most common type of
> comment people give is that this should be straight forward if 32-bit
> codecs are installed. I'm running 64-bit and don't see what flags I
> might need to set to get that?

It's worth telling us *why* you want to do this. It may be better if you can avoid this conversion.

.mp4 is a container format and wikipedia tells me that WMV is a codec, but that .wmv files are usually WMV codec wrapped in an ASF container.

Since .mp4 video most always means h264 encoding, this means slow and dirty transcoding, which will inherently cause loss of video quality. You want to avoid transcoding if you can.

http://html5.xoofoo.org/video.html
http://en.wikipedia.org/wiki/Windows_Media_Video

Stroller.

Michael Mol 05-01-2012 05:51 PM

convert wmv to mp4?
 
On Tue, May 1, 2012 at 1:35 PM, Stroller <stroller@stellar.eclipse.co.uk> wrote:
>
> On 1 May 2012, at 17:37, Claudio Roberto Franša Pereira wrote:
>
>> You almost got it:
>>
>> $ eix -c w32
>> [N] dev-util/w32api (--): Free Win32 runtime and import library definitions
>> $ eix -c win32
>> [N] media-libs/ ((~)20071007-r4): Windows 32-bit binary
>> codecs for video and audio playback support
>>
>>
>> It's also a use flag for vlc and mplayer (that's for my setup,
>> probably other players support it too), it will pull the package for
>> you.
>
> I believed that upstream mplayer considered the win32codecs USE flag (or the equivalent --whatever build-time flag) to be depreciated.
>
> AIUI win32codecs, as per the description, uses Microsoft *binary* blobs to do the decoding. If I `emerge -f win32codecs` and look inside the tarball, I see a bunch of .dll files.
>
> I believe that mplayer will just use its own open-source decoding code in the absence of this package.
>
> I am certainly able to play back .wmv files here without win32codecs installed. Admittedly, I'm using xbmc to do that, and haven't recently tested using VLC or mplayer, but I would avoid installing that package unless I was sure I needed it.

There are containers, and there are codecs. Containers organize and
schedule multiple media streams (be they audio or video) to be played
simultaneously in a synchronized fashion. Codecs, by contrast,
actually encode or decode media streams from one bitstream to another.
(Typically for compression purposese).

WMV, mp4, WAV, etc. are all names given to container formats. WMV
might contain h264 internally, or it might contain one of the
"Microsoft Video" codecs, or it might even contain MPEG or MPEG2. And
any of a number of different codecs.

You use a muxer to pack audio, video and text streams into a
container, and a demuxer to split them back out. mplayer, ffmpeg,
libavcodec, vlc and friends...they're all going to have good support
for just about any *container* format you might see; container formats
are easy to reverse-engineer.

The w32codecs package is about being able to decode the
patent-protected and/or not-yet-reverse-engineered *codecs* that you
can't easily get without having the DLL files from a Windows box.
Sometimes there are open-source alternatives. Sometimes there aren't.
Sometimes that's because of patent issues, sometimes that's because
there aren't enough useful samples, and sometimes that's because
nobody cares about a codec nobody's seriously used since 1997.

--
:wq

Michael Orlitzky 05-01-2012 05:56 PM

convert wmv to mp4?
 
On 05/01/2012 11:52 AM, Mark Knecht wrote:
> I'm looking around on the web for ways to convert wmv files to mp4. So
> far the most common solution seems to be ffmpeg but when I try that it
> doesn't seem to understand the video files. The most common type of
> comment people give is that this should be straight forward if 32-bit
> codecs are installed. I'm running 64-bit and don't see what flags I
> might need to set to get that?
>

Can you play the WMV?

The "wmv" extension usually indicates an ASF container, and the ASF
container can have DRM. I see them every once in a while, and
ffmpeg/mplayer have no idea what to do with them.

Mark Knecht 05-01-2012 06:03 PM

convert wmv to mp4?
 
On Tue, May 1, 2012 at 10:45 AM, Stroller
<stroller@stellar.eclipse.co.uk> wrote:
>
> On 1 May 2012, at 16:52, Mark Knecht wrote:
>
>> I'm looking around on the web for ways to convert wmv files to mp4. So
>> far the most common solution seems to be ffmpeg but when I try that it
>> doesn't seem to understand the video files. The most common type of
>> comment people give is that this should be straight forward if 32-bit
>> codecs are installed. I'm running 64-bit and don't see what flags I
>> might need to set to get that?
>
> It's worth telling us *why* you want to do this. It may be better if you can avoid this conversion.
>
> .mp4 is a container format and wikipedia tells me that WMV is a codec, but that .wmv files are usually WMV codec wrapped in an ASF container.
>
> Since .mp4 video most always means h264 encoding, this means slow and dirty transcoding, which will inherently cause loss of video quality. You want to avoid transcoding if you can.
>
> http://html5.xoofoo.org/video.html
> http://en.wikipedia.org/wiki/Windows_Media_Video
>
> Stroller.
>
>

Hi Stroller,
I subscribed to a trading service that provides 6 1/2 hour videos
of the day's market action with audio commentary for each trading day
of the week. I like this trader who does the commentary so after the
market closes I'd like to review what he thought about the day's
action. These files are available only in wmv format. They play fine
inside of a Windows VM using Windows Media Player on my Gentoo box but
I'd prefer to be able to review them in Linux using xine or some other
app.

The quality of the video and audio isn't real high to begin with. 6
1/2 hours and they only run about 50MB each. I don't think converting
to mp4 would cause me much concern. Additionally if they are mp4 I
could watch them on my Kindle Fire.

So far I've been unsuccessful with the mencoder suggestion. I'll
keep plugging away as I think I'm done with trading today anyway. Big
move. Caught most of it. Good to take a few minutes off.

Cheers,
Mark


All times are GMT. The time now is 10:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.