There is this problem that I have with my 7 year old Panasonic Viera LCD TV - it just can't play certain MP4 movies. The video and audio CODECs (usually H264 for video and AAC for audio) are all compatible with what the TV supports, but it just won't play.
The problem, after much digging, is that this particular Panasonic TV model only supports playing video files that are in certain video standard resolution - 360p or 720p resolution, for example. It took me many attempts, but one workaround is to convert the video CODEC into XVID/DIVX. The size of the output file may be larger, but hey, it works.
I use ffmpeg to do the audio and video codec conversion. And this is the command that I use:
ffmpeg -i MovieInput.mp4 -c:v libxvid -qscale:v 3 -vf scale=640:232,pad=640:360:0:64:black,setdar=16:9 -c:a libmp3lame -qscale:a 4 -af "volume=12dB" MovieOutput.avi
The 'scale' parameters may vary depending on the input file. For a 1280x464 resolution movie as an example, I decided to scale it down to 640x360 16:9 resolution by:
-
bringing it down to 640x232;
-
padding the top and bottom part of the output file with 64 black pixels (a total of 128 black pixels in all) to bring it all up to 360 pixels in height.
Sorry but I don't have a powerful enough computer to do a higher resolution conversion as it takes just too long. Audio is converted to MP3. The output file is converted into an AVI file. I never tried but an MP4 file should work too.
And since I am at it, I decided to crank up the volume too by using the '-af "volume=12dB"' parameter.
0 comments:
Post a Comment