Hi,
i just found settings for good video encoding for my TouchPad.
all you need is ffmpeg compiled with libx264 support and an aac encoder.
and an OS like linux, bsd, osx, ... but not windows
Code:
ffmpeg -i source.flv -f mp4 -vcodec libx264 -b 800k -aspect 16:9 -s 1024x576 -x264opts level=41:weightp=2:me=umh:bframes=0 -threads 4 -ab 96k out.mp4
Audio part:
dont set -acodec: it'll automatically choose the best AAC encoder
audio bitrate: 96k, or 128k if you have good headphones
Video part:
TouchPad support mp4 h264 High Profile Level 4.1, but suxx with bframes: added in -x264opts
also support me=umh weightp=2
aspect: if you dont know your video aspect: remove this arg
size: if the original width > 1024, set -s 1024xH and calcul the H (or you can simply halve the WxH)
otherwise remove this arg to keep the original WidthxHeigh
Other:
threads: number of you cpu
-i source.flv: the input video, can be a flv or any video file (avi, mkv ..)
out.mp4: always keep the .mp4
-b bitrate: 500k to 1000k depend on video size and quality you want
EDIT:
More x264 options for slower encoding:
level=41:weightp=2:me=umh:merange=24:bframes=0:direct=auto:rc-lookahead=60:subme=9artitions=all:trellis=2
@ KeKeTTe
can you please give more instructions on how you do it? I tried pasting the code in ffmpeg but it says profile could not be found, or many other errors that i get while playing with code.
gedas5 said:
@ KeKeTTe
can you please give more instructions on how you do it? I tried pasting the code in ffmpeg but it says profile could not be found, or many other errors that i get while playing with code.
Click to expand...
Click to collapse
ok, i'll update first post to be more portable
it's funny... i'm currently looking into converting vids since all mine are avi or mkv but when i read this post it was like i was reading a different language... lol
could you dumb it down a little... i'd appreciate it...
edit:
i'm now using Handbreak which works ok... just feels slow
@ KeKeTTe
the good thing about ffmpeg is that it produces very high quality and small size files using your code, but the problem is that it is very very slow. To convert 1h 35min .mkv movie took about 6 hours. Are you getting the same speed of covertion? Is there any way to make it faster?
By the way i believe that your code is missing part of it to work correctly.
I get it to work only if i add -strict experimental before the output file. So it looks like this:
ffmpeg -i source.flv -f mp4 -vcodec libx264 -b 800k -aspect 16:9 -s 1024x576 -x264opts level=41:weightp=2:me=umh:bframes=0 -threads 4 -ab 96k -strict experimental out.mp4
Click to expand...
Click to collapse
or just use kalemsoft media player (not free) and play almost all vids w/o reencoding (It has played everything I have thrown at it including high profile mkv's and mp4s that a Asus TF with Tegra2 cannot play. but I am sure there is a video out there that it cannot play so that is why i say almost.)
superflysocal said:
or just use kalemsoft media player (not free) and play almost all vids w/o reencoding (It has played everything I have thrown at it including high profile mkv's and mp4s that a Asus TF with Tegra2 cannot play. but I am sure there is a video out there that it cannot play so that is why i say almost.)
Click to expand...
Click to collapse
Touchplayer (via Preware) isn't bad, but i see it uses ffmpeg libs to play, not sure what exactly it supports, but avi/mkv seems fine
paperWastage said:
Touchplayer (via Preware) isn't bad, but i see it uses ffmpeg libs to play, not sure what exactly it supports, but avi/mkv seems fine
Click to expand...
Click to collapse
Touchplayer got my .mkv's working, But the subtitles were plastered on the video and I could not for the life of me find a way even to shut them off...
we only want good mp4 video for full gpu decoding (and 10h of video playing).
the only problem is the slow encoding, it encode at ~ 30 fps on my i5 2 cores
so i just use x264opt: level=41:bframes=0
Related
As you know our phone isn't really equipped to play most videos we throw at it, so what video bitrate/resolution/framerate have you found to work the best on the Optimus one?
And please mention which software you use to convert.
THIS IS IT....
xvid codec 640*360 max with ~1Mbps and mp3/aac audio are played without conversion...(your Sitcom episodes)...
Havent TRIED h264 or DIVx playback ...on the box though it does say DIVX resolution upto 320*240..
files with ogg video(theora) and ac3 audio dont play without conversion
No 720p,1080p/i playback possible...FOR ALL HIGHER resolutions/bitrate u need to convert ..i have a personal converter favourite....hassle free and its just a GUI for the wonderful FFMPEG program...herehttp://miksoft.net
Really? Mine struggles to play 624x352 24fps .mkv files. Unwatchable.
Which video player do you use on your phone?
I use Handbrake for all my videos. Starting from the "iPhone Legacy" profile, here are the settings I use to create H.264 files:
- Video: 480 x 320, H.264 (x264) codec, 768 Kbps bitrate, FPS same as source
- Audio: AAC (faac), stereo, 44.1 KHz, 128 kbps bitrate.
Image and sound are crystal clear, but of course, you can find your own favorite settings (just don't mess with the advanced settings, our CPU only handles the basic H.264 profile).
I use RockPlayer (the free version) for playback, because it can render .srt subtitles.
sarfaraz1989 said:
i have a personal converter favourite....hassle free and its just a GUI for the wonderful FFMPEG program...herehttp://miksoft.net
Click to expand...
Click to collapse
Hey, is that mik_os' company?
kewlsid05 said:
Hey, is that mik_os' company?
Click to expand...
Click to collapse
Lol I m pretty sure its not mik's company and I never said I cud play mkv files ...that container is a ***** ..
Yeah it is. And thanks for that link, it works great.
I'm using the m video player. It is pretty good and plays with subtitles. Loving it. Just that the phone doesn't support higher resolution mp4 videos. Jus the audio plays and the video drags. I use demo player to play flv. Some videos play fluently while other drag and drag!!
Also ppl if you are into h264 (like masteryx is)
U could try "any video converter" here http://www.any-video-converter.com/products/for_video_free/
It is wonderful i m using it...At these setting
h264 778Kbps 480*320
mp3 48Hz 128kbps
in .avi container..Conversion is faster than handbrake
http://developer.qualcomm.com/dev/chips/msm7x27-chipset-family
Hey...i am nt able to see any high resolution video sice past 10 days....i cud see those videos earlier bt nw whrnrver i wana play it gets stucked and then it sayd cant play video error 1,48...can u help me please?? :-(
I was wondering the same thing! *.mkv wasn't really a good experience on p500
Seeing some of the threads/questions re: Handbrake settings for the Nook, if you're having issues or just want something completely automated I found that DVD Catalyst ($10) has three presets for Nook Color (normal, fast, high quality) that work very well -- essentially just load the file or folder, select the preset and hit go. You can enable "advanced" user if you want to tweak the options but I've tested it with a couple of dvd video_ts folders and videos of different codecs (both audio and video) and they've all come out in good quality, and all playable without software decoding.
The file sizes that come out are comparable to the ones produced by presets for Handbrake people have produced here. a 1 hr 55 min video encoded for me at 1.39GB at the highest quality Nook setting.
I know it's not free like Handbrake but it might save someone headaches especially if they're wrestling with, for example, widescreen anamorphic content that isn't 16:9 or 4:3. Or if they just don't want to deal with tweaking presets
Does batch jobs as well, and has presets for a slew of other android devices if you're also converting for other formats/resolutions for your phone, etc.
is it faster then handbrake when converting the video?
Somewhat; I tested it last night for you with a 5-minute video. It took Handbrake 3 mins and 45 seconds to encode, it took DVD Catalyst 3 mins 15 seconds -- I can't (or haven't found) the command line interface to see what DVD Catalyst is writing out for its encode jobs, but I've tried to match w/e specs as closely as possible for the test (audio/video bitrate, etc.) How that will scale to larger files, I'm not entirely sure -- I batch encode all my videos before I go to bed at night.
I'd like to use AMD Video Converter as it uses the GPU to convert and is about twice as fast as Handbrake even on my Quad Core but I'm having trouble finding a way to manually control the settings for the output to match the NC needs. Anybody have any tips there?
Edit- Trying out MediaEspresso - Media Converter. So far, problems with output, will keep trying and report back. MediaEspresso settings not working with NC. It is a pretty nice encoder that has support for GPU encoding and is faster by about 50% than Handbrake, but not flexible enough to get the output that the NC needs. Working great to encode for my EVO however.
Just wanted to point out that with the speed of the NC (OC) and the range of codecs recognized by various players you hardly need to recode videos anymore.
britoso said:
Just wanted to point out that with the speed of the NC (OC) and the range of codecs recognized by various players you hardly need to recode videos anymore.
Click to expand...
Click to collapse
Have you gotten 720p videos to work smoothly with software decoding? I am only oc'ed to 1.1 Ghz and they still stutter. That's what I'm normally encoding.
*** Edit:*** Just to clarify, I mean encoding from 720p -> 480p so I can use Nook's hardware acceleration.
Both nookie froyo and the newer cm7 builds have hardware decoding
I didn't think the Nook's DSP (TI OMAP 3621) allowed native 720p decoding, only the OMAP 3630+ -- there was a thread here somewhere that said something about that. The 854x480 maximum resolution was, I thought, a hardware, not software limitation for the Nook.
From my own (meager) experience, anything higher than 480p insists on being played via software decoding regardless of what player I've used.
Some sites say 720p, others mention what you said... I just leave hd content for my bigger,hd screen
britoso said:
Just wanted to point out that with the speed of the NC (OC) and the range of codecs recognized by various players you hardly need to recode videos anymore.
Click to expand...
Click to collapse
I have moboplayer and CM7 OC to 1.3 and 720p video is still sub par via software decoding. Best results are still to handbrake recode to mp4 at 854x840.
The hardware decoding only handle mp4 files.
I tried this software to re-encode hd file to lower res mp4 and it does it lot faster than handbrake (on old P4 w/o gpu decoding GPU) : format factory : http://format-factory.softonic.fr/
Hey
I'm no expert with these things but I'm trying to get a mkv 720p file I downloaded to work on my Sony ericsson Arc. Rather than re-encode (takes ages!) I use a program called gotsent, that repackages the MKV into an MP4 that the phone can then play. Sometimes this works, and phones plays the file flawlessly, other times it fails to play. I use VLC media properties to get the information about the files. Two files the phone plays flawlessly. One already converted as it's a HD mp4 trailer from the web and the other a SD MKV that I
converted.
Fast Furious Trailer works
Stream 0
Type Video
Code: H264 - MPEG-4 AVC (part10) (avc1)
Resolution: 1280x720
Frame Rate: 23.976023
Stream 1
Type Audio
Codec: MPEG AAc Audio (mp4a)
Channels: Stereo
Sample rate: 48000Hz
SD MKV FILM COVERTED TO MP4 works
Stream 0
Type Audio
Codec: MPEG AAC Audio (mp4a)
Channels: Stereo
Sample Rate: 48000 Hz
AAC extension: SBR
Stream 1
Type: Video
Codec: H264 - MPEG-4 AVC (Part 10) (avc1)
Resolution 672.352
Frame rate: 25
Now the one that doesn't work after converting,
720p HD Mkv converted to mp4 using GotSent
Stream 0
Type Audio
Codec: MPEG AAC Audio (mp4a)
Channels: stereo
Sample rate: 48000Hz
Stream 1
Type Video
Codec H264 - MPEG-4 AVC (part 10) (avc1)
Resolution 1280x720
Frame rate 23.9767023.
Does anybody know what is going wrong and why the third file refuses to play?
Thanks for any help.
Dan
Try MoboPlayer, it's i thought free on the market. ;0
+1 for Mobo player
Thanks for the advise. However, I have tried Moboplayer, QQplayer, rock player. I find that these will all play HD files that the preinstalled player does well. However, MKV, convter MKV to MP4, the player will render using cpu only, and thus stutter.
I really belittled by how two files, looking identical in their properties, one if playing fine and the other is failing.
It is really an important feature for me, as the HDMI port and HD files will make an ideal media player/network streamer.
Cheers
As far as 720p/1080p mkv's are concerned only Samsung galaxy s1(720p) n s2 n their top end wave models can do it!
Sent from my X10i TripNMiUI using XDA App
Hi. I do know this and willing to sell my Arc to get a Galaxy s2 but the Arc is capable of hardware accelarated mp4 video.
Please read my original post. I'm not trying to play Mkv's on the device, but MP4, which has been converted from MKV H264. Some files play others will not, but their properties look identical.
i think I may have more luck asking in an encoding video sort of forum? Any of you know another forum where I may find someone who could answer my question?
Ask sony ericsson
PlayGunsta said:
Ask sony ericsson
Click to expand...
Click to collapse
u gotta be kidding lol
*Edit- Try muxing the mp4 where Stream 0 is video and Stream 1 is audio. It may be as simple as that...
if not,
Can you post the full media info for the offending file?
Look especially for Format Profile and Format settings, ReFrames. If either of these are too high that may be your problem. Format Profile should be [email protected] or lower and ReFrames should be 8 or less (I think). Even PS3 and some other devices will not play videos outside those parameters. The professionally encoded stuff will work 'cause they know this and make it work on all devices. "Other" encoders usually try to do the same but some ignore it. You can change the Profile Level without reencoding but not the ReFrames.
The only thing I can think of other than that is if the bitrate is much higher than the one that works.
* Update *
Youtube Video Samples below for comparison - some compression artifacts showing there, not from the sony tablet playback (it was flawless on either mode), most likely youtube recompression tools
Hi,
I bought one of these tablets just yesterday - 16GB version - and so far I'm extremely pleased with it! Typing is a breeze, image quality is superb, gaming is pretty decent even for 3D, I bought Riptide GP after upgrading Honeycomb to 3.2, but I'm having issues with HD mkv playback.
Basically, watching 720p or 480p even (anime mkv files) I get jerky video playback when the movie player is set to HW mode. The jerks are subtle and steady, but mostly noticeable especially on panning scenes. If I change the player settings to SW or Fast SW, playback is smooth but slightly less quality there (but totally fine though). I've tried several players other than the built-in video player and results are the same.
HD flash plays OK, so I don't think this is a hardware performance issue, probably some HW / codec compatibility issue....
Can anyone else confirm this? Horriblesubs releases (Naruto Shippuuden / Fairy Tail).
SD xvid releases play just fine, both HW and SW settings on the player.
Better .h264 codec support perhaps?
(apparently, not .h264!)
Oh, and quite pleased with the fact that video files can in fact be played directly from the SD card, without having to copy them to the internal memory storage!
I tried posting from the XDA free app in the Market, but somehow, it crashes everytime I try to post from it, so I'm using the android browser - already submitted a report.
Video Info:
Codec 4CC: AVC1
Image Size: 1280x720
Frame Rate: 23.976 fps
Global Motion Compensation: No
packet Bitstream: No
Quarter Pixel: No
Audio:
Codec: AAC
Channels: Stereo
Bitrate: 16000 Bps / 128 Kbps
Variable Bitrate: No
Frequency: 44100 Hz
SW Mode (Fast): http://www.youtube.com/watch?v=ZiAj80cC0s8
HW Mode: http://www.youtube.com/watch?v=9AXWH3RE-R4
wickwire said:
Hi,
I bought one of these tablets just yesterday - 16GB version - and so far I'm extremely pleased with it! Typing is a breeze, image quality is superb, gaming is pretty decent even for 3D, I bought Riptide GP after upgrading Honeycomb to 3.2, but I'm having issues with HD mkv playback.
Basically, watching 720p or 480p even (anime mkv files) I get jerky video playback when the movie player is set to HW mode. The jerks are subtle and steady, but mostly noticeable especially on panning scenes. If I change the player settings to SW or Fast SW, playback is smooth but slightly less quality there (but totally fine though). I've tried several players other than the built-in video player and results are the same.
HD flash plays OK, so I don't think this is a hardware performance issue, probably some HW / codec compatibility issue....
Can anyone else confirm this? Horriblesubs releases (Naruto Shippuuden / Fairy Tail).
SD xvid releases play just fine, both HW and SW settings on the player.
Better .h264 codec support perhaps?
Oh, and quite pleased with the fact that video files can in fact be played directly from the SD card, without having to copy them to the internal memory storage!
I tried posting from the XDA free app in the Market, but somehow, it crashes everytime I try to post from it, so I'm using the android browser - already submitted a report.
Click to expand...
Click to collapse
I am having the same problem you described? Is this typical on all android tablets?
Looks like i'll need to convert unfortunately... I wonder if there is an app for that.
Unless it is a codec issue and there is an alternative codec or fix..
I'm curious, do you feel the quality between HW mode and either SW mode available to be that worse? I'm using SW for now on these particular files, I was thinking about converting the files original formats but SW still seems pretty good I think! I will try to snapshot the differences and post them here!
Hadn't noticed before, the tablet comes with 3 HD sample videos inside all play just fine, no jerks - seems more and more like a specific codec compatibility issue with tegra possibly, to me...
A software issue. I can play videos fine on my Jetstream and Ipad2 which play badly on the tablet S.
So it isn't an android issue.
For MKV playback try DicePlayer and install the Diceplayer plugin for tegra.
Try the trial version to see it meets your requirements (before buying).
----- snip -----
Diceplayer uses HW video decoder.
It use HW video decoder at various containers and audio codecs combination. ( H.264/AC-3/MKV, H.264/DTS/MKV , H.264/AAC/MOV )
-------------------
yhzhrm said:
For MKV playback try DicePlayer and install the Diceplayer plugin for tegra.
Try the trail version to see it meets your requirements (before buying).
----- snip -----
Diceplayer uses HW video decoder.
It use HW video decoder at various containers and audio codecs combination. ( H.264/AC-3/MKV, H.264/DTS/MKV , H.264/AAC/MOV )
-------------------
Click to expand...
Click to collapse
Tried it, perfect playback with the plugin - bought it already, many thanks!
yeah DicePlayer indeed the best HW accelerated player in the market... support MKV, AC3 audio codec, subs... wooot
exkaizen said:
yeah DicePlayer indeed the best HW accelerated player in the market... support MKV, AC3 audio codec, subs... wooot
Click to expand...
Click to collapse
+1 I tried out MX player too but found that DicePlayer had smoother playback.
Working container / video / audio combo and easy conversion
I've tested several combinations of container / video / audio formats with several players. First of all, I didn't notice any significant differences in playback quality between the players I tried, but I might not have tried Dice player for all of the combos.
I did try MX Video Player, mVideoPlayer, MoboPlayer and BS Player Lite, with a 720p h264 encoded video track at about 3000 kbps. For all players, I found the SW decoding modes to insufferably slow and jerky - I assume a lower bitrate in the video track might fix that. Per hardware acceleration, the video always played fine (when it played at all, see format details below).
These combos did NOT work:
mkv/mp4 container, h264 encoded video, mp3 audio
mkv container, h264 encoded video, ac3 audio (plays the video hw accelerated, but doesn't play the sound at all)
mkv container, h264 encoded video, aac audio
The only combo that did work flawlessly was this:
mp4 container, h264 encoded video, aac audio
I now had the problem that my standard video encoding tool, handbrake, cannot transcode files without also recoding the video file - and why would I want to recode the video when usually it's a h264 encoded video that will play with the right container & audio? The easiest way to transcode such a file is to use ffmpeg - I did this under linux, but it should work the same for Windows:
Code:
ffmpeg -i INPUTFILE.mkv -vcodec copy -acodec libfaac -ab 160k -ar 48000 -async 48000 OUTPUTFILE.mp4
I couldn't figure out a way to easily transcode mkv files where the video track has a variable bitrate (VFR) - I had to recode those with handbrake. If anyone has a simpler method that doesn't involve avisynth / is available for linux, I'd be happy to hear it.
DicePlayer rocks. I tried various apps but only did DicePlayer works. Tested with a 1080 h.264 movie and the quality was STUNNING! Definitely worth the money
By the way, Honey does not support H.264 natively so most of the players out there won't work
zenithz said:
DicePlayer rocks. I tried various apps but only did DicePlayer works. Tested with a 1080 h.264 movie and the quality was STUNNING! Definitely worth the money
By the way, Honey does not support H.264 natively so most of the players out there won't work
Click to expand...
Click to collapse
Thanks for the heads up and for the good news! Downloading now!
Does anybody have that?
For example Apple has listed for its Ipad4
Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG‑4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
Click to expand...
Click to collapse
Where are these specs from samsung or google? When I had my Ipad 4, this helped GREATLY with converting movies to the proper format.
Rinzler said:
Does anybody have that?
For example Apple has listed for its Ipad4
Where are these specs from samsung or google? When I had my Ipad 4, this helped GREATLY with converting movies to the proper format.
Click to expand...
Click to collapse
Sort of a moving target.
The Exynos 5250 has native support for: MPEG-4/H.263/H.264 decoding and encoding and decoding only for (MPEG-2/VC-1 and VP8)
Source:
http://www.samsung.com/global/busin...t/application/detail?productId=7668&iaId=2341
BUT
The actual wrapper formats supported nativley and in what players depend on software support. Everything will play on the processor in software mode through a cpu decoder like FFMPEG being used by MX Player or BS Player from the market place (free). But software mode is not the most efficient mode and will drain the battery at a faster rate than native HW playback.
Here is what I know seems to work so far in the native player: MP4/H.264.
If anyone else has had native support with something else sound off. As to a spec sheet that is the best I can show you, but as I said it is not representative.
MrGrimace said:
Sort of a moving target.
The Exynos 5250 has native support for: MPEG-4/H.263/H.264 decoding and encoding and decoding only for (MPEG-2/VC-1 and VP8)
Source:
http://www.samsung.com/global/busin...t/application/detail?productId=7668&iaId=2341
BUT
The actual wrapper formats supported nativley and in what players depend on software support. Everything will play on the processor in software mode through a cpu decoder like FFMPEG being used by MX Player or BS Player from the market place (free). But software mode is not the most efficient mode and will drain the battery at a faster rate than native HW playback.
Here is what I know seems to work so far in the native player: MP4/H.264.
If anyone else has had native support with something else sound off. As to a spec sheet that is the best I can show you, but as I said it is not representative.
Click to expand...
Click to collapse
Are you able to smoothly playback mp4's?
If you are..what frame rate and what avc works for you best?
Step 1: download MXplayer https://play.google.com/store/apps/details?id=com.mxtech.videoplayer.ad&hl=en
Step 2: make sure your content isn't 10-bit (hint: most likely it isnt)
Step 3: Your content will play. Basically 99% of regular content will work. To be honest, I cant think of anything that hasnt worked for me, and I play high-bitrate anime with advanced substitle scripts (ASS-subs). It works fine.
Rinzler said:
Are you able to smoothly playback mp4's?
If you are..what frame rate and what avc works for you best?
Click to expand...
Click to collapse
Yes. Most of the MP4s I have tried are H.264 standard 30fps and up to 1080P. All worked on the native player
For other's experiences with MP4s up to 60fps and 1440p see this thread:
http://forum.xda-developers.com/showthread.php?t=1995176
If you are using a player like MX Player and are trying to play an Mp4 Muxed into an MKV then the video will play with hardware and you can select software for the audio (right now. this may improve in the future).
As the other poster said. Almost everything will play with MX Player. It is just a question of whether it is played using HW codecs or SW Codecs. HW codecs use built in decoding capabilities on the chip to vastly reduce the workload on the processor. SW decodes everything on the processor and then pushes it to the screen. The only difference between the two from a user perspective is efficiency and battery usage. (and on super-res files there may sometimes be slowdown in SW mode)
To be honest I have tried everything from mkvs to rms to movs to wmvs on MX Player and ALL have played successfully in the SW player.