convert yuv to avi using gstreamer - ffmpeg

I want to convert an avi file to an yuv file. I tried using
ffmpeg -i <input.avi> <output.yuv>
but not getting converted. can anybody suggest me conversion using gstreamer?

This is how you solve it using ffmpeg
ffmpeg -i in.avi -vcodec rawvideo -pix_fmt yuv420p -o out.yuv
Converts any input to 420 planar yuv.

Related

How to use ffmpeg command without any codec?

I am using the following command to create an mp4 container, input in a raw file, and the problem I have is FFmpeg apparently trying to encode me in H264. Is there a way to tell FFmpeg not to use any codec? that is, how do I use FFmpeg without compressing anything? Thanks!
Command statement i'm using:
ffmpeg -f rawvideo -pixel_format rgb24 -video_size 160x120 -framerate 24 -i file out.mp4
Output:

How to save decoded raw rgba frames using ffmpeg?

I need to transcode mp4 video to a raw video frames stored in a file.
I'm trying this command but it fails with Unable to find a suitable output format for 'test.rgba':
ffmpeg -i test.mp4 -vcodec rawvideo -pix_fmt rgba -an test.rgba
It's this
ffmpeg -i test.mp4 -vf format=rgba -f rawvideo test.rgba

Using FFMPEG to losslessly convert YUV to another format for editing in Adobe Premier

I have a raw YUV video file that I want to do some basic editing to in Adobe CS6 Premiere, but it won't recognize the file. I thought to use ffmpeg to convert it to something Premiere would take in, but I want this to be lossless because afterwards I will need it in YUV format again. I thought of avi, mov, and prores but I can't seem to figure out the proper command line to ffmpeg and how to ensure it is lossless.
Thanks for your help.
Yes, this is possible. It is normal that you can't open that raw video file since it is just raw data in one giant file, without any headers. So Adobe Premiere doesn't know what the size is, what framerate ect.
First make sure you downloaded the FFmpeg command line tool. Then after installing you can start converting by running a command with parameters. There are some parameters you have to fill in yourself before starting to convert:
What type of the YUV pixel format are you using? The most common format is YUV4:2:0 planar 8-bit (YUV420p). You can type ffmpeg -pix_fmts to get a list of all available formats.
What is the framerate? In my example I will use -r 25 fps.
What encoder do you want to use? The libx264 (H.264) encoder is a great one for lossless compression.
What is your framesize? In my example I will use -s 1920x1080
Then we get this command to do your compression.
ffmpeg -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i inputfile.yuv -c:v libx264 -preset ultrafast -qp 0 output.mp4
A little explanation of all other parameters:
With -f rawvideo you set the input format to a raw video container
With -vcodec rawvideo you set the input file as not compressed
With -i inputfile.yuv you set your input file
With -c:v libx264 you set the encoder to encode the video to libx264.
The -preset ultrafast setting is only speeding up the compression so your file size will be bigger than setting it to veryslow.
With -qp 0 you set the maximum quality. 0 is best, 51 is worst quality in our example.
Then output.mp4 is your new container to store your data in.
After you are done in Adobe Premiere, you can convert it back to a YUV file by inverting allmost all parameters. FFmpeg recognizes what's inside the mp4 container, so you don't need to provide parameters for the input.
ffmpeg -i input.mp4 -f rawvideo -vcodec rawvideo -pix_fmt yuv420p -s 1920x1080 -r 25 rawvideo.yuv

How can I convert *.flv file to *.ts file using FFmpeg on command line?

How can I convert *.flv file to *.ts file using FFmpeg on command line? Is there any document about this?
Best Regards,
Defonds
ffmpeg -i abc.flv abc.ts
This will generate .ts with mpeg2video and mp2 audio.
To generate with h264 video use
ffmpeg -i abc.flv -vcodec libx264 abc.ts
if you do not want to encode,you can use this:"ffmpeg -i input.flv -c copy -bsf h264_mp4toannexb output.ts"
To get a .ts video you'd need to encode video with h264 and the best way to do that with ffmpeg is via libx264. If you want audio be sure to encode audio with aac. The command would look something like this
ffmpeg -i in.flv -vcodec libx264 -acodec aac out.ts

how to watermark and convert video to flv with FFMPEG?

how can i watermark and convert a video to flv format with ffmpeg ?
Here's the fourth hit on a 'ffmpeg watermark' search: Add a Watermark to a Video with ffmpeg.
ffmpeg -sameq -i video1.mp4 -vhook '/usr/lib64/vhook/watermark.so' \
-f img.jpg video2.mp4
Here's the fourth hit on a 'ffmpeg convert flv' search: Convert to FLV (flash video) with ffmpeg (edit: looks like Konamiman beat me to it).
ffmpeg -i someVideo.avi -f flv -b 200000 someVideo.flv
For converting to flv, see here: http://parallaxed.net/article/convert-to-flv-flash-video-with-ffmpeg
And for watermarking, see for example here: http://linux.goeszen.com/watermark-video-with-ffmpeg.html

Resources