Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: MP4 player needs AMV files and wont play MP4  (Read 1002 times)

0 Members and 1 Guest are viewing this topic.

DaveLembke

    Topic Starter


    Sage
  • Inventor of the Magna-Broom 3000 =)
  • Thanked: 635
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
MP4 player needs AMV files and wont play MP4
« on: July 31, 2019, 11:35:50 AM »
Bought what I thought was a good deal this MP3/MP4 player on amazon, but to my surprise there are MP4 players out there that don't handle the MP4 format.  :o ::)  https://www.amazon.com/Tomameri-Portable-Rhombic-Including-Supported/dp/B07S82TMQ3/ref=sr_1_1_sspa?crid=U1P55O3T750W&keywords=mp4+player&qid=1564594204&s=gateway&sprefix=MP4%2Caps%2C175&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyRUw2RkdETkhZRDg1JmVuY3J5cHRlZElkPUEwMDExNjU2MzhQWDZFMUE3UkI4SyZlbmNyeXB0ZWRBZElkPUEwMjgzNTIzMjY0WTc1M0NRR0k5TyZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

Looking online I found out that this player is a MP4 player that requires a AMV file format and so it wont run .MP4 encoded files and requires videos to be converted to .AMV … more on AMV format here if curious about that format, and its really great that this format is a Chinese Proprietary Format from what I read online and no documentation exists for it however "Documentation for this format is not publicly available, but Dobrica Pavlinušić reverse engineered the format[1] to produce a Perl-based decoder[3] and Pavlinušić, Tom Van Braeckel and Vladimir Voroshilov produced a version of FFmpeg that works on AMV files." : https://en.wikipedia.org/wiki/AMV_video_format

I might just send this thing back and get a refund, but if converting the MP4 files to AMV isn't troublesome I might keep it and just convert files for it and run it with AMV files, that is if I can find a way to convert them successfully.

I found online information about FFMPEG and an instruction line that someone used that is a 2 part conversion, where the MP4 is converted into an AVI file and then AVI file converted to a AMV, but haven't been able to get it to run properly. I added wildcards of * through the instruction in hopes that it would convert all files within a folder, but it errors out.

Quote
ffmpeg -i *.mp4 -s 160x128 -y *.avi ./ffmpeg-amv -i *.avi -r 16 -ac 1 -ar 22050 -qmin 3 -qmax 3 *.amv

Here below is what displays running it. *Note following the instruction one thing I am not sure of in addition to the MP4 error with use of wildcard is if -amv is a switch to the FFMPEG instruction in the second part or if its calling a different EXE that is named ffmpeg-amv as to me a 2 part I would follow with a double pipe || to run 2 instructions on same line one after another so not sure what the  ./ffmpeg-amv command exactly is/does with the leading ./ to me a leading ./ looks like a subdirectory path possibly but I am not familiar with ffmpeg instruction line arguments to follow what is proprietary to the ffmpeg argument from that of a standard command line argument of DOS instructions. Additionally thinking maybe once the correct line is given to the ffmpeg.exe that a FOR loop might also be needed so that it goes through all files with a wildcard used but not sure.

E:\AMV>ffmpeg -i *.mp4 -s 160x128 -y *.avi ./ffmpeg-amv -i *.avi -r 16 -ac 1 -ar 22050 -qmin 3 -qmax 3 *.amv
ffmpeg version N-94421-gb3b7523feb Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190716
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 32.100 / 56. 32.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 30.100 / 58. 30.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
*.mp4: Invalid argument

E:\AMV>


I bought this without looking at feedback because 4.5 stars I figured it was good. If I would have read the feedback I would have noticed that the people using this as a MP3 player are the majority of the people praising it and the few like myself who want to run MP4 files gave it low feedback rating and returned it for a refund. But if I can convert the files and get it to work without much headache I will keep it. So trying this as a last attempt to getting it to play MP4 files converted to AMV and if this doesnt work then I will return it for refund.  :-\

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1003
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows XP
Re: MP4 player needs AMV files and wont play MP4
« Reply #1 on: July 31, 2019, 04:16:23 PM »
Thanks for the heads up.  :)
MP4 is more involved that one might think.
Look at this:
https://en.wikipedia.org/wiki/MPEG-4_Part_14
Part 14  ??? Yeah, part 14
Quote
...Portable media players are sometimes advertised as "MP4 Players", although some are simply MP3 Players that also play AMV video or some other video format, and do not necessarily play the MPEG-4 Part 14 forma
I didn't want to know that.  :'(

PS The wekipedia link above has a long new list of important stuff about MP4.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1105
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 8
Re: MP4 player needs AMV files and wont play MP4
« Reply #2 on: July 31, 2019, 05:04:18 PM »
What you've got on one line I think is supposed to be two lines. You mentioned it was a two-part process- I'd assume one call to ffmpeg itself to convert the mp4 to avi, and one call to the special build of ffmpeg-amv that converts that avi to amv.

your issue I suspect with *.mp4 is because ffmpeg is built primarily for UNIX-like systems where the shell expands wildcards. ffmpeg does not expand wildcards and takes them directly and in this case *.mp4 is an invalid filename.

if you want to process all files in a folder, you'll have to come up with some kind of batch command for it. I'm sure Salmon Trout could do a better job of it (and get it into one file) but this is what I came up with using two batch files.





The main batch goes through all the mp4 files in the folder, and for each calls the second batch with the current directory (where the mp4 files are) and the name of the mp4 without the extension:

Code: [Select]
for %%P in (*.mp4) do call toamv.bat %CD%\%%~nP
The second batch file performs the conversion on the file, first converting the mp4 to an avi file with the first command, and then uses ffmpeg-amv to convert the avi to the amv format:

Code: [Select]
ffmpeg -i %1.mp4 -s 160x128 -y %1.avi
./ffmpeg-amv -i %1.avi -r 16 -ac 1 -ar 22050 -qmin 3 -qmax 3 %1.amv

It may be necessary to explicitly specify the location of the two programs rather than rely on them being in the path as well. If it works (I cannot reliably test it as I don't have ffmpeg-amv) it might also prove useful to delete the .avi file afterwards since it would stick around.

I was trying to dereference Null Pointers before it was cool.

2x3i5x



    Expert
  • Thanked: 127
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 10
Re: MP4 player needs AMV files and wont play MP4
« Reply #3 on: July 31, 2019, 10:03:54 PM »
About AMV files, just came across this converter software --> MPxConverter. Old but it may just get you squared away if you just having issues with the ffmpeg way of doing things  :P

DaveLembke

    Topic Starter


    Sage
  • Inventor of the Magna-Broom 3000 =)
  • Thanked: 635
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: MP4 player needs AMV files and wont play MP4
« Reply #4 on: August 06, 2019, 03:57:16 PM »
So BC was correct in that it was a 2 part, and when I split that into 2 lines I got it to convert the files, however the player seemed really sketchy with some lag. So its obviously not the best MP4 player out there. However I came to a solution that could have saved me from buying this.

My brother pointed out that there is VLC for Android and it supports MP4 files and I could simply put the MicroSD card into my phone and play then through that. So I took the 32GB MicroSD card from this MP3/MP4 player and installed that into my LG Phone and installed VLC Player for Android and then took the 4GB MicroSD Card from phone and put it into this MP3/MP4 player and gave it to my wife to use as a MP3 player which 4GB of space is plenty for her music.

The videos that I have play with no problems on my small android phone.

So yes files can be converted through that 2 part process but the media player guts in that MP4 player are underpowered or something to lag out. The videos play just fine on my phone.

So this is solved. Thanks Everyone for their input on this. And maybe this will save someone from losing money on this product that I shared.