[SOLVED] ffmpeg convert to avi for Haier HEC 110 DVD player
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
One thing, of course, is the audio, but maybe I'm missing something else?
As far as the audio is concerned, I do have an mp3 codec:
Code:
ffmpeg -codecs
...
Code:
D A mp3 MP3 (MPEG audio layer 3)
D A mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A mp3on4 MP3onMP4
however
Code:
ffmpeg -i file.mp4 -f avi -acodec mp3 file.avi
gives me:
Code:
Unknown encoder 'mp3'
My basic questions then are:
1) If the first video plays on the DVD player from a USB port, what other reason besides the audio format might the second video not play?
2) How can I ensure that when I convert a video, sound is encoded in mp3 format?
Last edited by secretlydead; 08-29-2012 at 11:47 AM.
However, when I convert an mp4 to an avi using this command:
and end up with this file information:
No command there. Please repost it
Quote:
Originally Posted by secretlydead
One thing, of course, is the audio, but maybe I'm missing something else?
Could be. The DVD-player could be looking at the FOURCC of the avi file to look if the codec used is supported (you can obviously override this with a ffmpeg option) or the video bitrate etc.
Quote:
Originally Posted by secretlydead
As far as the audio is concerned, I do have an mp3 codec:
>ffmpeg -codecs
...
D A mp3 MP3 (MPEG audio layer 3)
D A mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A mp3on4 MP3onMP4
This list tells you that you can only Decode mp3 files with ffmpeg. To encode them, you'd need to install lame and recompile ffmpeg with explicit support to libmp3lame.
No problem.
To achieve a better video quality you should consider performing a 2-pass encoding or raising the bitrate.
There's an option (-sameq) which tries to obtain the same video quality of the input file by automatically adjusting bitrate and quantizer.
Of course, this will probably work with a lot of different dvd players that need to play DIVX or AVI's or whatever.
I don't possess one of these DVD players but perhaps the following would give a slightly better encode, but you may need a current git version of FFmpeg:
The first non-working avi file is a 30 fps file, which your player likely doesn't support.
Regarding the second non-working file, reading these messages I think you should fix the reported error by recreating the avi file with avidemux (as suggested by one user on that mailing list) or another tool. Maybe ffmpeg itself is sufficient for this, specifying "copy" as acodec and vcodec:
The difference I see is just in the length of the video. Could it be anything else?
Thanks, I installed xvidenc and will take a look.
The error for ffmpeg was all over the Internet with no solution, but here it is again anyway, as simple as i could test it (I tried for hours to solve this):
Code:
dan@danlaptop:/dir$ avconv -i thing.mkv -pass 2 thing.avi
avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Jun 12 2012 16:37:58 with gcc 4.6.3
[matroska,webm @ 0x809f240] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'thing.mkv':
Duration: 01:59:32.33, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264 (Main), yuv420p, 960x540, PAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16 (default)
[buffer @ 0x80e10a0] w:960 h:540 pixfmt:yuv420p
Cannot read file 'av2pass-0.log': No such file or directory
Error reading log file 'av2pass-0.log' for pass-2 encoding
dan@danlaptop:/dir$ touch av2pass-0.log
dan@danlaptop:/dir$ chmod 777 av2pass-0.log
dan@danlaptop:/dir$ avconv -i thing.mkv -pass 2 thing.avi
avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Jun 12 2012 16:37:58 with gcc 4.6.3
[matroska,webm @ 0x9d5b240] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'thing.mkv':
Duration: 01:59:32.33, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264 (Main), yuv420p, 960x540, PAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16 (default)
File 'thing.avi' already exists. Overwrite ? [y/N] y
[buffer @ 0x9d9d0a0] w:960 h:540 pixfmt:yuv420p
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
Output #0, avi, to '/dir/thing.avi':
Stream #0.0: Video: mpeg4, yuv420p, 960x540 [PAR 1:1 DAR 16:9], q=2-31, pass 2, 200 kb/s, 90k tbn, 29.97 tbc (default)
Stream #0.1: Audio: [0][0][0][0] / 0x0000, 44100 Hz, stereo, flt, 200 kb/s (default)
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
Stream #0:1 -> #0:1 (aac -> ac3)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.