You are not logged in.

#1 2014-08-04 13:58:51

glemt9
Member
From: Slovenija
Registered: 2011-11-28
Posts: 10
Website

MEncoder: selected video_out device is incompatible with this codec

I am using h263enc script for encoding mpg2 recordings created by udpxrec (udpxy).

Everything was working fine for last two years, but now I get following error:

[mp3 @ 0x7f353f851580]Header missing
[mp3 @ 0x7f353f851580]Header missing
[mpegts @ 0x7f353f841740]decoding for stream 3 failed
[mpegts @ 0x7f353f841740]PES packet size mismatch
[mpegts @ 0x7f353f841740]PES packet size mismatch
[mpegts @ 0x7f353f841740]Could not find codec parameters for stream 3 (Audio: mp3 ([6][0][0][0] / 0x0006), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[lavf] stream 0: video (mpeg2video), -vid 0
[lavf] stream 1: audio (mp2), -aid 0, -alang slv
[lavf] stream 2: subtitle (dvb-teletext), -sid 0, -slang slv
[lavf] stream 3: audio (mp3), -aid 1
LAVF: Program 1
VIDEO:  [MPG2]  720x576  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:35  fourcc:0x3247504D  size:720x576  fps:25.000  ftime:=0.0400
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [softskip]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 55.52.102 (internal)
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.

I am not sure if IP-TV Provider changed codec.

Any idea? Thank you.

Offline

#2 2014-08-06 12:03:07

teckk
Member
Registered: 2013-02-21
Posts: 575

Re: MEncoder: selected video_out device is incompatible with this codec

Not much information given.

[mpegts @ 0x7f353f841740]decoding for stream 3 failed

Can't find the audio stream info in the transport stream.

[mpegts @ 0x7f353f841740]Could not find codec parameters for stream 3 (Audio: mp3 ([6][0][0][0] / 0x0006), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options

Allow ffmpeg to probe farther into the stream to find info with something like.

ffmpeg -probesize 1000000000 -analyzeduration 100000000 -i movie.ts

Looks like it's mpeg2 video and mp3 audio. What are you wanting to reencode into?

Here is an example for h264 video and copy the audio.

ffmpeg -i movie.ts -probesize 1000000000 -analyzeduration 100000000 -c:a copy -c:v libx264 -b:v 2500k Output.avi

I stopped using mencoder several years ago due to it not working very well. It uses ffmpeg for it's backend anyway.

If you want more answer, give more info.

Last edited by teckk (2014-08-06 12:03:59)

Offline

#3 2014-08-08 08:04:54

glemt9
Member
From: Slovenija
Registered: 2011-11-28
Posts: 10
Website

Re: MEncoder: selected video_out device is incompatible with this codec

ffmpeg is working with no problem, I will focus on this one.


h264enc script is probably using ffmpeg only for decoding. Here is content of scripts bactch file:

nice -n 10 /usr/bin/mencoder "$i" -o /dev/null  -passlogfile "~/.h264enc/job19156/${i%.*}.log" -demuxer lavf     -nosub    -vf softskip,harddup           -oac pcm -ovc x264 -x264encopts pass=1:bitrate=1000:nointerlaced:force_cfr:frameref=3:mixed_refs:bframes=10:b_adapt=1:b_pyramid=normal:weight_b:weightp=1:direct_pred=spatial:aq_mode=2:me=hex:subq=6:nombtree:chroma_me:trellis=1:cabac:deblock:no8x8dct:partitions=p8x8,b8x8,i4x4:nofast_pskip:nodct_decimate:threads=auto:keyint=250:keyint_min=25

nice -n 10 /usr/bin/mencoder "$i" -o "/destination//${i%.*}.avi"  -passlogfile "~/.h264enc/job19156/${i%.*}.log" -demuxer lavf     -nosub    -vf softskip,harddup               -oac pcm -ovc x264 -x264encopts pass=2:bitrate=1000:nointerlaced:force_cfr:frameref=3:mixed_refs:bframes=10:b_adapt=1:b_pyramid=normal:weight_b:weightp=1:direct_pred=spatial:aq_mode=2:me=hex:subq=6:nombtree:chroma_me:trellis=1:cabac:deblock:no8x8dct:partitions=p8x8,b8x8,i4x4:nofast_pskip:nodct_decimate:threads=auto:keyint=250:keyint_min=25

Offline

#4 2014-08-08 15:53:11

teckk
Member
Registered: 2013-02-21
Posts: 575

Re: MEncoder: selected video_out device is incompatible with this codec

You've left out a whole lot of info like what you are doing, How you are doing it, and what your script looks like.

So if I understand this, you are capturing a tv broadcast transport stream to file, then you want to reencode that .ts video to something else?

I see that udpxy is a MPEG-TS recording tool. I've never used it. Does it alter the stream at all? Also how are you capturing this stream? Do you have a tv tuner in your computer? If so you can simply dump the stream that's coming out of the tuner to file with no alteration.

I'll tell you what I do know. Use these examples for your setup.
If you have mencoder installed then you must have mplayer. You'll need ~/.mplayer/channels.conf configured.

mplayer dvb://WABC -dumpstream -dumpfile Output.ts

Or you can simply zap a channel (linuxtv-dvb-apps)

azap -r -c ~/.mplayer/channels.conf WABC

Then cat the stream to file.

cat /dev/dvb/adapter0/dvr0 > Output.ts
mplayer /dev/dvb/adapter0/dvr0 -dumpstream -dumpfile Output.ts
ffmpeg -i /dev/dvb/adapter0/dvr0 -c copy Output.ts

Or you can use mpv, the syntax is different.
That will give you a Output.ts that you can reencode to another format to save space.

If you are set to use udpxy then start with posting the output of

ffmpeg -i YourVideoFile.ts

To see what that file looks like.
Then post your script that you are using.
If it's a normal mpeg transport stream with audio and video then you can change containers or reencode it to another audio and or video format.

PES packet size mismatch with mpeg2/ac3 can usually be solved when reencoding mpeg.ts with

ffmpeg -i vid.ts -bsf:a aac_adtstoasc

Sometimes you will need

ffmpeg -i file.ts -copytb 1

I can tell you how to manipulate these stream with ffmpeg, I think that mencoder is lacking, it has video audio sync problems.
Also I think that using harddup and softskip with mencoder is mutually exclusive. You want to capture all frames or you want to skip some.

nice -n 10 /usr/bin/mencoder "$i" -o "/destination//${i%.*}.avi"  -passlogfile "~/.h264enc/job19156/${i%.*}.log" -demuxer lavf     -nosub    -vf softskip,harddup               -oac pcm -ovc x264 -x264encopts pass=2:bitrate=1000:nointerlaced:force_cfr:frameref=3:mixed_refs:bframes=10:b_adapt=1:b_pyramid=normal:weight_b:weightp=1:direct_pred=spatial:aq_mode=2:me=hex:subq=6:nombtree:chroma_me:trellis=1:cabac:deblock:no8x8dct:partitions=p8x8,b8x8,i4x4:nofast_pskip:nodct_decimate:threads=auto:keyint=250:keyint_min=25

I don't think that you need all of that.

If your dead set on using mencoder then start with something simple and go from there.

mencoder movie.ts -oac mp3lame -lameopts cbr:br=192 -ovc x264 -x264encopts bitrate=2500 -vf crop=710:480:4:10,harddup -ofps 24000/1001 -o output.avi

Solve the errors that you get.

Offline

#5 2014-08-11 08:49:32

glemt9
Member
From: Slovenija
Registered: 2011-11-28
Posts: 10
Website

Re: MEncoder: selected video_out device is incompatible with this codec

I am using udpxy for direct recording multicast stream from IPTV (without set-top-box).

info on video file:

[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
    Last message repeated 2 times
[mpeg2video @ 0x2250c80] Invalid frame dimensions 0x0.
[mp3 @ 0x2252d20] Header missing
    Last message repeated 108 times
[mpegts @ 0x224cf60] decoding for stream 3 failed
[mpegts @ 0x224cf60] Could not find codec parameters for stream 3 (Audio: mp3 ([6][0][0][0] / 0x0006), 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'poptv_sport_2014-06-20.ts':
  Duration: 00:12:59.40, start: 26199.899944, bitrate: 6480 kb/s
  Program 11
    Metadata:
      service_name    : Some TV
      service_provider: Some company
    Stream #0:0[0x7da]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x7db](slv): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 191 kb/s
    Stream #0:2[0x7dc](slv): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:3[0x7dd]: Audio: mp3 ([6][0][0][0] / 0x0006), 0 channels, s16p

Ffmpeg encoding is working fine. I will not bother with mencoder anymore.

Thank you very much for extensive info.

Offline

Board footer

Powered by FluxBB