SlackwareThis Forum is for the discussion of Slackware Linux.
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.
For whatever reason, XBMC refuses to play the audio. Xine plays the audio but with a distressing static noise. MPlayer and Kaffeine play the files fine.
The bottom line is XBMC and Xine seem to dislike pcm_u8 audio, or the way the audio is streamed with the video.
I also cannot fast-forward the movies with some players, such as MPlayer or SMPlayer.
I haven't found whether I can select a different format with the camera, but to avoid player problems I'd like to convert the videos. My primary focus is playing in XBMC and Xine because I have both apps configured to be controlled with a remote control.
What is the most compatible format to convert? This is with 12.2 or 13.0. I have ffmpeg, mplayer, and mencoder installed and probably all or most codecs I could use.
I'm not much of a wiz with converting. Therefore I appreciate any syntax help too.
What is the most compatible format to convert? This is with 12.2 or 13.0. I have ffmpeg, mplayer, and mencoder installed and probably all or most codecs I could use.
I feel a little odd proffering advice to a man whose website I have long pillaged for useful information . However if you are after 'most compatible' the following might be a start:
mpeg4 is pretty universal and -vtag XVID will ensure that Windows player will not choke (the FFmpeg fourcc is FFMP4 which can be a problem). mp3 sound is pretty common and you will need to specify a bitrate (-ab 88k) otherwise the default of 64k will be used. mp4 container should be common enough and it is a much better container than avi.
I feel a little odd proffering advice to a man whose website I have long pillaged for useful information.
Thanks for the compliment, but audio/video file conversions are voo-doo to me. Besides, one of the great lessons I have accepted in life is that the more I learn the more I realize how little I know.
Quote:
if you are after 'most compatible' the following might be a start:
Hmm. I tried that option. ffmpeg refused to convert, not not liking the acodec option. I have the lame-3.98.2 package installed and never had problems before.
The original file size was 67.4 MB. The new file size is 3.4 MB. Is such a file size reduction normal?
With the converted files I seem to have no problems with fast-forwarding in the apps I use. Also, there is no longer any disorienting static hum when I play the converted video in Xine.
The big test was playing in XBMC because I want to play the movies for some guests. The converted files played okay there too.
Windows is not a big concern for me. The original camera files play fine in that system.
Unfortunately, video quality deteriorated with the converted files. Tolerable perhaps with a small LCD monitor but not with a larger HD TV. Thus the conversion worked but at too high a price.
I tried the following:
ffmpeg -i filename.avi -vcodec copy filename.mp4
The sound stream converted but not the video.
Next I tried:
ffmpeg -i filename.avi -vcodec mpeg4 filename.mp4
That too converted but again the video quality was worse. The effect seems to always be a smudging/blurring of the video.
Hmm. I tried that option. ffmpeg refused to convert, not not liking the acodec option. I have the lame-3.98.2 package installed and never had problems before.
In that case I suspect that your copy of FFmpeg has not been compiled against lame. The easiest way to test this is with:
The original file size was 67.4 MB. The new file size is 3.4 MB. Is such a file size reduction normal?
I suspect what has happened is that since you have not specified either audio or video bitrates FFmpeg has chosen the defaults which are probably substantially lower than that of the input file. You have snipped the vital line, just above the 2 'Stream' lines that demonstrates the bitrate .
Quote:
Unfortunately, video quality deteriorated with the converted files. Tolerable perhaps with a small LCD monitor but not with a larger HD TV. Thus the conversion worked but at too high a price.
The easiest way to maintain quality without having to delve to far into the encoding parameters is to use the -sameq option which attempts to match the video input quality with the video output quality. This might be worth a try.
Quote:
I tried the following:
ffmpeg -i filename.avi -vcodec copy filename.mp4
The sound stream converted but not the video.
Seems a little odd, normally this would copy the video and not transcode the audio at all.
Quote:
Next I tried:
ffmpeg -i filename.avi -vcodec mpeg4 filename.mp4
That too converted but again the video quality was worse. The effect seems to always be a smudging/blurring of the video.
Again I suspect that FFmpeg has chosen the default bitrates and given you a sub-optimal transcode. You could try the -sameq option but if your copy of FFmpeg is recent there is a nice alternative.
I have misunderstood you a little perhaps when you mentioned that you were after a 'compatible' format to transcode to, and I mentioned the lowest common denominator of mpeg4 and mp3 in an mp4 container, although an avi container would have been even lower . If however you are after a good-looking conversion for playback on your own computer and a few other screens you could not go past x264 encoding and the current presets make this very easy. Something like the following:
would serve you will as long as your copy of FFmpeg is recent and has been compiled against x264. This uses the high quality x264 video preset (-vpre hq) and one pass Constant Rate Factor quality (-crf 22) and this is the syntax I use for my own relatively quick conversions. The libfaac settings might need some adjustment depending on the quality of the input sound and the final output results.
I hope my disjointed meanderings have made a little sense, I find the area of video and audio transcoding absolutely fascinating but I am still very much a student of the area.
I tried two camera files: one shrunk from 64.7 MB to 12.2 MB. The other shrunk from 153.7 MB to 20.4 MB. Such a huge change in file size!
No buzzing noise from Xine and MPlayer with fast-forward. Video quality seems the same too.
I tested the converted files with XBMC. Seems XBMC is happy with those files now too. So perhaps the file size shrinking is an insignificant issue.
Although, I admit my opinion of XBMC is dwindling each day. The app is buggy and crashes a lot. Seems the least little thing will cause the app to crash or freeze KDE. KDE freezes a lot too. Perhaps the problem is the interaction between the two. I'm going to recompile XBMC with the --disable-pulse option. I hope that helps.
Regardless, seems I now have a way to play my camera movies with XBMC and Xine. I should not have to convert all the files but that seems the only method to avoid cussing and swearing. Possibly future versions of XBMC will not be so persnickety.
Update: XBMC plays the camera movies fine if I use the DVI video connector and external speakers. The problem arises when I try to run audio through HDMI with my HD TV.
Update: I never really got back to troubleshooting the problem until recently because I had been always using XBMC on my HTPC. I think the problem with audio over HDMI is caused by the proprietary Nvidia drivers. Ever since I connected my TV to the DVI port rather than HDMI I no longer had any related problems.
Recently I used Xine on my office system to check some movies from my camera and the audio buzzing noise again appeared. I decided to investigate. I eliminated the buzzing problem with Xine by creating a new config file and then merging a handful of options from a backup copy. Something in the Xine config file caused the buzzing noise. Go figure.
Distribution: x86_64 Slack 13.37 current : +others
Posts: 459
Rep:
Besides, one of the great lessons I have accepted in life is that the more I learn the more I realize how little I know. Its the same for all reasonably honest folks,also the unknown is exactly the same whether you are looking for the Higgs Bosun or startx... LOL
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.