Opened 6 weeks ago

Closed 6 weeks ago

#6147 closed defect (invalid)

wrong resolution in output

Reported by: ferrusqui Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by cehoyos)

Summary of the bug:
How to reproduce:
I'm triyng to use ffserver to restream an h264 video stream with 1280x720 resolution as mjpeg. All work good but the image I can see connecting to ffserver is pixelated. The nominal resolution is 1280x720, but it seems an upscale from a smaller resolution. If I try to get the stream h264 directly from ffmpeg the resolution it's ok, I didn't understand if the problem is in input on ffserver or in output of ffmpeg.
My ffserver.conf file is:

# Multipart JPEG

<Stream test.mjpg>
Feed feed1.ffm
Format mpjpeg
VideoFrameRate 1
VideoSize 1280x720
VideoIntraOnly
#VideoQMin 1
VideoBitRate 128
VideoHighQuality
NoAudio
NoDefaults
Strict -1
</Stream>

and I launch the software as following:


ffserver -d -f /etc/ffserver.conf & ffmpeg -i rtsp://user:pwd@xxx.xxx.xxx.xxx:88/videoMain -an  http://localhost:8090/feed1.ffm

Do I need to change something also in the <Feed feed1.ffm> part?

Thanks

Ferruccio

ffmpeg version
built on ...

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (6)

comment:1 Changed 6 weeks ago by cehoyos

  • Priority changed from critical to normal

Please provide command line together with complete, uncut console output to make this a valid ticket.

comment:2 Changed 6 weeks ago by ferrusqui

this is the command line:

ffserver -d -f /etc/ffserver.conf & ffmpeg -i rtsp://user:pwd@xxx.xxx.xxx.xxx:88/videoMain -an http://localhost:8090/feed1.ffm

and this is the console output:

ffserver version git-2016-10-15-9082603 Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
libavutil 55. 32.100 / 55. 32.100
libavcodec 57. 61.103 / 57. 61.103
libavformat 57. 52.100 / 57. 52.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 64.100 / 6. 64.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 2.100 / 2. 2.100
libpostproc 54. 0.100 / 54. 0.100

/etc/ffserver.conf:5: Port option is deprecated. Use HTTPPort instead.
/etc/ffserver.conf:9: BindAddress? option is deprecated. Use HTTPBindAddress instead.
/etc/ffserver.conf:30: NoDaemon? option has no effect. You should remove it.
ffmpeg version git-2016-10-15-9082603 Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
libavutil 55. 32.100 / 55. 32.100
libavcodec 57. 61.103 / 57. 61.103
libavformat 57. 52.100 / 57. 52.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 64.100 / 6. 64.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 2.100 / 2. 2.100
libpostproc 54. 0.100 / 54. 0.100

Mon Feb 13 23:02:24 2017 FFserver started.
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://user:pwd@xxx.xxx.xxx.xxx:88/videoMain':

Metadata:

title : IP Camera Video
comment : videoMain

Duration: N/A, start: 0.035967, bitrate: N/A

Stream #0:0: Video: h264 (Baseline), yuv420p, 1280x720, 90k tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s

[tcp @ 0x2d4f020] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
Mon Feb 13 23:02:30 2017 127.0.0.1 - - New connection: GET /feed1.ffm
Mon Feb 13 23:02:30 2017 [ffm @ 0x2411980]Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Mon Feb 13 23:02:30 2017 [ffm @ 0x2411980]Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Mon Feb 13 23:02:30 2017 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 32847
[tcp @ 0x2e76820] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
Mon Feb 13 23:02:30 2017 127.0.0.1 - - New connection: POST /feed1.ffm
[ffm @ 0x2df5990] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2

Last message repeated 1 times

Output #0, ffm, to 'http://localhost:8090/feed1.ffm':

Metadata:

title : IP Camera Video
comment : videoMain
creation_time : now
encoder : Lavf57.52.100
Stream #0:0: Video: mjpeg, yuv420p, 1280x720, q=2-31, 128 kb/s, 90k fps, 1000k tbn, 1 tbc
Metadata:

encoder : Lavc57.61.103 mjpeg

Side data:

cpb: bitrate max/min/avg: 0/0/128000 buffer size: 0 vbv_delay: -1

Stream #0:1: Video: mjpeg, yuv420p, 1280x720, q=2-31, 200 kb/s, 90k fps, 1000k tbn, 2 tbc
Metadata:

encoder : Lavc57.61.103 mjpeg

Side data:

cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1

Stream mapping:

Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Stream #0:0 -> #0:1 (h264 (native) -> mjpeg (native))

Press [q] to stop, ? for help
[rtsp @ 0x2d4d1c0] max delay reached. need to consume packet:07.00 bitrate=1343.5kbits/s dup=0 drop=253 speed=2.68x
[rtsp @ 0x2d4d1c0] RTP: missed 316 packets
[h264 @ 0x2e0e360] Increasing reorder buffer to 6
[h264 @ 0x2da7e70] Invalid level prefix
[h264 @ 0x2da7e70] error while decoding MB 71 31
[h264 @ 0x2da7e70] concealing 1098 DC, 1098 AC, 1098 MV errors in P frame
frame= 19 fps=1.6 q=24.8 Lq=24.8 size= 2192kB time=00:00:18.00 bitrate= 997.6kbits/s dup=2 drop=659 speed=1.55x

Last edited 6 weeks ago by ferrusqui (previous) (diff)

comment:3 Changed 6 weeks ago by cehoyos

  • Component changed from ffmpeg to undetermined
VideoBitRate 128

I don't know if this is the reason for your issue but this is definitely not a sane video bitrate.

comment:4 Changed 6 weeks ago by cehoyos

  • Description modified (diff)

comment:5 Changed 6 weeks ago by ferrusqui

Great! Many thanks!!!

I put the VideoBitRate? to 1024 and now the quality is ok!

Thanks again!!!

comment:6 Changed 6 weeks ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

Thank you for the confirmation.

Note: See TracTickets for help on using tickets.