[FFmpeg-user] Re-encode mpeg2 for same quality
petesea at frontier.com
petesea at frontier.com
Thu Feb 26 22:53:21 CET 2015
I've had some success solving my mpeg2 bitrate/size issue. But not really
sure if the results are valid... or appropriate.
As previously mentioned using -q 1 helps a little but not much. -mbd 2
maybe helps a little, not much. -target doesn't help at all.
The only real success I've had is if I use -minrate and -maxrate with
different values (see full output below):
$ ffmpeg -hide_banner -i video.vob -codec:v mpeg2video -b:v 6000k -bufsize 6000k -minrate 4000k -maxrate 9800k -codec:a copy -copyts -f vob video-MINMAX.vob
but then I see the following warning:
[mpeg2video @ 0x8801520] Warning min_rate > 0 but min_rate != max_rate isn't recommended!
Why is this not recommended? And what is the consequences of using it?
With regards to the DVR (FFWD/REW) issues, I found that if I use
HandBrakeCLI to create a mkv/mpeg2 file, then use ffmpeg to convert that
to mpeg2/mpeg2 (via -c copy) it works fine on my DVR. Unfortunately,
HandBrake has the same bitrate/file size issue. And using "--encopts
minrate=4000k" with HandBrake doesn't help... it gives the same "not
recommended" warning, but doesn't increase the overall bitrate.
Nothing I've tried so far using only ffmpeg prevents the FFWD/REW issues.
What could HandBrake be doing different from ffmpeg? I believe HandBrake
is actually using ffmpeg for the mpeg2 encoding... although it's own
version (much older I think).
What possible things might cause this FFWD/REV issue? bitrate, fps,
b-frames, I'm just throwing out terms here, because I don't really know.
----------------------------------------------------------------------------------------
$ ffmpeg -hide_banner -i video.vob -codec:v mpeg2video -b:v 6000k -bufsize 6000k -minrate 4000k -maxrate 9800k -codec:a copy -copyts -f vob video-MINMAX.vob
Input #0, mpeg, from 'video.vob':
Duration: 00:00:14.98, start: 0.513067, bitrate: 4685 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 32:27 DAR 16:9], max. 9800 kb/s, 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
[mpeg2video @ 0x8801520] Warning min_rate > 0 but min_rate != max_rate isn't recommended!
Output #0, vob, to 'video-MINMAX.vob':
Metadata:
encoder : Lavf56.15.102
Stream #0:0: Video: mpeg2video, yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 6000 kb/s, 29.97 fps, 90k tbn, 29.97 tbc
Metadata:
encoder : Lavc56.13.100 mpeg2video
Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), 448 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 443 fps=102 q=2.0 Lsize= 8364kB time=00:00:15.48 bitrate=4423.6kbits/s dup=88 drop=0
video:7436kB audio:819kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.324703%
$ ffmpeg -hide_banner -i video-MINMAX.vob
Input #0, mpeg, from 'video-MINMAX.vob':
Duration: 00:00:15.00, start: 0.513067, bitrate: 4567 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 32:27 DAR 16:9], max. 9800 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
At least one output file must be specified
More information about the ffmpeg-user
mailing list