Discussion:
[FFmpeg-user] No pixel format specified - meaning of yuv420p?
MRob
2016-12-02 00:00:25 UTC
Permalink
I'm exporting a video from an older Adobe Elements (Windows) with
intention to put it on the web (both H.264 and VP8). I exported using
Adobe's "DV AVI" which appears to be the most unmolested output format,
but I get what looks like TWO warnings, the second of which I think
causes the final error:

Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from 'video.avi':
Duration: 00:38:45.35, start: 0.000000, bitrate: 30313 kb/s
Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv411p, 720x480
[SAR 8:9 DAR 4:3], 28777 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97
tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s16, 1536 kb/s
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
x264 [error]: baseline profile doesn't support 4:2:2
[libx264 @ 0x44edec0] Error setting profile baseline.
[libx264 @ 0x44edec0] Possible profiles: baseline main high high10
high422 high444
Stream mapping:
Stream #0:0 -> #0:0 (dvvideo (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height

I see this mailing list post which may "fix" the error for me(?):
https://ffmpeg.org/pipermail/ffmpeg-user/2012-April/006013.html

But from reading that mailing list post and the error message text, it
sounds like adding "-pix_fmt yuv420p" affects the output. I do not need
to retain compatibility with terribly old devices (though I am using
baseline level 3.0), so I wanted to ask if there is a better way to
handle conversion in this case.

There is also an option in Elements to export MPEG H.264 ("1080i 25" or
"1080i 30", providing profiles main/high, levels 4/4.1, default 1 pass
bitrate of 20, etc), but I don't understand all their settings and I
trust ffmpeg to do a better job and I don't want to encode twice if
possible.

Here are the options I'm using for H.264 conversion:
-movflags +faststart -codec:v libx264 -preset veryslow -profile:v
baseline -level:v 3.0 -codec:a aac

For VP8 conversion, I only get the first warning:
Guessed Channel Layout for Input Stream #0.1 : stereo
Otherwise, it completes without any errors.

I tried "-pix_fmt yuv420p" for H.264 conversion and it completed without
error, but I'm still unsure if it was exactly what I want -- conversion
from slightly outdated platform to the web, no desire to retain
"compatibility with outdated media players" as it tells me.

Thanks for the help and thanks for the quite excellent product.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffm
Lou
2016-12-02 00:23:48 UTC
Permalink
Post by MRob
I'm exporting a video from an older Adobe Elements (Windows) with
intention to put it on the web (both H.264 and VP8). I exported using
Adobe's "DV AVI" which appears to be the most unmolested output format
DV is not a good choice: it's lossy and will mess up your width, height,
aspect ratio, etc. Install UT video. UT video is a free and open
compressed lossless format that works well as an intermediate format:

http://umezawa.dyndns.info/archive/utvideo/?C=M;O=D

Then restart Elements and export using that. Make sure Elements doesn't
change the width, height, frame rate, etc (I recall Adobe Media Encoder
doing that often). Finally, re-enode the intermediate file with ffmpeg.

[...]
Post by MRob
But from reading that mailing list post and the error message text, it
sounds like adding "-pix_fmt yuv420p" affects the output. I do not need
to retain compatibility with terribly old devices (though I am using
baseline level 3.0), so I wanted to ask if there is a better way to
handle conversion in this case.
You'll need yuv420p. Most non-FFmpeg based players and various devices
don't support anything else.
Post by MRob
There is also an option in Elements to export MPEG H.264 ("1080i 25" or
"1080i 30", providing profiles main/high, levels 4/4.1, default 1 pass
bitrate of 20, etc), but I don't understand all their settings and I
trust ffmpeg to do a better job and I don't want to encode twice if
possible.
I probably wouldn't use it either.
Post by MRob
-movflags +faststart -codec:v libx264 -preset veryslow -profile:v
baseline -level:v 3.0 -codec:a aac
You can omit -profile and -level if you don't care to support old
devices, otherwise keep it if you want widest compatibility.
Post by MRob
Guessed Channel Layout for Input Stream #0.1 : stereo
Otherwise, it completes without any errors.
Ignore.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-use
MRob
2016-12-02 01:31:05 UTC
Permalink
Thank you for the very fast response, it's appreciated.
Post by Lou
Post by MRob
I'm exporting a video from an older Adobe Elements (Windows) with
intention to put it on the web (both H.264 and VP8). I exported using
Adobe's "DV AVI" which appears to be the most unmolested output format
DV is not a good choice: it's lossy and will mess up your width, height,
aspect ratio, etc. Install UT video. UT video is a free and open
http://umezawa.dyndns.info/archive/utvideo/?C=M;O=D
Then restart Elements and export using that. Make sure Elements doesn't
change the width, height, frame rate, etc (I recall Adobe Media Encoder
doing that often). Finally, re-enode the intermediate file with ffmpeg.
Oh, thank you for that information. Unfortunately, it looks like I'm
working with Premier Elements, and after installing UT video, I don't
see any facilities to export using it. Is this a limitation of Premier?
Or am I looking in the wrong place? Thanks for the off-topic help with
that.
Post by Lou
[...]
Post by MRob
But from reading that mailing list post and the error message text, it
sounds like adding "-pix_fmt yuv420p" affects the output. I do not need
to retain compatibility with terribly old devices (though I am using
baseline level 3.0), so I wanted to ask if there is a better way to
handle conversion in this case.
You'll need yuv420p. Most non-FFmpeg based players and various devices
don't support anything else.
I see, so the reason I hadn't seen that before was because any other
videos I'd encoded likely had the yuv420p pixel format in the video
stream already?
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "unsubscribe"
Andy Furniss
2016-12-02 12:02:40 UTC
Permalink
Post by MRob
Thank you for the very fast response, it's appreciated.
Post by Lou
Post by MRob
I'm exporting a video from an older Adobe Elements (Windows)
with intention to put it on the web (both H.264 and VP8). I
exported using Adobe's "DV AVI" which appears to be the most
unmolested output format
DV is not a good choice: it's lossy and will mess up your width,
height, aspect ratio, etc. Install UT video. UT video is a free and
open compressed lossless format that works well as an intermediate
http://umezawa.dyndns.info/archive/utvideo/?C=M;O=D
Then restart Elements and export using that. Make sure Elements
doesn't change the width, height, frame rate, etc (I recall Adobe
Media Encoder doing that often). Finally, re-enode the intermediate
file with ffmpeg.
Oh, thank you for that information. Unfortunately, it looks like I'm
working with Premier Elements, and after installing UT video, I
don't see any facilities to export using it. Is this a limitation of
Premier? Or am I looking in the wrong place? Thanks for the off-topic
help with that.
Post by Lou
[...]
Post by MRob
But from reading that mailing list post and the error message
text, it sounds like adding "-pix_fmt yuv420p" affects the
output. I do not need to retain compatibility with terribly old
devices (though I am using baseline level 3.0), so I wanted to
ask if there is a better way to handle conversion in this case.
You'll need yuv420p. Most non-FFmpeg based players and various
devices don't support anything else.
I see, so the reason I hadn't seen that before was because any other
videos I'd encoded likely had the yuv420p pixel format in the video
stream already?
Possibly, or you didn't restrict to baseline.

You really should know what format the source video is is to do things
properly.

If say it's interlaced and stored as 422 or 411 then the default
conversion to 420 will be wrong. You would need to add interl=1 to the
scale filter (even then it's not truly correct, but the difference is
hard to see). If you want to keep as interlaced you would also need to
encode as MBAFF with libx264 and be sure to check field dominance is
correctly flagged in stream and container.

Of course if the source is interlaced and you just want something
"disposable" for the web rather than an archive, you could just
de-interlace it. Choices still involved = framerate/fieldrate, but may
(depending on source format) be able to avoid source chroma format issues.



_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
f
Andy Furniss
2016-12-02 12:06:13 UTC
Permalink
Post by Andy Furniss
Possibly, or you didn't restrict to baseline.
You really should know what format the source video is is to do
things properly.
If say it's interlaced and stored as 422 or 411 then the default
conversion to 420 will be wrong. You would need to add interl=1 to
the scale filter (even then it's not truly correct, but the
difference is hard to see). If you want to keep as interlaced you
would also need to encode as MBAFF with libx264 and be sure to check
field dominance is correctly flagged in stream and container.
Of course if the source is interlaced and you just want something
"disposable" for the web rather than an archive, you could just
de-interlace it. Choices still involved = framerate/fieldrate, but
may (depending on source format) be able to avoid source chroma
format issues.
Do you really need baseline - it's less efficient that other profiles,
also it won't do MBAFF.

_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-us

Loading...