2

Hi I am trying to convert a wmv video to mp4 using h264 baseline profile.

avconv -i 'Video2.WMV' \
-vcodec libx264 -preset ultrafast -profile baseline \
-acodec aac -strict experimental \
-r 24 -b 255k -ar 44100 -ab 59k 'Video2.mp4'

But it is showing following errors:

[aac @ 0x707e40] [Eval @ 0x7fff0c8db800] Undefined constant or missing '(' in 'baseline'
[aac @ 0x707e40] Unable to parse option value "baseline"
[aac @ 0x707e40] Error setting option profile to value baseline.

Profile setting is causing the errors. If I run the command:

avconv -i 'Video2.WMV' \
-vcodec libx264 -preset ultrafast \
-acodec aac -strict experimental \
-r 24 -b 255k -ar 44100 -ab 59k 'Video2.mp4'

Then it works fine.

What is the correct method of setting h264 profile in avconv command? Running Ubuntu 13.04 and latest libavtools

Braiam
  • 67,791
  • 32
  • 179
  • 269
Junaid
  • 505

1 Answers1

6

Try with:

avconv -i 'Video2.WMV' \
-vcodec libx264 -preset ultrafast -profile:v baseline \
-acodec aac -strict experimental \
-r 24 -b 255k -ar 44100 -ab 59k 'Video2.mp4'

-profile:v ensures the baseline profile is applied to video only

Cubiq
  • 1,455
  • I was grabbing input from screen with -f x11grab but baseline didn't work, complaining with Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height untill i've set the pixel format to -pix_fmt yuv420p, The default pixel format for code libx264 it's yuv440. Now it can be playable on my phone. – m3nda Feb 14 '17 at 00:35