VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hi all,

    I need to convert a BMP file to a video (mpeg2 or mpeg4) but the quality of the output video is not as good as i want.

    I tried both commands :
    ffmpeg -loop_input -i sortie001.bmp -r 25 -qscale 1 -an -t 10 -b 5000000 -vcodec mpeg4 video.mp4
    and
    ffmpeg -loop_input -i sortie001.bmp -r 25 -qscale 1 -an -t 10 -vcodec mpeg4 video.mp4


    The BMP source file properties : 720x576, 24bits, 96dpi
    Here are two screen captures of parts of the images to show you the differences :

    bmpsource.bmp : a sample region of the BMP source
    VLCscreencapture.bmp : a sample region of the output video (screen capture made by VLC)

    As you can see the output video image is slobbering.

    What to do for the video to be very clear?
    (I can change the BMP source if necessary).

    Regards,
    Image Attached Thumbnails Click image for larger version

Name:	bmpsource.bmp
Views:	812
Size:	62.1 KB
ID:	8  

    Click image for larger version

Name:	VLCscreencapture.bmp
Views:	798
Size:	59.8 KB
ID:	9  

    Quote Quote  
  2. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Are you positive the source dimensions are exactly 720x576 ? The dimensions should be divisible by 8 for good results

    I get the best results by doing the conversion in 2 steps - 1) HQ MJPEG AVI --> 2)HQ h264 MP4


    Code:
    ffmpeg -loop_input -vframes 300 -vcodec mjpeg -qscale 1 -y -i input.jpg output.avi
    
    ffmpeg -i output.avi -vcodec libx264 -b 3000k -g 3 -bf 3 -b_strategy 1 -coder 1 -qmin 10 -qmax 51 -sc_threshold 40 -flags +loop -cmp +chroma -me_range 16 -me_method hex -subq 5 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -directpred 1 -flags2 +fastpskip -dts_delta_threshold 1 -an -y  output.mp4


    Download enclosed zip file and test it out yourself.

    Image Attached Files
    Last edited by Soopafresh; 26th Jan 2010 at 20:59.
    "Quality is cool, but don't forget... Content is King!"
    Quote Quote  
  3. Colors are encoded at half resolution in MPEG files. So small colored text on a colored background will get blurry. Add some black text on a white background, or vice versa, and compare.

    Here's some similarly sized and colored text on on a similar green background, and the same text in black on a white background (left), and what they look like after conversion to the YV12 colorspace where the colors are encoded at half resolution (compared to the grayscale image):
    Image Attached Thumbnails Click image for larger version

Name:	comp.png
Views:	1929
Size:	11.1 KB
ID:	30  

    Last edited by jagabo; 27th Jan 2010 at 09:05.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!