[FFmpeg-user] Trouble encoding h.264

Andrey Utkin andrey.krieger.utkin at gmail.com
Thu Mar 22 13:31:34 CET 2012

2012/3/22 Langdon <langdon at gmail.com>:
> I have some raw video (-f yuv4mpegpipe) and audio (-f u16le -acodec
> pcm_s16le) that I extracted from another file.
> When I try to re-encode the two parts as h.264, the sound plays OK, but the
> video is mostly gray in Media Player Classic Home Cinema, as well as when
> uploaded to YouTube.  ffplay.exe seems to play it OK, but I'm creating the
> video for mass consumption.
> Am I doing something wrong?  I had to tell ffmpeg about every attribute of
> the audio before it would work right, but I'm not sure what to tell it
> about the video.
> ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 48000 -i
> c:/alka-video/workspace/06A.cat.a -i c:/alka-video/workspace/06A.cat.v
> -vcodec libx264 -same_quant -y c:\alka-video/output/06A.avi > _h264.txt

Try dropping -same_quant option, add -b:v (video bitrate here), or
other options for quality setting.

Andrey Utkin

More information about the ffmpeg-user mailing list