"Too many video packets in the buffer"
I've been trying to transcode some 1080i TV content now that I have access to a machine that will do it faster than 2fps. However, I keep getting that error and I have no idea why. I remux the video with tsMuxeR (with the contSPS and insertSEI options) since that seems to make a cleaner input file (fewer errors). This problem happens whether I use the remuxed video or the original. I was looking through the archives to see what causes this and all I could find was something about it happening when the sync goes way off, but that's not the case here (I watch the status line and the sync never gets off by more than a few hundredths of a second). mencoder input.m2ts -msglevel all=1:statusline=5 -aid 4352 -fps 50 -ofps 25 -of avi -oac copy -ovc x264 -x264encopts crf=30:force_cfr:turbo=1:frameref=1:scenecut=0:nf:nocabac:bframes=0:partitions=none:no8x8dct:me=dia:subq=0:aq_mode=0:nointerlaced -vf yadif=1,filmdint=io=50:25,hqdn3d=0:0:4:4,harddup -o test.avi
On Thu, Apr 15, 2010 at 9:27 PM, Andrew Berg <bahamutzero8825@gmail.com>wrote:
I've been trying to transcode some 1080i TV content now that I have access to a machine that will do it faster than 2fps. However, I keep getting that error and I have no idea why. I remux the video with tsMuxeR (with the contSPS and insertSEI options) since that seems to make a cleaner input file (fewer errors). This problem happens whether I use the remuxed video or the original. I was looking through the archives to see what causes this and all I could find was something about it happening when the sync goes way off, but that's not the case here (I watch the status line and the sync never gets off by more than a few hundredths of a second).
mencoder input.m2ts -msglevel all=1:statusline=5 -aid 4352 -fps 50 -ofps 25 -of avi -oac copy -ovc x264 -x264encopts
crf=30:force_cfr:turbo=1:frameref=1:scenecut=0:nf:nocabac:bframes=0:partitions=none:no8x8dct:me=dia:subq=0:aq_mode=0:nointerlaced -vf yadif=1,filmdint=io=50:25,hqdn3d=0:0:4:4,harddup -o test.avi
Try adding "-cache 1048576" to see if that helps. Just a hunch. Warm Regards, Jarred Nicholls jarred.nicholls@gmail.com 443.280.9527 http://www.jarrednicholls.com
_______________________________________________ MEncoder-users mailing list MEncoder-users@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
On 4/15/2010 8:31 PM, Jarred Nicholls wrote:
Try adding "-cache 1048576" to see if that helps. Just a hunch. No change.
On Thu, 15 Apr 2010 20:27:02 -0500 Andrew Berg <bahamutzero8825@gmail.com> wrote:
mencoder input.m2ts -msglevel all=1:statusline=5 -aid 4352 -fps 50 -ofps 25 -of avi -oac copy -ovc x264 -x264encopts crf=30:force_cfr:turbo=1:frameref=1:scenecut=0:nf:nocabac:bframes=0:p artitions=none:no8x8dct:me=dia:subq=0:aq_mode=0:nointerlaced -vf yadif=1,filmdint=io=50:25,hqdn3d=0:0:4:4,harddup -o test.avi
I'd bet money that -fps option is the cause... If it's not exactly the right value, audio/video will get way out of sync with each other (or rather, their buffers will), regardless the status line say. And all it takes is a few frames dropped from your transport stream to do it... Assuming you can, omit -fps. If you can't, use a smaller value, and it should at least take longer before erroring. Have you even tried watching the (partial) output video? How does it look? Alternately, you can try pcm in place of "copy", as that definitely causes problems with some formats. -- Ha. I'm the idiot.
On 4/15/2010 11:50 PM, RC wrote:
I'd bet money that -fps option is the cause... If it's not exactly the right value, audio/video will get way out of sync with each other (or rather, their buffers will), regardless the status line say. And all it takes is a few frames dropped from your transport stream to do it...
Using pp=lb instead of yadif (removing the need for -fps 50 -ofps 25 and filmdint=io=50:25) makes it happen even sooner.
Have you even tried watching the (partial) output video? How does it look?
Terribly out-of-sync after only 20 seconds.
Alternately, you can try pcm in place of "copy", as that definitely causes problems with some formats.
No change. I've never had problems copying AC-3 streams anyway.
On Fri, 16 Apr 2010 00:27:31 -0500 Andrew Berg <bahamutzero8825@gmail.com> wrote:
Terribly out-of-sync after only 20 seconds.
Well then, we're back to your original statement that "sync never gets off by more than a few hundredths of a second". You should use the methods you've found searching the archives. -- Ha. I'm the idiot.
On 4/16/2010 1:19 AM, RC wrote:
You should use the methods you've found searching the archives. I would, but I couldn't find any (that were relevant to my case anyway).
On Fri, 16 Apr 2010 01:22:58 -0500 Andrew Berg <bahamutzero8825@gmail.com> wrote:
I would, but I couldn't find any (that were relevant to my case anyway).
You said in your first message: "I was looking through the archives to see what causes this and all I could find was something about it happening when the sync goes way off, but that's not the case here" Since it's now obvious the sync is in fact going "way off" with your file, I can't understand the problem. -- Ha. I'm the idiot.
By using an external audio file (which kept the "too many packets" error from flooding my terminal), I found out that it's out of sync because the video isn't playing at the proper frame rate (it's playing slower than the audio, probably half the rate). Why I have 25fps going in and 50fps coming out, I have no idea (this happens with pp=lb as well as yadif).
You're encoding audio or leaving it out (-nosound), right, not copying it? Laine Lee On 4/17/10 1:20 PM, "Andrew Berg" <bahamutzero8825@gmail.com> wrote:
By using an external audio file (which kept the "too many packets" error from flooding my terminal), I found out that it's out of sync because the video isn't playing at the proper frame rate (it's playing slower than the audio, probably half the rate). Why I have 25fps going in and 50fps coming out, I have no idea (this happens with pp=lb as well as yadif).
On 4/19/2010 10:02 PM, Laine Lee wrote:
You're encoding audio or leaving it out (-nosound), right, not copying it? I demuxed the file and am using the audio stream with -audiofile. I then encode the audio separately (feed the resulting AVI into FFmpeg, which decodes the audio and pipes it to the Nero AAC codec).
Your source is 1080i TV content, which means 1920x1080 @ 25 fps, which are formed from 50 interlaced fields. AFAIK, you have to deinterlace, specify the output size, specify your x264 settings, your audio settings and your output format then things will be more or less as expected.
I've done all that. I use yadif or pp=lb to deinterlace, omit the scale option because I want to keep the resolution, x264 options are specified, see above for audio, and I use AVI for a temporary container and MP4Box for the final output.
Andrew Berg wrote:
On 4/19/2010 10:02 PM, Laine Lee wrote:
You're encoding audio or leaving it out (-nosound), right, not copying it? I demuxed the file and am using the audio stream with -audiofile. I then encode the audio separately (feed the resulting AVI into FFmpeg, which decodes the audio and pipes it to the Nero AAC codec).
Your source is 1080i TV content, which means 1920x1080 @ 25 fps, which are formed from 50 interlaced fields. AFAIK, you have to deinterlace, specify the output size, specify your x264 settings, your audio settings and your output format then things will be more or less as expected.
I've done all that. I use yadif or pp=lb to deinterlace, omit the scale option because I want to keep the resolution, x264 options are specified, In you command I see: -fps 50 -ofps 25 and filmdint=io=50:25 which doesn't make sense to me at least.
see above for audio, and I use AVI for a temporary container
and MP4Box for the final output. _______________________________________________ MEncoder-users mailing list MEncoder-users@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
On 4/20/2010 8:23 AM, belcampo wrote:
-fps 50 -ofps 25 and filmdint=io=50:25 which doesn't make sense to me at least. I thought filmdint would be more reliable than framestep=2, but I was wrong. Using framestep=2 and -demuxer lavf (which I was sure I had tried before in vain), I was able to make it work, but oddly enough, only for my ultrafast test preset and not the much slower set of options I normally use.
In sync: mencoder 2010.02.02.m2ts -msglevel all=1:statusline=5 -demuxer lavf -aid 1 -fps 50 -ofps 25 -endpos 180 -of avi -oac copy -ovc x264 -x264encopts level_idc=41:crf=30:force_cfr:turbo=1:frameref=1:scenecut=0:nf:nocabac:bframes=0:partitions=none:no8x8dct:me=dia:subq=0:aq_mode=0 -vf yadif=1,framestep=2,hqdn3d=0:0:8:8,harddup -o test_fs2.avi Not in sync: mencoder 2010.02.02.m2ts -msglevel all=1:statusline=5 -demuxer lavf -aid 1 -fps 50 -ofps 25 -endpos 180 -of avi -oac copy -ovc x264 -x264encopts level_idc=41:crf=19:force_cfr:keyint=300:keyint_min=30:frameref=4:mixed_refs:weightp=2:b_pyramid=normal:weight_b:bframes=4:b_adapt=2:me_range=24:direct_pred=auto:cabac:8x8dct:me=umh:trellis=1:subq=7:threads=auto:nointerlaced:nopsnr:nossim:deblock=-1,-1 -vf yadif=1,framestep=2,hqdn3d=0:0:8:8,harddup -o full_test_fs2.avi I compared both tests to the original and the former is perfectly in sync while the other is 50ms or so off (it's not a lot, but it is noticeable). I can make links to the 3 minute clips (350MB and 535MB respectively) if someone wants to take a look.
try taking out the -fps 50 and I'm pretty sure you wouldn't need the framestep=2 if you used yadif=0 ( far as i know the only reason to use yadif=1 and framestep is if you are going to use mcdeint in between ). On Sat, Apr 24, 2010 at 8:35 AM, Andrew Berg <bahamutzero8825@gmail.com>wrote:
On 4/20/2010 8:23 AM, belcampo wrote:
-fps 50 -ofps 25 and filmdint=io=50:25 which doesn't make sense to me at least. I thought filmdint would be more reliable than framestep=2, but I was wrong. Using framestep=2 and -demuxer lavf (which I was sure I had tried before in vain), I was able to make it work, but oddly enough, only for my ultrafast test preset and not the much slower set of options I normally use.
In sync: mencoder 2010.02.02.m2ts -msglevel all=1:statusline=5 -demuxer lavf -aid 1 -fps 50 -ofps 25 -endpos 180 -of avi -oac copy -ovc x264 -x264encopts
level_idc=41:crf=30:force_cfr:turbo=1:frameref=1:scenecut=0:nf:nocabac:bframes=0:partitions=none:no8x8dct:me=dia:subq=0:aq_mode=0 -vf yadif=1,framestep=2,hqdn3d=0:0:8:8,harddup -o test_fs2.avi
Not in sync: mencoder 2010.02.02.m2ts -msglevel all=1:statusline=5 -demuxer lavf -aid 1 -fps 50 -ofps 25 -endpos 180 -of avi -oac copy -ovc x264 -x264encopts
level_idc=41:crf=19:force_cfr:keyint=300:keyint_min=30:frameref=4:mixed_refs:weightp=2:b_pyramid=normal:weight_b:bframes=4:b_adapt=2:me_range=24:direct_pred=auto:cabac:8x8dct:me=umh:trellis=1:subq=7:threads=auto:nointerlaced:nopsnr:nossim:deblock=-1,-1 -vf yadif=1,framestep=2,hqdn3d=0:0:8:8,harddup -o full_test_fs2.avi
I compared both tests to the original and the former is perfectly in sync while the other is 50ms or so off (it's not a lot, but it is noticeable). I can make links to the 3 minute clips (350MB and 535MB respectively) if someone wants to take a look. _______________________________________________ MEncoder-users mailing list MEncoder-users@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
On 4/24/2010 3:49 PM, Brian Penick wrote:
try taking out the -fps 50 and I'm pretty sure you wouldn't need the framestep=2 if you used yadif=0 ( far as i know the only reason to use yadif=1 and framestep is if you are going to use mcdeint in between ). If I do that, I get the "too many video packets" message again.
In sync: mencoder 2010.02.02.m2ts -msglevel all=1:statusline=5 -demuxer lavf -aid 1 -fps 50 -ofps 25 -endpos 180 -of avi -oac copy -ovc x264 -x264encopts level_idc=41:crf=30:force_cfr:turbo=1:frameref=1:scenecut=0:nf:nocabac:bframes=0:partitions=none:no8x8dct:me=dia:subq=0:aq_mode=0 -vf yadif=1,framestep=2,hqdn3d=0:0:8:8,harddup -o test_fs2.avi
Not in sync: mencoder 2010.02.02.m2ts -msglevel all=1:statusline=5 -demuxer lavf -aid 1 -fps 50 -ofps 25 -endpos 180 -of avi -oac copy -ovc x264 -x264encopts level_idc=41:crf=19:force_cfr:keyint=300:keyint_min=30:frameref=4:mixed_refs:weightp=2:b_pyramid=normal:weight_b:bframes=4:b_adapt=2:me_range=24:direct_pred=auto:cabac:8x8dct:me=umh:trellis=1:subq=7:threads=auto:nointerlaced:nopsnr:nossim:deblock=-1,-1 -vf yadif=1,framestep=2,hqdn3d=0:0:8:8,harddup -o full_test_fs2.avi I took another crack at this, and it turns out they are actually both in sync, just not on the PS3. I recently found out that my laptop was indeed not getting proper airflow, resulting a throttled CPU, but I can
On 4/24/2010 8:35 AM, Andrew Berg wrote: play back these videos fine now that I have fixed the problem. It plays in sync perfectly with a software player (Media Player Classic, using CoreAVC to decode). However, using the PS3, it is slightly out of sync - over PS3 Media Server, the difference is quite noticeable, and played from the PS3's HDD, it is still noticeable, but only barely. I think the problem is with keyint. I set it to 300 since I typically deal with NTSC content and I didn't want the default 250, but since this is a PAL capture, am I correct in thinking that the higher keyint value will throw off hardware players? Oddly enough though, I have done 24p Blu-ray titles with the same settings and those are in sync.
On 6/3/2010 11:55 AM, Andrew Berg wrote:
I set it to 300 since I typically deal with NTSC content and I didn't want the default 250, but since this is a PAL capture, am I correct in thinking that the higher keyint value will throw off hardware players? Oddly enough though, I have done 24p Blu-ray titles with the same settings and those are in sync.
I tried again with keyint=250/keyint_min=25, and I get the same results. I'm stumped. I have no idea why the PS3 would play these out of sync while it plays encodes with the same settings from other sources just fine.
On Thu, Jun 03, 2010 at 09:10:48PM -0500, Andrew Berg wrote:
On 6/3/2010 11:55 AM, Andrew Berg wrote:
I set it to 300 since I typically deal with NTSC content and I didn't want the default 250, but since this is a PAL capture, am I correct in thinking that the higher keyint value will throw off hardware players? Oddly enough though, I have done 24p Blu-ray titles with the same settings and those are in sync.
I tried again with keyint=250/keyint_min=25, and I get the same results. I'm stumped. I have no idea why the PS3 would play these out of sync while it plays encodes with the same settings from other sources just fine.
Have you compared the bitrate of these files? Since you are using CABAC you might be reaching the maximum bitrate it can decode. Try using either VBV mode or without CABAC.
Have you compared the bitrate of these files? Since you are using CABAC you might be reaching the maximum bitrate it can decode. Try using either VBV mode or without CABAC. I have done encodes with these settings of similar material from different sources and only these PAL captures have this problem. I have done encodes from Blu-rays and they have significantly higher bitrates
On 6/4/2010 12:49 AM, Reimar Döffinger wrote: than these encodes. Average BR for these is around 10-11Mbps, with peaks at 40Mbps or so, but the parts I look at to compare sync are nowhere near the peak. AFAICT, the encodes are perfectly compliant with High@L4.1.
Copying both streams (-oac copy -ovc copy) gives the same error. I tried remuxing to Matroska and inputting the mkv file, but oddly enough, that made MEncoder stop early and return "Too many audio packets in the buffer". I also tried -tskeepbroken.
On Fri, Apr 16, 2010 at 09:34:57AM -0500, Andrew Berg wrote:
Copying both streams (-oac copy -ovc copy) gives the same error. I tried remuxing to Matroska and inputting the mkv file, but oddly enough, that made MEncoder stop early and return "Too many audio packets in the buffer". I also tried -tskeepbroken.
Copying AC-3 usually does not work. Your best chance probably is to do the video on its own and the mux it with the original audio in a separate step.
Andrew Berg wrote:
I've been trying to transcode some 1080i TV content now that I have access to a machine that will do it faster than 2fps. However, I keep getting that error and I have no idea why. I remux the video with tsMuxeR (with the contSPS and insertSEI options) since that seems to make a cleaner input file (fewer errors). This problem happens whether I use the remuxed video or the original. I was looking through the archives to see what causes this and all I could find was something about it happening when the sync goes way off, but that's not the case here (I watch the status line and the sync never gets off by more than a few hundredths of a second).
mencoder input.m2ts -msglevel all=1:statusline=5 -aid 4352 -fps 50 -ofps 25 -of avi -oac copy -ovc x264 -x264encopts crf=30:force_cfr:turbo=1:frameref=1:scenecut=0:nf:nocabac:bframes=0:partitions=none:no8x8dct:me=dia:subq=0:aq_mode=0:nointerlaced -vf yadif=1,filmdint=io=50:25,hqdn3d=0:0:4:4,harddup -o test.avi Your source is 1080i TV content, which means 1920x1080 @ 25 fps, which are formed from 50 interlaced fields. AFAIK, you have to deinterlace, specify the output size, specify your x264 settings, your audio settings and your output format then things will be more or less as expected.
_______________________________________________ MEncoder-users mailing list MEncoder-users@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
participants (7)
-
Andrew Berg -
belcampo -
Brian Penick -
Jarred Nicholls -
Laine Lee -
RC -
Reimar Döffinger