[question] What wrong with my video encoding ? - Touch HD General

Hi,
I'm trying to encode a DVD with ffmpeg on Linux, when I play my MP4 on my Touch HD, on windows media player (WM 6.5), there is a black image and only the sound ...
Here's my command line :
ffmpeg.exe -i _temp.avi -f mp4 -acodec libfaac -ab 128kb -ac 2 -ar 44100 -vcodec libx264 -b 1408kb -r 29.970 -s 640x480 -aspect 640:480 -alang en -y test.mp4 -deinterlace -vpre hq
What's wrong with this ?
Thanks in advance

someone please T.T

tried other players then wmp ?
like TCPMP ?

I think that 1408kb for the video bitrate is too high for the touchHD

I finally found a command line that works (with the same 1408kb, so that wasnt the problem)
Thanks anyway

Related

Best Video Codec/settings

So i wanna get some movies on my shweet nexus one screen.
problem is, in what format? i tried h.264 with 1500kb/s video bitrate, but that didn't seem to work, it just displays a white screen with black bars lmao
the same files that show white on the phone show up normal on VLC on the pc....
so, any recommondations on how i can get megan fox running on my screen again?
Resize your video to 800x400 This works for me
i use Anysoft Any Video Converter Professional
has a nexus one/android setting, just pick the 800x480 and you're good to go
i use the same thing, just without the 'professional' part.
aight, i'll be looking out for that thanks for the headsup psylink!
What settings do you guys suggest for Any Video Converter Free? Is Handbrake superior?
Edit: Trying Handbrake now... is it normal for it to take 2.5 hours to encode a movie that's only 1 hour and 50 minutes long? I was hoping for something relatively quick. Btw, I tried Any Video Converter Free, and the video was blocky no matter how I encoded it... the original avi is not.
should be the same settings in free, correct me if i'm wrong though.
it should have the google android / nexus one setting in the upper right hand corner in a pull down
then just below that you'll see the pulldown to change to 800x480
psylink said:
should be the same settings in free, correct me if i'm wrong though.
it should have the google android / nexus one setting in the upper right hand corner in a pull down
then just below that you'll see the pulldown to change to 800x480
Click to expand...
Click to collapse
Nope... the free version doesn't have that. Anyhow, I'm trying out Handbrake, which outputs great video, but as I stated in the other thread, it's taking longer than I'd like. Thanks for the response.
I use this ffmpeg line to encode video for my nexus one:
Code:
ffmpeg -i inputfile -s 800x480 -vcodec libx264 -acodec libfaac -ac 1 -ar 16000 -ab 32000 -aspect 16:9 outputfile.mp4
Here's a small shell script to encode all files in a directory to N1 (suitable for season packs etc):
Code:
#!/bin/bash
for file in $(ls *.mkv -c1r)
do
if [ -e $file.mp4 ]
then
echo DONE: $file
else
echo ENCODING: $file
nice -n 19 ffmpeg -i $file -s 800x480 -vcodec libx264 -acodec libfaac -ac 1 -ar 16000 -ab 32000 -aspect 16:9 $file.mp4
echo DONE: $file
fi
done

[HELP]Problem playing videos recorded with the camera

Hello, i've a big problem :
When i record a video with my camera, and i want to see it with the stock player, the video stay black and sound do " ssscccrrrr ".
But if i open the video with tcpmp, no matter.
If i put the video on my pc, with vlc, no matter.
I've tried all configuration of format to recording (MPEG4, ...), and i put off my SD card, to recording on the phone directly, it's the same way.
Why i can't play my video with the player, even on photo's tab ?
It is a codec problem? where find them ?
Thanks for your answer.
This also happens to me when I record video longer than 8 minutes/larger than 250MB. I have set the recording quality by the hints in the stickie topic here.
Even with a short video, i've the same problem, but how to set the quality recording ?
I've tried different tweaks to increase the quality, or more recording quality with Bs tweaks or XT hack beta 2, and i can't play the video ?!
I stay to think that is a codec's matter, because i can play it on my pc with vlc.
I used this tip:
63. Unlock Additional Video Recording Formats
Go to HKLM\Software\HTC\Camera\P2 and replace the EncodeFormat value with 2147483647
This will unlock all modes/resolutions listed below:
H263(3gp): CIF 352x288 \ M 176x144
MPEG4: L 320x240 \ CIF 352x288 \ VGA 640x480
3GPP2: S 128x96 \ M 176x144 \ L 320x240 \ CIF 352x288 \ VGA 640x480
MOTION JPEG: S 128x96 \ M 176x144 \ L 320x240 \ CIF 352x288 \ VGA 640x480
H264: L 320x240 \ CIF 352x288
now I have set following on my Leo:
Resolution: CIF (352x288)
Capture Format: MPEG4
Thanks for your reply, i've tried your tips, then i've few recording format, i set them like you, but when i take my video, eveythink is ok, but after took it, i want to see it, but i can't ...(with tcpmp it's ok but not with the stock player)
French stock rom Orange
ROM: 1.43.73.1
RADIO: 2.04.50.22_2
well, I cannot help you any more. I don't even know, if there are any codecs for WM devices...
maybe someone else can help? I would also like to get info why I can't record vids longer/larger than 8minutes/250MB. I actually can, but can't play it on Leo, nor the PC (VLC, Media Player Classic...).
Nobody have an idea about WM codecs ?

[Q] ffmpeg settings

Hi guys,
I'm trying to convert my 720p videos to play on the Xoom but without much success.
What I'm using is:
ffmpeg -i /mnt/Movies/MyMovie.mkv -threads 4 -vcodec libx264 -b 2048k -vpre medium -vpre baseline -f mp4 MyMovie.mp4
Xoom refuses to use Hardware decoding mode, software decoding is fine but the sound is choppy. What are your settings? I dont want to install hanbrake.
Thank you.
Grab the most current ffmpeg and use 'x264opts' settings. It now allows x264cli presets.
From your params, you're encoding in 1-pass CBR, which is guaranteed to be crappy. Either use 2-pass, or better, use one-pass w/ CRF.
Where is your -acodec param? Do you have a ffmpeg w/ libfaac?

Fastest MKV conversions ?

What program/script is the best option for converting my high profile mkv's to a usable format on my transformer. I'm not really interested in 1:1 quality as I think 720p is overkill for the 10" screen. I'm just interested in a quick and painless method that will also allow me do batches because I have quite a few films to do.
Thanks,
I tried Freemake Video Converter and it usually takes between 1.5-2 hours to convert (Core2 Quad CPU 2.33GHz). I think you'll be more then pleased with the results and file size. The other popular method takes way too long for my liking even though the results are better.
In Freemake drop movie into program > convert to apple tv > click gear icon to edit preset. Under frame rate select the rate you see in the previous screen when you dump the movie into the program. Should match. You can change bitrate also to change file size/quality (higher is larger and better quality) or leave auto.
http://www.freemake.com/free_video_converter/
Format Factory does a movie mkv -> avi in about 30-45 minutes. Depends a lot on the hardware though.
What's with all of these crappy suggestions?
The best, hands down, program for your needs will be Handbrake.
Does it do .mkv to .mp4 conversion at about 400 fps and retain full quality? YES! (assuming your .mkvs are encoded using h.264 codec you can do a video stream copy that takes about 3-5 minutes per 1 hour of material)
Does it convert to a native format that will allow you to use the stock player and not some dodgy third party player? YES!
Does it allow batch encoding? YES!
If you want to transcode to a lower quality, does it use the best encoder in the world in x264? YES!
Is it completely free and open source? YES! and YES!
Why even bother with anything else?
sassafras
sassafras_ said:
What's with all of these crappy suggestions?
The best, hands down, program for your needs will be Handbrake.
Does it do .mkv to .mp4 conversion at about 400 fps and retain full quality? YES! (assuming your .mkvs are encoded using h.264 codec you can do a video stream copy that takes about 3-5 minutes per 1 hour of material)
Does it convert to a native format that will allow you to use the stock player and not some dodgy third party player? YES!
Does it allow batch encoding? YES!
If you want to transcode to a lower quality, does it use the best encoder in the world in x264? YES!
Is it completely free and open source? YES! and YES!
Why even bother with anything else?
sassafras
Click to expand...
Click to collapse
Don't know about you but it takes hours to convert for me. 5+ hours.
XL2001 said:
Don't know about you but it takes hours to convert for me. 5+ hours.
Click to expand...
Click to collapse
takes me about 14 minutes to rip a blu-ray to h.264 with this CUDA encoder
XL2001 said:
Don't know about you but it takes hours to convert for me. 5+ hours.
Click to expand...
Click to collapse
Ah, yes. I misspoke somewhat. I don't use handbrake to stream copy but I assumed it could.
The fastest way to stream copy an .mkv into an .mp4 is with ffmpeg.
Code:
ffmpeg -i yourinputfile.mkv -f mp4 -vcodec copy -acodec libfaac -ac 2 -ab 160k youroutputfile.mp4
If you want a batch script to do it, I've written a quick one that should get the job done.
Code:
#!/bin/bash
# mp4maker.sh
# A batch mp4 making script that will convert and rename all in one step.
DIRECTORY=/shares/media/video/
FFMPEG='/usr/local/bin/ffmpeg'
find $DIRECTORY -type f -name '*.mkv' -exec $FFMPEG -i '{}' -f mp4 -vcodec copy -acodec libfaac -ac 2 -ab 160K -threads 0 '{}'.mp4 >>/dev/null 2>&1 \;
find $DIRECTORY -type f -name "*.mkv.mp4" | while read file; do
clean=`echo "$file" | sed 's/ /\\ /g'`
target=`echo "$clean" | sed 's/mkv.mp4/mp4/'`
removed=`echo "$target" | sed 's/mp4/mkv/'`
mv "$clean" "$target"
rm "$removed"
done
Probably not the most elegant, but it's simple and it gets the job done. Be sure to replace the DIRECTORY variable with the location of the files you want to convert and the FFMPEG variable with the location of your ffmpeg.
sassafras
chatch15117 said:
takes me about 14 minutes to rip a blu-ray to h.264 with this CUDA encoder
Click to expand...
Click to collapse
Too bad CUDA downright sucks quality wise.
For the best speed/quality compromise, Intel Quick Sync is the way to go.
sassafras
Get DICE Player. Easy Peazy.
No conversions needed.
Hardware Accelerated 720p mkv + AC3 sound
https://market.android.com/details?id=com.inisoft.mediaplayer.trial&feature=search_result to try
I use gotsent. Realy fast.
Sent from my Transformer TF101 using XDA Premium App
No clear answer.
I have tried many converters, free and payed for, and it all boils down to personal preferences. You will get just as many opinions as there are converters. What I understand is they basically use the same encoding process, just their own spin on a GUI. I know it will take time but just start downloading converters and start experimenting. And this forum is very good when it comes to settings if you are not using a preset. Personally, I use CloneDvd Mobile. Only beef I have with it is it optimized more for phones and not tablets. Hopefully that will change.
zephiK said:
Get DICE Player. Easy Peazy.
No conversions needed.
Hardware Accelerated 720p mkv + AC3 sound
https://market.android.com/details?id=com.inisoft.mediaplayer.trial&feature=search_result to try
Click to expand...
Click to collapse
Seemed good at first but fails on fast moving scenes. So close yet so far
mug2k said:
Seemed good at first but fails on fast moving scenes. So close yet so far
Click to expand...
Click to collapse
Mines is fine. Just doesn't play certain .avi's due to the limitations of the stock Honeycomb player. So it's only good for .mkvs. Avis I'd have to go with another player.
zephiK said:
Mines is fine. Just doesn't play certain .avi's due to the limitations of the stock Honeycomb player. So it's only good for .mkvs. Avis I'd have to go with another player.
Click to expand...
Click to collapse
What kind of mkv's are you using ?, mine are high profile 720p's.
sassafras_ said:
Ah, yes. I misspoke somewhat. I don't use handbrake to stream copy but I assumed it could.
The fastest way to stream copy an .mkv into an .mp4 is with ffmpeg.
Code:
ffmpeg -i yourinputfile.mkv -f mp4 -vcodec copy -acodec libfaac -ac 2 -ab 160k youroutputfile.mp4
If you want a batch script to do it, I've written a quick one that should get the job done.
Code:
#!/bin/bash
# mp4maker.sh
# A batch mp4 making script that will convert and rename all in one step.
DIRECTORY=/shares/media/video/
FFMPEG='/usr/local/bin/ffmpeg'
find $DIRECTORY -type f -name '*.mkv' -exec $FFMPEG -i '{}' -f mp4 -vcodec copy -acodec libfaac -ac 2 -ab 160K -threads 0 '{}'.mp4 >>/dev/null 2>&1 \;
find $DIRECTORY -type f -name "*.mkv.mp4" | while read file; do
clean=`echo "$file" | sed 's/ /\\ /g'`
target=`echo "$clean" | sed 's/mkv.mp4/mp4/'`
removed=`echo "$target" | sed 's/mp4/mkv/'`
mv "$clean" "$target"
rm "$removed"
done
Probably not the most elegant, but it's simple and it gets the job done. Be sure to replace the DIRECTORY variable with the location of the files you want to convert and the FFMPEG variable with the location of your ffmpeg.
sassafras
Click to expand...
Click to collapse
I tried this before. I believe you posted somewhere in the handbrake thread.
Question.
Why would i only get a partial converted mp4 as my result?
I find the source file, drag and drop it onto the batch file and choose my selectin. The result however has been a movie which HAS been converted but is "cut" shirt if the end. Its not the full lenght movie
By the way, thanks for the work
why not just use an app that can play a .mkv format?
turbulent28 said:
I tried this before. I believe you posted somewhere in the handbrake thread.
Question.
Why would i only get a partial converted mp4 as my result?
I find the source file, drag and drop it onto the batch file and choose my selectin. The result however has been a movie which HAS been converted but is "cut" shirt if the end. Its not the full lenght movie
By the way, thanks for the work
Click to expand...
Click to collapse
This script is specifically for the linux command line. It will not work in Windows, nor in any linux desktop environment. If you'd like a batch script for Windows, let me know and I can probably dust one up.
sassafras

720P on the transformer (encoding question)

I've just started transencoding from 1080p to 720p (bit rate around 1500-2000) for playback on my transformer (i'm using moboplayer and mxplayer). The playback is ok but not quite as smooth as I would like (and is being handled by software).
I found this thread:
http://forum.xda-developers.com/showthread.php?t=1060825
-
that suggest things are simply broken (no video palyer will use hardware decoding) and that I should reencode the streams without b-frames (which will make them significantly larger).
-
I'm currently using mencoder but the guide suggest handbreak. Before I go through the exercise
I have a couple of questions:
Woudl things work better if I use mpeg-2 instead of h.263 ?
-
Will ICS make things better (i.e, should I not go with the larger non-b frame encodings) and just wait till ICS release in a few weeks?
-
Have there been any updates ?
-
Sadly my phone (razr) seems to be faster than my tablet and has no issues playing these videos (though if it uses hardware decoding the sound is way out of sync - by minutes - but if i use software decoding they are in sync - not sure why).
-
I've tested both avi containers and kmv containers - I think I prefer avi as it is smaller (though again I have to double check if the encodings were done with the same set of options)
jake21 said:
I've just started transencoding from 1080p to 720p (bit rate around 1500-2000) for playback on my transformer (i'm using moboplayer and mxplayer). The playback is ok but not quite as smooth as I would like (and is being handled by software).
Click to expand...
Click to collapse
FYI you can tell it to handle with h/w.
The players I tried refused to play it with h/w. Is there another way to force hardware decoding ?
goodintentions said:
FYI you can tell it to handle with h/w.
Click to expand...
Click to collapse
Try BS player lite.
Sent from my PC36100 using Tapatalk
try using h.264 not 263,
try remuxing the stream rather than recoding http://forum.xda-developers.com/showthread.php?t=1102922
its far quicker
bs lite coudlnt' play it using hardware deocding either:
First test file:
mencoder -mc 0 in.mkv -vf crop=1920:800:0:140 -af volume=10:0 -nosub -oac mp3lame -lameopts abr:br=256 -ovc xvid -vf scale=1280:720 -xvidencopts bitrate=1200 -o test3.avi
file test3.avi
test3.avi: RIFF (little-endian) data, AVI, 1280 x 720, 23.98 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
Second test file:
mencoder in.mkv -af volume=15:0 -of lavf -oac mp3lame -lameopts abr:br=256 -ovc x264 -x264encopts preset=veryslow:tune=film:crf=15:frameref=15:bitrate=1500:fast_pskip=0:threads=auto -vf scale=1280:-10 -o test.mkv
--
mkvinfo test.mkv
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 1484420071
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 147)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: Lavf53.3.0
| + Writing application: Lavf53.3.0
| + Segment UID: 0x77 0x2f 0xa7 0xdf 0x88 0x3d 0xd1 0xfd 0x43 0x75 0x02 0x94 0xad 0x96 0x87 0x0a
| + Duration: 6792.096s (01:53:12.096)
|+ Segment tracks
| + A track
| + Track number: 1
| + Track UID: 1
| + Lacing flag: 0
| + Language: und
| + Codec ID: V_MPEG4/ISO/AVC
| + Track type: video
| + Default duration: 41.708ms (23.976 fps for a video track)
| + Video track
| + Pixel width: 1280
| + Pixel height: 720
| + A track
| + Track number: 2
| + Track UID: 2
| + Lacing flag: 0
| + Language: und
| + Codec ID: A_MPEG/L3
| + Track type: audio
| + Audio track
| + Channels: 2
| + Sampling frequency: 48000
| + CodecPrivate, length 12
|+ Tags
| + Tag
| + Targets
| + Simple
| + Name: ENCODER
| + String: Lavf53.3.0
|+ Cluster
jake21 said:
bs lite coudlnt' play it using hardware deocding either:
Here is the command line I used to generate the file:
mencoder in.mkv -af volume=15:0 -of lavf -oac mp3lame -lameopts abr:br=256 -ovc x264 -x264encopts preset=veryslow:tune=film:crf=15:frameref=15:bitrate=1500:fast_pskip=0:threads=auto -vf scale=1280:-10 -o test.mkv
--
mkvinfo test.mkv
Click to expand...
Click to collapse
There's your problem; the mkv container is not supported for hardware decoding. With the current firmwares, I seem to recall only .mp4 is supported.
Here's my re-encode script that I use (I use ffmpeg ; I used to use mencoder, but it's weakness with non-avi formats pushed me to ffmpeg)
Code:
#!/bin/bash
# first argument is input file,
# second argument is output file or directory
# optional third argument is crf, lower is better quality, but I've had issues with large motion screens and values lower than 22
# optional 4th arg is audio bitrate, include k.
threads=2
[email protected]
# debug
#ffmpeg="echo ffmpeg"
ffmpeg="ffmpeg"
if [[ $3 = "" ]] ; then
VRATE="22"
else
VRATE="$3"
fi
if [[ $4 = "" ]] ; then
ARATE="96k"
else
ARATE="$4"
fi
#if [ -d "$2" || -L "$2" ] ; then
if [ -d "$2" ] ; then
echo $1 | grep "\." > /dev/null ; TRET=$?
if (( $TRET == 0 )) ; then
# name as a dot
oname="$2/`echo $1 | rev | cut -f 2- -d. | rev`.mp4"
else
oname="$2/$1.mp4"
fi
else
echo $2 | grep "\." > /dev/null ; TRET=$?
if (( $TRET == 0 )) ; then
# name as a dot
oname="`echo $2 | rev | cut -f 2- -d. | rev`.mp4"
else
oname="$2.mp4"
fi
fi
# tune Values available: film, animation, grain, stillimage, psnr, ssim, fastdecode, zerolatency.
# new ffmpeg crashes with -profile baseline
$ffmpeg -i $1 -acodec libfaac -ac 2 -ab $ARATE -vprofile baseline -vcodec libx264 -x264opts threads=$threads:level=31:keyint=250:keyint_min=25:bframes=0:crf=$VRATE $oname
The script is fairly simple, but I still find it quite useful. Note, don't do "script infile.mp4 . " as that will over write your source file, and I note I don't check for that. Maybe ffmpeg might, but it's a silly enough issue that I'm not fixing that.
I've never had an issue with mx player nor mobo player not doing hardware decoding (even via smb streaming with es file manager) , however since 3.11.1 on revolver, mobo player force closes when I quit, but I think that's a mobo player issue, as it often locks up my Galaxy-S with hardware, or software encoding in the latest version.
[update; ble the provided script did not work with ubuntu 11.10; I think they changed the switches for ffmpeg as it could not parse the switches after x264 nor baseline switch].
Ok thanks. Surprise the first example I have above, which is an avi file, did not work either
--
I'll look at what you have - i have to figure out how to scale down the image to 720p (from the man page it looks like ffmpeg does not support -vf scale=1280:-1)
-
Before I go to the effort of learning how to use ffmpeg; do you know if ICS will resolve this issue ?
[btw I have the same force-close issue with mobo on razr and transformer]
nobeagle said:
There's your problem; the mkv container is not supported for hardware decoding. With the current firmwares, I seem to recall only .mp4 is supported.
Here's my re-encode script that I use (I use ffmpeg ; I used to use mencoder, but it's weakness with non-avi formats pushed me to ffmpeg)
Code:
#!/bin/bash
# first argument is input file,
# second argument is output file or directory
# optional third argument is crf, lower is better quality, but I've had issues with large motion screens and values lower than 22
# optional 4th arg is audio bitrate, include k.
threads=2
[email protected]
# debug
#ffmpeg="echo ffmpeg"
ffmpeg="ffmpeg"
if [[ $3 = "" ]] ; then
VRATE="22"
else
VRATE="$3"
fi
if [[ $4 = "" ]] ; then
ARATE="96k"
else
ARATE="$4"
fi
#if [ -d "$2" || -L "$2" ] ; then
if [ -d "$2" ] ; then
echo $1 | grep "\." > /dev/null ; TRET=$?
if (( $TRET == 0 )) ; then
# name as a dot
oname="$2/`echo $1 | rev | cut -f 2- -d. | rev`.mp4"
else
oname="$2/$1.mp4"
fi
else
echo $2 | grep "\." > /dev/null ; TRET=$?
if (( $TRET == 0 )) ; then
# name as a dot
oname="`echo $2 | rev | cut -f 2- -d. | rev`.mp4"
else
oname="$2.mp4"
fi
fi
# tune Values available: film, animation, grain, stillimage, psnr, ssim, fastdecode, zerolatency.
# new ffmpeg crashes with -profile baseline
$ffmpeg -i $1 -acodec libfaac -ac 2 -ab $ARATE -vprofile baseline -vcodec libx264 -x264opts threads=$threads:level=31:keyint=250:keyint_min=25:bframes=0:crf=$VRATE $oname
The script is fairly simple, but I still find it quite useful. Note, don't do "script infile.mp4 . " as that will over write your source file, and I note I don't check for that. Maybe ffmpeg might, but it's a silly enough issue that I'm not fixing that.
I've never had an issue with mx player nor mobo player not doing hardware decoding (even via smb streaming with es file manager) , however since 3.11.1 on revolver, mobo player force closes when I quit, but I think that's a mobo player issue, as it often locks up my Galaxy-S with hardware, or software encoding in the latest version.
Click to expand...
Click to collapse
I could not get the provided script to work (ffmpeg would not accept the args). I did a little searching and saw one suggestion to install everythign from source and build - BUT the test encodings I made last night worked on both the phone and tablet using hardware encoding. On the phone mx player was fine; on the tablet mx player would only use software encoding but bs lite (which seemed pretty nice) worked fine and indicated it was using hardware decoding.
So I think I'm mostly set. the only issue I have is that sometimes mencoder dies on some streams with floating error when it reads the initial header - so I guess I should track that one down - when I get home tonight I'll post the args I used that worked and then ones that result in floating point error (on some streams).
Thanks for the help !

Categories

Resources