View Full Version : Making a Divx Play on my standalone player
H8_2BU
10th August 2005, 02:36
I did a search here and haven't found what I was looking for yet.
I used to own a lite-on lvd2002 stand alone player and while it lasted (about a year and a half) it played pretty much everything I put in it. Unfortunately the drive went bad so I decided to try out the Philips DVP642 which I got an amazing deal on. Most of the movies I have backed up to divx were done on a windows box but as I started to get better with linux I began using most of the tools listed in the sticky at the top of this forum. I really like mencoder but am still learning about everything I can do at the command line. Gmencoder seemed like a pretty decent gui for mencoder so I had been using that. The problem I am having is the output divx files I have created or want to create specify the video codec as FMP4. The divx files I created under windows state the video codec as DX50. All files with the DX50 codec will play on this Philips. None created under linux with the FMP4 will play.
I read an article here http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide#The_Basics which states the following.. "You might need to include -ffourcc DX50 on the command line for the video to play on some (most?) media players (e.g. all media players under Windows that I tested). The reason is that although the video produced is an MPEG4, its header uses the code FMP4 which is not widely recognised. A header with DX50 claims that the video is DivX 5 (hence MPEG4) compatible and should therefore play on any media player that can play MPEG4 video. "
The thing is if I pass what was suggested above to mencoder, i get an error.
MEncoder 1.0pre7-SUSE-9.2-i686-Packman-3.3.4 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi
Also, what am I to do about the movies I alread have backed up that will not play? Is it possible to simply change the codec value? What is or is there a procedure to make a divx file that will play on my stand alone dvd player? This problem is only related to movies I try to encode under linux.
My systems specs are...
Pentium 4 2.4/533
512mb Mushkin
Suse Linux 9.2
Fully update from Suse since 8/09/2005
Any help or ideas as to how I can make these files play on my Philips would be greatly appreciated.
-H8
KpeX
14th August 2005, 17:44
For the failed mencoder command, can you post your full commandline and the full output?
You absolutely can change fourcc's of already encoded videos. Try mencoder file.avi -oac copy -ovc copy -ffourcc DX50 -o dx50.avi Also there is a CLI version of Moitah's MPEG4 Modifier that runs using mono.
H8_2BU
15th August 2005, 01:40
For the failed mencoder command, can you post your full commandline and the full output?
You absolutely can change fourcc's of already encoded videos. Try mencoder file.avi -oac copy -ovc copy -ffourcc DX50 -o dx50.avi Also there is a CLI version of Moitah's MPEG4 Modifier that runs using mono.
Here is an example of what I have tried to run..
rtd@linux:~/videoprocessing1/divx> mencoder Get\ Shorty.avi -oac copy -ovc copy
-ffourcc DX50 -o getshorty.avi
MEncoder 1.0pre7-SUSE-9.2-i686-Packman-3.3.4 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x2f673600
AVI file format detected.
VIDEO: [MPG4] 384x288 24bpp 23.976 fps 878.8 kbps (107.3 kbyte/s)
[V] filefmt:3 fourcc:0x3447504D size:384x288 fps:23.98 ftime:=0.0417
videocodec: framecopy (384x288 24bpp fourcc=3447504d)
Forcing output fourcc to 30355844 [DX50]
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=16000 sample-1)
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos:6288.5s 150772f (100%) 1813fps Trem: 0min 753mb A-V:0.042 [878:128]
Writing AVI index...
Fixing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Video stream: 878.851 kbit/s (109856 bps) size: 690826638 bytes 6288.455 secs 150772 frames
Audio stream: 128.000 kbit/s (16000 bps) size: 100609757 bytes 6288.110 secs
The completed file does indicate that it is a DX50 however my Philips complains about an unsupported codec. I am beginning to wonder if the Philips is just too picky. I won't buy another lite-on as my lvd2002 only lasted a year and a half.
H8_2BU
15th August 2005, 05:30
Today I ran the following..
mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800 -ffourcc DX50 /home/zeek/videoprocessing1/lord\ of\ the\ flies/VIDEO_TS/VTS_01_1.VOB -o /home/zeek/videoprocessing1/complete/lordofflies.avi
I decided to keep it simple just to see what the outcome would be. I also tried the same command for another movie as well. Both movies have the same result. The movie(s) will begin to play on the Philips. After exactly 33 second, both movies just hung there. So it would seem that I am getting closer yet a problem remains.
I have also tried various other things with mencoder but get errors..
mencoder -ovc xvid -xvidencopts pass=1:vhq=1:qpel:chroma_me:max_bframes=2:bquant_ratio=150:bquant_offset=75:bf_threshold=0
-sws 9 -vf crop=720:436:0:74,scale=640:272 -o movie.avi -
zeek@linux:~/videoprocessing1/taking lives/VIDEO_TS> mencoder VTS_01_1.VOB -nosound -ovc xvid pass=1:vhq=1:qpel:chroma_me:max_bframes=2:bquant_ratio=150:bquant_offset=75:bf_threshold=0 -sws 9 -vf crop=720:436:0:74,scale=640:272 -o takinglivestry6.avi -
MEncoder 1.0pre7-SUSE-9.2-i686-Packman-3.3.4 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x16c24800
MPEG-PS file format detected.
VIDEO: MPEG2 720x480 (aspect 2) 29.970 fps 7500.0 kbps (937.5 kbyte/s)
[V] filefmt:2 fourcc:0x10000002 size:720x480 fps:29.97 ftime:=0.0334
Couldn't find video filter 'xvid'.
Failed to open the encoder.
If I try xvid, divx I get the Couldn't find video filter complaint.
mxmailman
19th September 2005, 07:56
Making DivX videos with mencoder for this standalone player is a pain in the butt. :mad:
That said, I believe it *is* possible. One tool that might be helpful is encode2mpeg (http://encode2mpeg.sf.net). This is a wrapper around many video/audio encoding tools that makes it easy to create homebrew VCD/SVCDs, DIVX videos, and DVDs. It's command-line driven and not very user-friendly, but learning it is worth the effort and saves me tons of time messing with mencoder and related tools. encode2mpeg has handy options like "-usesbr 2" which picks the bitrate necessary to fit all data on a 700MB CD. I stopped using mencoder single-pass encoding because encode2mpeg makes video that takes up the same amount of disk space but looks much better.
Here are some examples for encoding video to DIVX in a way that will work on
the DVP642:
encode2mpeg input_movie.avi -o output_movie -ffourcc DIVX -avionly -encode 3 -usesbr 2
-encode 3 ... Slow, good compression two pass mode.
-avionly ... Just make an .avi video, don't burn to CD or anything. (encode2mpeg can burn CDs as well as encode video)
-usesbr 2 ... Use bitrate necessary to fit all data on a 700MB CD.
encode2mpeg input_movie.avi -o output_movie -ffourcc DIVX -avi -setaspect 3
-avi ... just make a decent DivX movie in an AVI container
-setaspect 3 ... encode the video at 512x384 (4/3)
encode2mpeg basically just wraps mencoder, but also uses other video/audio encoding tools as necessary. I still haven't perfected DivX encoding for the DVP642, but I feel like I'm getting closer. The main problems with DivX encoding for the DVP642 using mencoder are as follows (as far as I can tell):
resolution too big. Use 640x480 or smaller.
bad fourcc header. Set it to DIVX, or try XVID.
I don't think high bitrates are a problem for the DVP642, but I'm not sure. I think qpel and gmc are disabled by default, but of that I'm also unsure. Adding to my frustration, it seems to be very easy for Windows users to encode videos for use in the DVP642. We can do it! Let's just keep trying different combinations until we create the forumula to make perfect encodings with mencoder/encode2mpeg!
It's also very easy to make SVCDs for the DVP642 using '-stdvid 6'. Just check out the documentation, there are tons of examples. I'm playing around with making DVDs, but I don't have any done yet.
Here's an example of an SVCD I made of my wedding video:
encode2mpeg -o wedding -n n -stdvid 6 my_wedding.avi
my_wedding.avi was a dump right off a DVD that my cousin made. The final result was an SVCD that worked perfectly in the DVP642. It may be helpful to add '-mpegonly' or '-imageonly' to keep encode2mpeg from trying to burn the image onto the CD, but you can always just press CTRL-C.
One final note, I actually try to use k3b (http://www.k3b.org) as much as possible for the actual erasing/burning (it's a very nice program), but it doesn't seem to do video encoding (yet), otherwise I probabaly wouldn't mess with all these extremely powerful and unwieldy tools. I just want to encode some stinking video. I don't care about harddup, qpel, or anything! It just needs to look and sound decent. :)
There might also be some useful info for you in the following posts:
mencoder / philips dvp642 woes (http://forums.divx.com/groupee/forums/a/tpc/f/531101651/m/505107852/r/505107852)
Philips 642 and MEncoder/ffmpeg/libavcodec (http://forums.divx.com/eve/ubb.x/a/tpc/f/531101651/m/248100742/r/456101742)
DVP-642 and xvid/divx (and Linux) (http://groups.google.com/group/alt.video.divx/browse_thread/thread/25f26a8c6c66acd6/1168d708ca0b0329?tvc=2)
Also, if you find success, please share your results!
hellfred
19th September 2005, 16:56
Today I ran the following..
mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800 -ffourcc DX50 /home/zeek/videoprocessing1/lord\ of\ the\ flies/VIDEO_TS/VTS_01_1.VOB -o /home/zeek/videoprocessing1/complete/lordofflies.avi
I decided to keep it simple just to see what the outcome would be. I also tried the same command for another movie as well. Both movies have the same result. The movie(s) will begin to play on the Philips. After exactly 33 second, both movies just hung there. So it would seem that I am getting closer yet a problem remains.
I have also tried various other things with mencoder but get errors..
mencoder -ovc xvid -xvidencopts pass=1:vhq=1:qpel:chroma_me:max_bframes=2:bquant_ratio=150:bquant_offset=75:bf_threshold=0
-sws 9 -vf crop=720:436:0:74,scale=640:272 -o movie.avi -
zeek@linux:~/videoprocessing1/taking lives/VIDEO_TS> mencoder VTS_01_1.VOB -nosound -ovc xvid pass=1:vhq=1:qpel:chroma_me:max_bframes=2:bquant_ratio=150:bquant_offset=75:bf_threshold=0 -sws 9 -vf crop=720:436:0:74,scale=640:272 -o takinglivestry6.avi -
MEncoder 1.0pre7-SUSE-9.2-i686-Packman-3.3.4 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x16c24800
MPEG-PS file format detected.
VIDEO: MPEG2 720x480 (aspect 2) 29.970 fps 7500.0 kbps (937.5 kbyte/s)
[V] filefmt:2 fourcc:0x10000002 size:720x480 fps:29.97 ftime:=0.0334
Couldn't find video filter 'xvid'.
Failed to open the encoder.
If I try xvid, divx I get the Couldn't find video filter complaint.
For me, it looks like the mencoder you are using was not build with support for xvid/divx. Try
mencoder -ovc help
and see, if xvid and divx are being listed.
If they are missing, you have to install xvid and divx on your computer and then compile mplayer yourself. The README file in the mplayer source tarball - use a "daily CVS snapshot source" to be able to use xvids VBV and profile support from here (http://www.mplayerhq.hu/homepage/design5/dload.html) - will guid you through the necessary steps to build mplayer/mencoder yourself.
It will come down to typing
./configure (--prefix=/opt/mplayer)
make
su
make install
I suggest the prefix /opt/mplayer for installing mplayer to its own directory, so your current mplayer/mencoder is not overwritten, and uninstalling the selfmade mplayer can be don by simply removing the directory in /opt.
To run mencoder from /opt, either put in in your PATH variable in fornt of /usr/local/bin (I am assumint, that your mencoder ist installed there) or by giving an absolut path to /opt/mplayer/bin/mencoder
On the mplayer cygwin mailing list, there is an mplayer compiling HOWTO. There you get an idear, which libraries can be used by mplayer/mencoder, where to get them and how to compile them. For xvid under linux, installing can be done by running "make install", no need to copy/rename the libs manually.
Hellfred
H8_2BU
15th October 2005, 23:19
For me, it looks like the mencoder you are using was not build with support for xvid/divx. Try
mencoder -ovc help
and see, if xvid and divx are being listed.
If they are missing, you have to install xvid and divx on your computer and then compile mplayer yourself. The README file in the mplayer source tarball - use a "daily CVS snapshot source" to be able to use xvids VBV and profile support from here (http://www.mplayerhq.hu/homepage/design5/dload.html) - will guid you through the necessary steps to build mplayer/mencoder yourself.
It will come down to typing
./configure (--prefix=/opt/mplayer)
make
su
make install
I suggest the prefix /opt/mplayer for installing mplayer to its own directory, so your current mplayer/mencoder is not overwritten, and uninstalling the selfmade mplayer can be don by simply removing the directory in /opt.
To run mencoder from /opt, either put in in your PATH variable in fornt of /usr/local/bin (I am assumint, that your mencoder ist installed there) or by giving an absolut path to /opt/mplayer/bin/mencoder
On the mplayer cygwin mailing list, there is an mplayer compiling HOWTO. There you get an idear, which libraries can be used by mplayer/mencoder, where to get them and how to compile them. For xvid under linux, installing can be done by running "make install", no need to copy/rename the libs manually.
Hellfred
YEP! Thats exactly it. Thanks a million.
-H8
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.