[FFmpeg-user] interlaced result when transcoding from h264

Mitja Pirih mitja at alternet.si
Thu Jan 9 22:38:13 CET 2014


Hi,

I am transcoding a h264 DVB-T stream but I am not satisfied with the
results. The picture looks like "interlaced" on fast moving scenes.
Here I posted (sorry for long post) some ffprobe data of the original
(input) stream and output stream. What are my options to get a better
picture?

I am transcoding with ffserver, with this config:
<Stream stream001.mkv>
Feed stream001.ffm
NoLoop
Format matroska
VideoCodec libx264
VideoFrameRate 25
VideoBitRate 1524
VideoSize 720x576
AVOptionVideo preset ultrafast
AVOptionVideo tune zerolatency
AVOptionVideo flags +global_header
AVOptionVideo crf 26
AVOptionVideo me_range 16
AVOptionVideo qdiff 4
AVOptionVideo qmin 10
AVOptionVideo qmax 51
AudioCodec aac
Strict -2
AudioBitRate 128
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
</Stream>



Input stream:

ffprobe -i udp://239.100.0.0:1234
Input #0, mpegts, from 'udp://239.100.0.0:1234':
  Duration: N/A, start: 77357.106233, bitrate: 192 kb/s
  Program 1
    Metadata:
      service_name    : SLO1
      service_provider: RTV SLOVENIJA
    Stream #0:0[0x78]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p(tv, bt470bg), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 50 tbr, 90k
tbn, 50 tbc
    Stream #0:1[0x79](slv): Audio: mp2 ([4][0][0][0] / 0x0004), 48000
Hz, stereo, s16p, 192 kb/s
    Stream #0:2[0x7a](slv): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:3[0x7b]: Audio: mp1 ([6][0][0][0] / 0x0006), 0 channels,
s16p
Unsupported codec with id 94215 for input stream 2
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=Main
codec_type=video
codec_time_base=1/50
codec_tag_string=[27][0][0][0]
codec_tag=0x001b
width=720
height=576
has_b_frames=2
sample_aspect_ratio=16:11
display_aspect_ratio=20:11
pix_fmt=yuv420p
level=30
timecode=N/A
id=0x78
r_frame_rate=50/1
avg_frame_rate=25/1
time_base=1/90000
start_pts=6962200658
start_time=77357.785089
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata=
00000000: 0000 0001 0910 0000 0001 274d 401e 9a62  ..........'M at ..b
00000010: 0168 48b0 4420 a0a0 a800 0003 0008 0000  .hH.D ..........
00000020: 0301 94a0 0000 0001 28ee 3c80            ........(.<.

DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]
index=1
codec_name=mp2
codec_long_name=MP2 (MPEG audio layer 2)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=[4][0][0][0]
codec_tag=0x0004
sample_fmt=s16p
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=0x79
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/90000
start_pts=6962151448
start_time=77357.238311
duration_ts=N/A
duration=N/A
bit_rate=192000
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata=

DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=slv
[/STREAM]
[STREAM]
index=2
codec_name=unknown
codec_long_name=unknown
profile=unknown
codec_type=subtitle
codec_time_base=1/90000
codec_tag_string=[6][0][0][0]
codec_tag=0x0006
width=N/A
height=N/A
id=0x7a
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/90000
start_pts=6962139561
start_time=77357.106233
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata=

DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=slv
[/STREAM]
[STREAM]
index=3
codec_name=mp1
codec_long_name=MP1 (MPEG audio layer 1)
profile=unknown
codec_type=audio
codec_time_base=1/0
codec_tag_string=[6][0][0][0]
codec_tag=0x0006
sample_fmt=s16p
sample_rate=0
channels=0
channel_layout=unknown
bits_per_sample=0
id=0x7b
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/90000
start_pts=6962139561
start_time=77357.106233
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata=

DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[FORMAT]
filename=udp://239.100.0.0:1234
nb_streams=4
nb_programs=1
format_name=mpegts
format_long_name=MPEG-TS (MPEG-2 Transport Stream)
start_time=77357.106233
duration=N/A
size=N/A
bit_rate=192000
probe_score=100
[/FORMAT]



Output stream:

# ffprobe -i http://172.31.254.210:8090/stream001.mkv -show_data
-show_format -show_streams
ffprobe version git-2014-01-03-6275d93 Copyright (c) 2007-2014 the
FFmpeg developers
  built on Jan  3 2014 14:42:16 with gcc 4.8 (Ubuntu/Linaro
4.8.1-10ubuntu9)
  configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
  libavutil      52. 59.100 / 52. 59.100
  libavcodec     55. 47.100 / 55. 47.100
  libavformat    55. 22.102 / 55. 22.102
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.103 /  4.  0.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from 'http://172.31.254.210:8090/stream001.mkv':
  Metadata:
    ENCODER         : Lavf55.22.102
  Duration: N/A, start: 1389300845.049000, bitrate: N/A
    Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp (default)
    Stream #0:1: Video: h264 (High), yuv420p, 720x576 [SAR 16:11 DAR
20:11], SAR 1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
[STREAM]
index=0
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=unknown
codec_type=audio
codec_time_base=1/44100
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=1389300845049
start_time=1389300845.049000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata=
00000000: 1210                                     ..

DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]
index=1
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_time_base=1/50
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=720
height=576
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=5:4
pix_fmt=yuv420p
level=30
timecode=N/A
id=N/A
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/1000
start_pts=1389300845080
start_time=1389300845.080000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
extradata=
00000000: 0164 001e ffe1 0019 6764 001e acb4 05a0  .d......gd......
00000010: 9360 8200 0003 0002 0000 0300 641e 2c5d  .`..........d.,]
00000020: 4001 0005 68cf 32c8 b0                   @...h.2..

DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[FORMAT]
filename=http://172.31.254.210:8090/stream001.mkv
nb_streams=2
nb_programs=0
format_name=matroska,webm
format_long_name=Matroska / WebM
start_time=1389300845.049000
duration=N/A
size=N/A
bit_rate=N/A
probe_score=100
TAG:ENCODER=Lavf55.22.102
[/FORMAT]


More information about the ffmpeg-user mailing list