Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd February 2010, 10:37   #1  |  Link
koliva
Beginner
 
koliva's Avatar
 
Join Date: Jan 2009
Location: Europe
Posts: 125
Question about ffmpeg

Dear all,

I have asked a question about encoding step by using ffmpeg. Now the problem is decoding. Whatever I do, I got always "could not find codec parameters",

For encoding,

Quote:
ffmpeg -i out_%d.bmp -f rawvideo output.yuv
This is okay but how I can get my images back from output.yuv file?
I have tried

Quote:
ffmpeg -i output.yuv -s 1400x800 rawvideo -f image2 out1_%d.bmp
but it didn't work.

Another question is, rawvideo means 4:0:0 or 4:2:2 ?
koliva is offline   Reply With Quote
Old 22nd February 2010, 11:11   #2  |  Link
Boolsheet
Registered User
 
Join Date: Apr 2009
Location: Switzerland
Posts: 69
You have to put the resolution, framerate and colorspace for the raw file before the -i parameter. This way FFmpeg knows how to apply them correctly:
Quote:
ffmpeg -s 1400x800 -vcodec rawvideo -f rawvideo -pix_fmt yuv422p -i output.yuv -vcodec bmp -f image2 out1_%d.bmp
(I don't think you're supposed to save YUV images in BMP. It gets converted to RGB anyway, so this is not a lossless conversion)

For a list of the colorspaces execute:
ffmpeg -pix_fmt list


Quote:
Another question is, rawvideo means 4:0:0 or 4:2:2 ?
Rawvideo means uncompressed and unencoded frames in the chosen colorspace.
4:2:2 and 4:2:0 is the notation for chroma subsampling used in YUV, it says how many pixels share the same color information.
__________________
My nightmares are horrifying, they're all interlaced!
Boolsheet is offline   Reply With Quote
Old 22nd February 2010, 11:54   #3  |  Link
koliva
Beginner
 
koliva's Avatar
 
Join Date: Jan 2009
Location: Europe
Posts: 125
Quote:
Originally Posted by Boolsheet View Post
You have to put the resolution, framerate and colorspace for the raw file before the -i parameter. This way FFmpeg knows how to apply them correctly:
(I don't think you're supposed to save YUV images in BMP. It gets converted to RGB anyway, so this is not a lossless conversion)

For a list of the colorspaces execute:
ffmpeg -pix_fmt list



Rawvideo means uncompressed and unencoded frames in the chosen colorspace.
4:2:2 and 4:2:0 is the notation for chroma subsampling used in YUV, it says how many pixels share the same color information.
Thank you for your reply. I stil have l a problem.

I used for encoding:

Quote:
ffmpeg -i out_%d.bmp -vcodec rawvideo -f output.yuv
and decoding,

Quote:
ffmpeg -s 1400x800 -vcodec rawvideo -f rawvideo -pix_fmt yuv400p -i output.yuv -vcodec bmp -f image2 out1_%d.bmp
First, I have 2 grayscale(8 bit) images(named out_1.bmp, out_2.bmp) to be encoded. Therefore, I dont have Cb Cr components in yuv format. When I decode that output.yuv file, I got only one greenish bmp file. I tried many different configurations but it seems that there is a problem when I am combining my images.

My file sizes are:

out_1.bmp: 1095 KB
out_2.bmp: 1095 KB

output.yuv: 2190 KB

out1_1.bmp: 3282 KB ???
koliva is offline   Reply With Quote
Old 22nd February 2010, 14:26   #4  |  Link
Boolsheet
Registered User
 
Join Date: Apr 2009
Location: Switzerland
Posts: 69
You can convert your bmps to yuv400p with the same pix_fmt parameter:
Quote:
ffmpeg -i out_%d.bmp -vcodec rawvideo -f rawvideo -pix_fmt yuv400p output.yuv
__________________
My nightmares are horrifying, they're all interlaced!
Boolsheet is offline   Reply With Quote
Old 22nd February 2010, 16:40   #5  |  Link
koliva
Beginner
 
koliva's Avatar
 
Join Date: Jan 2009
Location: Europe
Posts: 125
Quote:
Originally Posted by Boolsheet View Post
You can convert your bmps to yuv400p with the same pix_fmt parameter:
It worked. Thank your so much
koliva is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.