I have put
-srate 44100 -af resample=44100 to ensure encoding audio into (S)VCD compliant format, and because source can have audio with any frequency sample rate. My problems with frame rate and audio/video sync resolved after introduction of -srate (it adjusts video frame rate according to audio while encoding, see man mplayer) and -lavdopts idct=0 option. Try to avoid frame rate conversion if possible, with FRC="-vf " # fps not changed (even it is a contradiction with my prevous postings), because for me frame rate in sources was the root of audio/video sync problems. For multichannel audio (5.1) you can use http://mctoolame.sourceforge.net/ or use mecoder audio options for multichannel audio. It uses ffmpeg audio codec for mp2. Again, ensure that you have mplayer and mencoder 1.0pre3 - it was audio/video sync bug in previous versions, reported in a mailing list. |
Quote:
Quote:
Quote:
Quote:
PS: Even though it seems that every answer you give results in two more questions from me, I appreciate your script, time and answers! |
http://www.digitalfaq.com/archives/error.gif
important Enable Real Time Clock (RTC) for mplayer. It is the first thing I did before start developing the script, and this affects the whole syncing in mplayer/mencoder. The description is here: http://www.mplayerhq.hu/DOCS/HTML/en/rtc.html |
Quote:
in mencoder line, according to the case fixed or variable audiorate. Somehere in the coder before mencoder line should be 'case' or 'if' statement to set $SRATE variable and in menoder line it should be: -srate $SRATE -af resample=$SRATE I just was trying to keep the script as simple as possible, and double resampling did not reduce sound quality in my results. |
russiansexpat , can I modify u script to suport subtitles and post here ?
|
Quote:
Who is interested in developing GUI for the script, join the topic: http://www.kvcd.net/forum/viewtopic.php?t=8017 |
russiansexpat, if I set audio bitrate in 128 I need use mplex ?
script with subtitle suport is done I need more test to post . |
If you chose to use fixed audiorate only,
you can use tcmplex from transcode or dvb-mplex from libdvb http://www.metzlerbros.org/dvb/libdvb-0.5.3.tar.gz they are less sensitive to sync errors, but they are unable to multiplex with variable audiorate (I've tested them both). Alternatively (as mentioned before) don't de-multiplex and re-multiplex at all, just pass $MOVIE mpeg file from mencoder line to vcdimager (I've not tested it myself, but developers say it suppose to be working). |
That work 100% for my ....
I use file generated by mencoder to vcdimager and this work ... god bye mplex errors :D :wink: |
I'm using constant audio rate and tcmplex, or directly the output from mencoder and it works ok to create VCDs.
Now my problem is that I cant fit more than 150 minutes of video at VCD resolution (352x288 at 25 fps) at quality 4 or 5. All kind of video compress the same ? I'm using a 640x480 high bitrate tv capture from satellite, no transmision noise, and its a mix of animation and real footage. |
So, if you use fixed audio rate only, there is no need for (de)multiplexing at all.
You can use http://mpgtx.sourceforge.net/ for splitting $MOVIE mpeg file before vcdimger according to desired size or time. In case of SVCD it is required, because vcdimger has a limit of 100min for one SVCD track, but you can have multiple tracks (mpeg files) on a single CD. Thanks everybody for feedbacks and continue publish your results and modified scripts, especially if you added interactive or simplified feautures to the script. |
Quote:
|
This version of menkoder suport subtiles you need have video and subtitle with a same name.
This suport only .sub and .srt I copy tetra script subtitle parts and add suport to more video types (ogm wma) and make changes example : myvideo.avi - myvideo.srt Code:
./menkoder myvcd myvideo.avi 4 Code:
#!/bin/bash |
Lots of skipped frames while encoding
Thanks for posting this wonderful script. I have converted an AVI to MPEG1 but when I did so there were a lot of skipped frames when encoding:
Code:
... Is there any way to overcome the skipping? I have seen this for every AVI I have thus far encoded, except for one which had the occasional (two or three times per minute) duplicate frame. FYI, I am using the defaults and have encoded with quality betweeo 4 and 8. thanks in advance, |
I have same problem ... i solved it changing FRC ... try all parameters ...
frame skip is nota problem is a frame rate .. example have films with 29 fps .. u convert to 25 fps ... 4 frames per seconds is been skipped :D I think it russianexplat can solve that question :D |
Thanks otzi. I switched from the default first options (-fps 29.97 -ofps 29.97 -vf telecine,lavcdeint,) to the second set (-fps 29.97 -ofps 29.97 -vf) and now only see a few skipped frames per AVI.
|
Some mpeg4 encoders produce broken or duplicated frames in AVI source, so if a few frames are skipped - it is normal.
If frames skipping is consistent, it means that you need to choose FRC (frame rate conversion) appropriate to your source. For example, if you have NTSC source and try to encode it to PAL with -fps 25 -ofps 25 without filmdeint or telecine, frames will be skipped. Another example is wmv microsoft source with variable (1000fps) frame rate; in this case you have to use FRC -fps and -ofps to specify resulting frame rate. |
Now I'm having problems creating a VCD image using vcdimager. Note that I am not demuxing then muxing the stream, so that may be a problem:
Code:
INFO: scanning mpeg sequence item #0 for scanpoints... I haven't tried to burn the resulting image as I am SSHing from home. |
These are not errors, only warnings.
Image should be ok; let us know otherwise. |
I have menkoded a couple AVIs using my new FRC settings. Both AVIs gave me many "Duplicate frame" errors when mencoding. The resulting video still looks good, but the audio drifts significantly behind the video. Towards the beginning the audio is a few seconds behind, which quickly turns into minutes.
Is this a case of mencoder dropping video frames but not adjusting the audio to compensate? I am going to play a little with the FRC settings to see if that will change anything. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.