Anacondo
7th June 2003, 00:11
Hi people. I'm new to video encoding in Linux, although I have some experience with Windows and have made some quite-good looking rips. Some time ago I decided to migrate to Linux, and except for playing, audio and video editing I'm (almost) totally independant from it now.
I was very used to DVD2AVI + Avisynth + VirtalDub, and at first I thought I would not be capable of doing a decent rip with Linux, but after some hours of testing and digging into mencoder's man page I completed my first rip. I used windows for ripping (can't remember the app, I don't know how to do this with Linux yet), mencoder with libavcodec for the video part and wine + besweet + vorbis for the audio. I muxed the results with ogmmerge The result was fairly good, a bit more blocky than I would have liked, but looks great on my TV set. I have to admit that mencoder is one incredible app. And damn, it's fast! I got about 25fps for every pass (K7 1GHz)! I'm impressed with what Linux offers me once again. I don't think i'll miss my old method with the power & flexibility I have discovered now. I was a bit reacious at first of doing everything from the command line, but now I see it's the best thing to do if one wants total control over everything.
Anyway, as I'm just starting I have some questions and doubts:
1º) Video transcoding with Mencoder
I used this commands for my rip:
cat /mnt/datos/kpax/vob/video*.vob | nice -+19 mencoder -sws 9 -vop scale=544:256:5,crop=650:435:35:75 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=850:vhq:v4mv:vpass=1:vqmin=2:vqmax=31:vmax_b_frames=2 -o /dev/null -
cat /mnt/datos/kpax/vob/video*.vob | nice -+19 mencoder -sws 9 -vop scale=544:256:5,crop=650:435:35:75 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=850:vhq:v4mv:vpass=2:vqmin=2:vqmax=31:vmax_b_frames=2 -o K-Pax.avi -
When doing the 1st pass in Windows, I think the codec (divx) used a constant quantizer of 2 for gathering statistics and then the desired bitrate for the 2nd pass. I saw in a mencoder guide that the author used vbitrate=X for both passes, so I did the same. Is this the way to go with libavcodec?
I used -sws 9 (lanczos) for my resize. I couldn't see much difference in performance (~1fps) with bilinear (I believe it uses bilinear if I don't say otherwise). Is this normal? Am I resizing properly?
I tested my cropping with -vop rectangle and calculated the aspect ratios by hand. Is there a better way of doing this?
I've been playing lately with the options that are mentioned in this thread:
http://forum.doom9.org/showthread.php?s=&threadid=49082&highlight=libavcodec
and I could only get around 10fps. Could anyone please explain me the impact of these options over quality and processing time?
(precmp, cmp, subcmp, vb_qfactor, vb_offset, trell)
2º) Audio transcoding
I used wine + besweet for the audio as I said. However, I'd like to know how you people transcode your audio with Linux. I played a bit with transcode (tcextract & tcdecode) and was able to output an .ac3 file to .ogg (although I couldn't specify a custom command line for oggenc), but I'd like to have more control over the process, i.e. controlling the output levels, how the channels are mixed, increasing the loudness... Can this be done in a similar way to besweet?
That's all for now. I hope to learn a lot from you people so I can make better rips :D! Thanks in advance!
I was very used to DVD2AVI + Avisynth + VirtalDub, and at first I thought I would not be capable of doing a decent rip with Linux, but after some hours of testing and digging into mencoder's man page I completed my first rip. I used windows for ripping (can't remember the app, I don't know how to do this with Linux yet), mencoder with libavcodec for the video part and wine + besweet + vorbis for the audio. I muxed the results with ogmmerge The result was fairly good, a bit more blocky than I would have liked, but looks great on my TV set. I have to admit that mencoder is one incredible app. And damn, it's fast! I got about 25fps for every pass (K7 1GHz)! I'm impressed with what Linux offers me once again. I don't think i'll miss my old method with the power & flexibility I have discovered now. I was a bit reacious at first of doing everything from the command line, but now I see it's the best thing to do if one wants total control over everything.
Anyway, as I'm just starting I have some questions and doubts:
1º) Video transcoding with Mencoder
I used this commands for my rip:
cat /mnt/datos/kpax/vob/video*.vob | nice -+19 mencoder -sws 9 -vop scale=544:256:5,crop=650:435:35:75 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=850:vhq:v4mv:vpass=1:vqmin=2:vqmax=31:vmax_b_frames=2 -o /dev/null -
cat /mnt/datos/kpax/vob/video*.vob | nice -+19 mencoder -sws 9 -vop scale=544:256:5,crop=650:435:35:75 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=850:vhq:v4mv:vpass=2:vqmin=2:vqmax=31:vmax_b_frames=2 -o K-Pax.avi -
When doing the 1st pass in Windows, I think the codec (divx) used a constant quantizer of 2 for gathering statistics and then the desired bitrate for the 2nd pass. I saw in a mencoder guide that the author used vbitrate=X for both passes, so I did the same. Is this the way to go with libavcodec?
I used -sws 9 (lanczos) for my resize. I couldn't see much difference in performance (~1fps) with bilinear (I believe it uses bilinear if I don't say otherwise). Is this normal? Am I resizing properly?
I tested my cropping with -vop rectangle and calculated the aspect ratios by hand. Is there a better way of doing this?
I've been playing lately with the options that are mentioned in this thread:
http://forum.doom9.org/showthread.php?s=&threadid=49082&highlight=libavcodec
and I could only get around 10fps. Could anyone please explain me the impact of these options over quality and processing time?
(precmp, cmp, subcmp, vb_qfactor, vb_offset, trell)
2º) Audio transcoding
I used wine + besweet for the audio as I said. However, I'd like to know how you people transcode your audio with Linux. I played a bit with transcode (tcextract & tcdecode) and was able to output an .ac3 file to .ogg (although I couldn't specify a custom command line for oggenc), but I'd like to have more control over the process, i.e. controlling the output levels, how the channels are mixed, increasing the loudness... Can this be done in a similar way to besweet?
That's all for now. I hope to learn a lot from you people so I can make better rips :D! Thanks in advance!