ffmpeg convert to avi for Haier HEC 110 DVD player
A file with this info plays in my dvd player from an SD card:
Code:
Metadata: However, when I convert an mp4 to an avi using this command: Code:
ffmpeg -i file.mp4 -f avi file.avi Code:
Metadata: 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) however Code:
ffmpeg -i file.mp4 -f avi -acodec mp3 file.avi 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? |
you could try converting it to mpeg
such as Code:
ffmpeg -i file.mp4 -target {ntsc,pal}-dvd file.mpg |
Quote:
Quote:
Quote:
Quote:
|
For the one that DOES PLAY on my dvd player:
Code:
ffprobe -show_streams file.avi|grep codec_tag Code:
codec_tag_string=XVID Code:
ffprobe -show_streams *avi |grep codec_tag Code:
codec_tag_string=FMP4 not sure if the FOURCC is causing the issue and it can be simply changed, or if it is encoded wrong. will try to answer if non one else does. |
In conclusion, for the thousands and thousands of people using a linux box to convert video's for use on the Haier HEC 110 DVD player:
Code:
ffmpeg -i file.mp4 -f avi -vtag XVID -b 897k -acodec libmp3lame file.avi The audio codec is probably not necessary, in fact, but that's where the path lead me. One other change, the: -b 897k I put that there so it would match the input, as it seems to default to 200kb/s: Code:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mp4': |
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. |
Quote:
Code:
ffmpeg -y -i file.mp4 -threads auto \ |
These work in the DVD player:
Code:
Duration: 01:15:51.04, start: 0.000000, bitrate: 1509 kb/s Code:
Seems stream 0 codec frame rate differs from container frame rate: 24000.00 (24000/1) -> 23.98 (24000/1001) Code:
Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001) Code:
[mpeg4 @ 0x9494690]Invalid and inefficient vfw-avi packed B frames detected Is there anything within this information that jumps out and tells you why the first two work while the second two do not? |
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: Code:
ffmpeg -i non-working-avi.avi -acodec copy -vcodec copy new-avi.avi |
It was the size of the screen.
The tag -s svga did it. so the final solution is: Code:
ffmpeg -i file.mp4 -f avi -vtag XVID -b 897k -acodec libmp3lame -s svga file.avi The video I'm transcoding is available from http://jimgaffigan.com/ for $5 by the way. Very funny comedian. |
Since pass 2 doesn't work on ffmpeg or avconv, I've started to use avidemux as suggested here.
|
What were the errors reported by ffmpeg/avconv?
If you'd like a more "batchable" solution you can give a try at xvidenc. |
This works:
Code:
Input #0, avi, from 'test.avi': Code:
Input #0, avi, from 'test2.avi': 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 |
You sure you've performed pass 1 prior to pass 2?
Pass 1 could be safely redirected to /dev/null as it's only needed for the log file... |
oops.
i didn't realize that -pass was telling what pass it's supposed to be doing, rather than just instructing it to do two passes. i'll work on this and write a script that splits my files into chunks small enough to play on this dvd player. |
All times are GMT -5. The time now is 08:27 PM. |