[FFmpeg-user] Working with .YUV files
Rhodri James
rhodri at kynesim.co.uk
Tue Aug 14 14:26:58 CEST 2012
On Tue, 14 Aug 2012 11:51:22 +0100, fb <fatemeh.bagherpour at gmail.com>
wrote:
> Thank you so much for your reply :)
>
> At first, "YUVFilePlayer", I downloaded it from:
> http://www.softpedia.com/get/Multimedia/Graphic/Image-Convertors/YUV-File-Player.shtml
>
> let me exactly explain my problem, I have an input stream, mpeg2 or
> h264, I
> want to transcode them (at least transrate). ffmpeg does it well, but I
> want
> to do decoding and encoding separately, I mean:
>
> 1) Input.ts -> output1.YUV
> 2)output1.YUV -> output2.flv and with h264 as codec.
>
> There are several questions here :
> 1- when a player want to show a coded video (e.g h264), at first it
> should
> decode it, and as I understood the output of decoding is "raw video"
> (.yuv
> file). The player can't display such a file, so it would put it in a
> container. Right????
Wrong. The player (I assume you mean YUVFilePlayer, but this applies to
any other YUV viewer) doesn't invent anything for itself, nor should it.
A YUV file contains only the pixel data, you have to tell the player
everything else; the picture size, the pixel format, everything. It's
possible that the default pixel format ffmpeg chose (I don't off-hand know
what that is, and you didn't include the complete, uncut console output
that would tell us) isn't the same as the player's default pixel format,
for example. More likely, is the picture really 720x576 or some other
video standard?
Also, as Carl pointed out, at this point you have lost the audio. YUV
files contain *only* the pixel data, remember.
> 2- As I understood, we have "raw h264" files that they are h264 coded
> streams with no container (I mean mkv, flv, 264 and ... by container).
Um. Such things exist, but I'll be surprised if you have any of them.
> When
> we want them to be played, we should put them in a container too.
> Right???
It significantly increases the chances of a random movie player
understanding them. It's also the only way to get audio and video
together.
--
Rhodri James
Kynesim Ltd
More information about the ffmpeg-user
mailing list