VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hi, how can I get the best (or good) results with FFMPEG command line MPEG-2 Video codec? I want to keep the bitrate at 5000kbps. I know 5000kbps is low for MPEG-2, I don't want a perfect picture, I just want it to look better. Here's my code.

    for %%a in ("*.*") do ffmpeg -i "%%a" -s 704x576 -pix_fmt yuv420p -r 25 -codec:v mpeg2_qsv -vf setfield=tff -flags +ilme+ildct -g 1 -b:v 5000k -minrate:v 0k -maxrate:v 9000k -bufsize:v 1835008 -scan_offset 1 -ar 48000 -acodec ac3 -b:a 384k -f dvd -muxrate 10080k -packetsize 2048 "DVD %%~na.vob"
    pause
    Quote Quote  
  2. The -g 1 is a big problem and likely your main issue, that means intra encoding (no p, b frames) . You would need many times more bitrate for it to look ok

    Use -g 15 for PAL dvd

    You can try multipass encoding too

    You can look at this thread for supposedly optimal ffmpeg mpeg2 encoding. (But the results are still worse than other mpeg2 encoders)
    http://forum.doom9.org/showthread.php?t=174620
    Quote Quote  
  3. Thanks for that tip, the video looks better using -g 15. But now I can't control my bitrate (outputting around 4000kbps no matter what my bitrate setting is).
    Quote Quote  
  4. Originally Posted by shampistols69 View Post
    Thanks for that tip, the video looks better using -g 15. But now I can't control my bitrate (outputting around 4000kbps no matter what my bitrate setting is).
    Not sure, you're using mpeg2_qsv the intel quick sync encoder, not the software mpeg2 ffmpeg encoder - maybe it's a limitation ? Try -c:v mpeg2video for the software encoder
    Quote Quote  
  5. To get the requested bitrate you have to use two pass encoding (I don't think the mpeg2_qsv encoder supports this). Or you can try setting the min, max, and average all to the same 5000k.
    Last edited by jagabo; 21st Sep 2024 at 22:52.
    Quote Quote  



Similar Threads

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