UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to play wmv video files?

    Scheduled Pinned Locked Moved Support
    32 Posts 4 Posters 8.0k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • flohackF Offline
        flohack @dtarrant
        last edited by

        @dtarrant BTW VLC is only an option if we woul dhave a touch-enabled, high dpi version of it. The usual desktop VLC will not be usable on a phone.

        BR

        My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          dtarrant @flohack
          last edited by

          @flohack Hi Florian, I tried to include a link, but my post was blocked as spam. That was a pity because I found information about the guitar tuition video format in question (wmv compatible with windows and Real Player). I found the article by searching:
          "Jim Bruce Blues Guitar Video Format"
          Sorry but I can't find a royalty free wmv clip.

          1 Reply Last reply Reply Quote 0
          • D Offline
            dtarrant @flohack
            last edited by

            @flohack Hi again Florian. I've just read that VLC has a comprehensive command line interface. Perhaps that could provide a useful interim solution?

            1 Reply Last reply Reply Quote 0
            • halucigeniaH Offline
              halucigenia
              last edited by

              Personally I would create a script to automatically convert all the clips in one go using the same video and audio parameters using an ffmpeg command line script.
              It would take some time to run, but if you get the parameters right and maybe scale the video to a lower resolution to suit the screen resolution of the M10 tablet if that would be appropriate, depending on the power of the machine that you run it on, it should not take 40x20 minutes.
              I would tend to use x264 codec for video and AAC audio (keeping the original audio bitrate close to the original) in an mp4 or mkv container.

              I don't do a lot of transcoding for my UT device but it would be interesting to know what others would recommend for codecs and containers for video on UT?

              ffmpeg is very powerful and configurable but it might be a steep learning curve if you have not used it before.
              If you could get some similar WMV clips with the same audio and video parameters I could probably assist though.
              You could probably do the same with the VLC command line interface but I am not personally familiar with that.

              Nexus4, Meizu MX4, Meizu Pro5, PinePhone UBPorts edition, PineTab, Pixel 3a XL

              1 Reply Last reply Reply Quote 0
              • D Offline
                dtarrant
                last edited by

                Hi, thanks for your suggestion. I agree that could be the best solution. I could run the conversion on my desktop PC which is reasonably fast. I would need to do a trial run on a single file first to make sure I have selected the correct parameters. When I transcoded a wmv file to mp4 previously, I noticed a slight audio/video sync problem which proved to be very irritating. Thanks for your offer of help, but I haven't been able to find any suitable wmv files that I can provide. The only ones I have are the actual lessons which are proprietary and I'd prefer not to make pirate copies.

                1 Reply Last reply Reply Quote 0
                • halucigeniaH Offline
                  halucigenia
                  last edited by halucigenia

                  I will test out some ffmpeg commands on some WMV files when I get home and let you know how I get on. Once you have some parameters that work OK for you on a single file setting up an automatic batch script to transcode all files from one folder to another should be easy enough.
                  What video resolution do you need the videos in?
                  What is the screen resolution of your tablet?
                  1280 x 800 - 149 ppi or Full HD 1920 x 1200 - 224 ppi ?

                  Using a high bitrate for the audio should be best, but can you tell what the original audio bitrate in those files is?

                  You might want to read and follow ffmpeg compilation guide for ubuntu or similar to get the best out of ffmpeg if you decide to use that.

                  Nexus4, Meizu MX4, Meizu Pro5, PinePhone UBPorts edition, PineTab, Pixel 3a XL

                  D 4 Replies Last reply Reply Quote 0
                  • D Offline
                    dtarrant
                    last edited by

                    Hi again, my tablet is a BQ Aquarius M10 HD. The screen resolution is listed as:

                    1280 x 800 - 149 ppi

                    1 Reply Last reply Reply Quote 1
                    • D Offline
                      dtarrant @halucigenia
                      last edited by

                      @halucigenia PS What's the recommended way to find the audio bit rate of my wmv files?

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        dtarrant @halucigenia
                        last edited by

                        @halucigenia VLC reports info on my wmv file. Not sure if this will work, but I'll try to paste screenshot:

                        file:///home/phablet/Pictures/Screenshot from 2018-01-22 17-55-14.png

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          dtarrant @halucigenia
                          last edited by

                          @halucigenia Epic fail! How do I paste an image?

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            dtarrant @halucigenia
                            last edited by

                            @halucigenia Never mind the screenshot. VLC reports:

                            Stream 0
                            Codec: Windows Media Audio 2 (WMA2)
                            Channels: Stereo
                            Sample rate: 44100 Hz
                            Bits per sample: 32

                            Stream 1
                            Codec: Windows Media Video 9 (WMV3)
                            Resolution: 720x576
                            Display resolution: 720x576
                            Frame rate: 25
                            Decoded format: 4:2:0 YUV

                            1 Reply Last reply Reply Quote 0
                            • halucigeniaH Offline
                              halucigenia
                              last edited by halucigenia

                              OK, so the video resolution is 720x576, I would not reduce that.

                              Something like

                              ffmpeg -i [input path/filename.WMV] -c:v libx264 -preset slow -tune film -crf 23 -c:a libfdk_aac -vbr 5 [output path/filename.mp4]

                              should do the trick

                              -preset slow will give better quality at the expense of speed, trying medium, fast, faster, veryfast, superfast or ultrafast would increase the speed at the expense of quality.
                              x264 can seem slow compared to other video codecs but it's quite the standard now.

                              -tune film gives good results for most video.

                              -crf 23 is actually the default for x264 but higher will reduce the video quality.

                              -vbr 5 could be lower 4 or 3 but will reduce the audio quality.

                              Other video or audio codecs are available but I find these work OK on UT.

                              I am just working on a simple batch script to process a whole directory of videos which I can share if you get ffmpeg working OK for your videos.

                              Nexus4, Meizu MX4, Meizu Pro5, PinePhone UBPorts edition, PineTab, Pixel 3a XL

                              T D 4 Replies Last reply Reply Quote 0
                              • T Offline
                                tupp @halucigenia
                                last edited by

                                @halucigenia
                                If you get ffmpeg up and running on your device, you might want to try merely playing the original video with ffmpeg's player -- "ffplay".

                                Also, you might want to try mplayer/mencoder. It's command line, like ffmpeg, but it likewise has various GUI front-ends.

                                halucigeniaH 1 Reply Last reply Reply Quote 0
                                • halucigeniaH Offline
                                  halucigenia @tupp
                                  last edited by

                                  @tupp My explanation is about how to transcode a video to play on a UT device, not about getting ffmpeg to run on a UT device.
                                  But I get your point, if you could install ffmpeg, mplayer etc. on a UT device then you could play the file from those applications. You would still need have the the codecs on the UT device to play the file though.

                                  Nexus4, Meizu MX4, Meizu Pro5, PinePhone UBPorts edition, PineTab, Pixel 3a XL

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    dtarrant @halucigenia
                                    last edited by

                                    @halucigenia Many thanks for that advice. (I tried using ffmpeg help but got errors due to aac being experimental. It advised adding "-strict -2" but then said it didn't recognize the "2".) I'll let you know how I get on with your recommended command.

                                    1 Reply Last reply Reply Quote 0
                                    • D Offline
                                      dtarrant @halucigenia
                                      last edited by

                                      @halucigenia I just tried your command and got the following error message:

                                      Unknown encoder 'libfdk_aac'

                                      I'm using Ubuntu 16.04 and installed ffmpeg using synaptic. I'll look to see if it's listed in synaptic

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        dtarrant @halucigenia
                                        last edited by

                                        @halucigenia Seems I need to compile ffmpeg in order to add libfdk_aac. That's going to drag me right out of my comfort zone. I became suspicious when you provided me with a link on how to compile ffmpeg. Enough for tonight, maybe I'll feel braver tomorrow.

                                        1 Reply Last reply Reply Quote 0
                                        • halucigeniaH Offline
                                          halucigenia
                                          last edited by

                                          dtarrant it looks like you are trying to use ffmpeg native AAC vbr so the parameters should be -c:a aac -q:a 2

                                          Try:-

                                          ffmpeg -i [input path/filename.WMV] -c:v libx264 -preset slow -tune film -crf 23 -c:a aac -q:a 2 [output path/filename.mp4]

                                          That should work, it works for me but native AAC vbr is experimental in ffmpeg so may not give good quality audio.

                                          Try cbr instead if the audio is not good enough:-

                                          ffmpeg -i [input path/filename.WMV] -c:v libx264 -preset slow -tune film -crf 23 -c:a aac -b:a 160k [output path/filename.mp4]

                                          You should not need to go to the extent of compiling ffmpeg yourself to get an acceptable result. I just meant that if you wanted to get the best out of ffmpeg you should compile.
                                          Sorry for originally giving you parameters that would require ffmpeg to be compiled with libfdk_aac, that's just what I regularly use and I didn't think about the fact that you would not be able to use it without compiling it, my bad!

                                          Nexus4, Meizu MX4, Meizu Pro5, PinePhone UBPorts edition, PineTab, Pixel 3a XL

                                          D 4 Replies Last reply Reply Quote 0
                                          • D Offline
                                            dtarrant @halucigenia
                                            last edited by

                                            @halucigenia Many thanks for your latest input. I will certainly give it a try. In the meantime I found another recommendation with a Google search. I tried it and it appears to have worked fine (no audio/video sync problem). The command line I used was as follows:

                                            ffmpeg -i input.wmf -c:v libx264 -crf 23 -c:a -strict -2 -q:a 100 output.mp4

                                            This was from Jeremy Tammik. I've little understanding of what it all means, but I can play the resulting mp4 on my laptop with both videos and VLC. Now I need to try it on my tablet.

                                            1 Reply Last reply Reply Quote 0
                                            • D Offline
                                              dtarrant @halucigenia
                                              last edited by

                                              @halucigenia Good news, the mp4 file mentioned in my previous post plays nicely on my tablet. I'll try your command line tonight and let you know how I get on. Once again, many thanks for all your support.

                                              1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post