Codec profile - full frame rate deinterlacing?
Added by John Blumpy about 6 years ago
Hi all,
I'm playing with Tvheadend and would like it to replace my current setup. I am enjoying it so far but I have an issue though: I cannot get Tvheadend to transcode DVB-T/S streams in the way I'd like. I have a Stream Profile using the built-in Codec Profile "webtv-h264" and it seems to work fine for my clients but I want it to perform full deinterlacing using yadif2x and there doesn't seem to be an option for this. The included "deinterlace" option seems to be half-frame-rate deinterlacing (e.g. 50 fields to 25 frames), which isn't good enough for my purposes.
Normally I'd do this by editing the ffmpeg parameters (something like -vf "yadif=1" -r 50) but I can't see a way to do this in Tvheadend. The included "Parameters" option is just for libx264 parameters which doesn't help. I can see in the debug log that Tvheadend is setting some parameters that look similar to ffmpeg parameters (e.g. bit rate, width, height, etc.) but I have no idea how to override any of these.
Is what I want possible? It is bizarre to me that overriding the ffmpeg parameters isn't included as an option when so many other customisation options exist!
OS: Ubuntu Server 16.04 LTS
Version: ubuntu-xenial-unstable (4.3-1292~g9b9ee68)
Replies (33)
RE: Codec profile - full frame rate deinterlacing? - Added by saen acro almost 5 years ago
Rene Wagler wrote:
How can i create a spawn profile? I have TVH 4.2.8-36 and i cant find these profiles to select it. I simply want to pre- deinterlace, no transcode
There is no Spawn profile in this version.
You cannot deinterlace without transcode.
You can deinterlace on player.
RE: Codec profile - full frame rate deinterlacing? - Added by John Blumpy almost 5 years ago
Indeed, you need a 4.3.0 nightly build. For anyone who is interested, I've settled on the following command line for transcoding to 720p50 AVC @ 3 Mb/s using an MPEG-TS Spawn profile:
/usr/bin/ffmpeg -loglevel fatal -threads 6 -i pipe:0 -map a -map -m:language:NAR? -map v -codec:v libx264 -b:v 2904k -vf "yadif=1:-1:1, scale=1280:720" -profile:v baseline -preset:v faster -coder 1 -tune zerolatency -mbd rd -codec:a aac -b:a 96k -ac 2 -strict experimental -async 1 -sn -fflags +genpts -metadata service_provider=STRING -metadata service_name=STRING -f mpegts pipe:1
This strips all the NAR audio streams. I've set the MIME type to "video/m2ts" and it works great.
RE: Codec profile - full frame rate deinterlacing? - Added by saen acro almost 5 years ago
John Blumpy wrote:
Indeed, you need a 4.3.0 nightly build. For anyone who is interested, I've settled on the following command line for transcoding to 720p50 AVC @ 3 Mb/s using an MPEG-TS Spawn profile:
[...]
This strips all the NAR audio streams. I've set the MIME type to "video/m2ts" and it works great.
Use GPU transcoding
but on CPU you can add some more parameters (this is for 576p)
cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 \
me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 \
threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 \
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 \
weightp=1 keyint=100 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=cbr mbtree=1 \
bitrate=1500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1500 vbv_bufsize=1500 \
nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
RE: Codec profile - full frame rate deinterlacing? - Added by John Blumpy almost 5 years ago
GPU transcoding is worse quality at a given bit rate but if you have a weak CPU or need multiple transcodes going on at once it makes sense to do that. My R7 1700 can easily handle two of these streams at once with VMs running in the background.
RE: Codec profile - full frame rate deinterlacing? - Added by Zoltan Szabad almost 5 years ago
John Blumpy wrote:
Indeed, you need a 4.3.0 nightly build. For anyone who is interested, I've settled on the following command line for transcoding to 720p50 AVC @ 3 Mb/s using an MPEG-TS Spawn profile:
[...]
This strips all the NAR audio streams. I've set the MIME type to "video/m2ts" and it works great.
Help
I'm on synology DS718+, CPU:Celeron J3455, Tvheadend 4.3.99rc1~221c29b, ffmpeg 4.2.1, TvhClient on iPhone XS
If I use John's command line I get no video nor audio on client device. (it does work with default htsp)
2020-02-01 20:15:21.469 spawn: Executing "/usr/bin/ffmpeg"
2020-02-01 20:15:21.477 subscription: 00A2: "HTTP" subscribing on channel "BBC earth", weight: 100, adapter: "HDHomeRun DVB-C Tuner #1 (192.168.1.121)", network: "DIGI TV", mux: "722MHz", provider: "DIGI Debrecen", service: "BBC earth", profile="pipe1", hostname="151.0.92.116", username="admin", client="TvhClient/887 LibVLC/3.0.9"
2020-02-01 20:15:28.060 subscription: 00A2: "HTTP" unsubscribing from "BBC earth", hostname="151.0.92.116", username="admin", client="TvhClient/887 LibVLC/3.0.9"
RE: Codec profile - full frame rate deinterlacing? - Added by John Blumpy almost 5 years ago
Try removing the "-loglevel fatal" line so you can see more debug info. If that fails, try it with a random .ts file and see if it errors. I am not sure if version 4.2.1 has any differences that might cause issues too.
RE: Codec profile - full frame rate deinterlacing? - Added by Zoltan Szabad almost 5 years ago
John Blumpy wrote:
Try removing the "-loglevel fatal" line so you can see more debug info. If that fails, try it with a random .ts file and see if it errors. I am not sure if version 4.2.1 has any differences that might cause issues too.
I decided to test it with audio codec copy, so at least I can receive 1 stream, and suddenly it started working, but the 1080i input & yadif deinterlacing was - probably - way to much for my CPU, so right now I can only transcode SD channels (720x576).
ffmpeg -threads 4 -i pipe:0 -map a -map -m:language:NAR? -map v -codec:v libx264 -b:v 2604k -vf "yadif=1:-1:1, scale=720:576" -profile:v baseline -preset:v veryfast -coder 1 -tune zerolatency -mbd rd -codec:a copy -strict experimental -async 1 -sn -fflags +genpts -metadata service_provider=STRING -metadata service_name=STRING -f mpegts pipe:1
Tvheadend log:
Executing "/bin/ffmpeg"
2020-02-01 22:01:17.787 subscription: 00BC: "HTTP" subscribing on channel "M4 Sport", weight: 100, adapter: "HDHomeRun DVB-C Tuner #0 (192.168.1.121)", network: "DIGI TV", mux: "135.5MHz", provider: "DIGI Debrecen", service: "M4 Sport", profile="pipe1", hostname="81.135.40.124", username="admin", client="VLC/3.0.8 LibVLC/3.0.8"
2020-02-01 22:01:17.822 spawn: ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers
2020-02-01 22:01:17.822 spawn: built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
2020-02-01 22:01:17.822 spawn: configuration: --prefix=/usr --incdir='${prefix}/include/ffmpeg' --arch=i686 --target-os=linux --cross-prefix=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --enable-cross-compile --enable-optimizations --enable-pic --enable-gpl --enable-shared --disable-static --enable-version3 --enable-nonfree --enable-libfaac --enable-encoders --enable-pthreads --disable-bzlib --disable-protocol=rtp --disable-muxer=image2 --disable-muxer=image2pipe --disable-swscale-alpha --disable-ffserver --disable-ffplay --disable-devices --disable-bzlib --disable-altivec --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libmp3lame --disable-vaapi --disable-decoder=amrnb --disable-decoder=ac3 --disable-decoder=ac3_fixed --disable-encoder=zmbv --disable-encoder=dca --disable-encoder=ac3 --disable-encoder=ac3_fixed --disable-encoder=eac3 --disable-decoder=dca --disable-decoder=eac3 --disable-decoder=truehd --cc=/usr/local/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ccache-gcc --enable-yasm --enable-libx264
2020-02-01 22:01:17.822 spawn: libavutil 54. 27.100 / 54. 27.100
2020-02-01 22:01:17.822 spawn: libavcodec 56. 41.100 / 56. 41.100
2020-02-01 22:01:17.822 spawn: libavformat 56. 36.100 / 56. 36.100
2020-02-01 22:01:17.822 spawn: libavdevice 56. 4.100 / 56. 4.100
2020-02-01 22:01:17.822 spawn: libavfilter 5. 16.101 / 5. 16.101
2020-02-01 22:01:17.822 spawn: libswscale 3. 1.101 / 3. 1.101
2020-02-01 22:01:17.822 spawn: libswresample 1. 2.100 / 1. 2.100
2020-02-01 22:01:17.822 spawn: libpostproc 53. 3.100 / 53. 3.100
2020-02-01 22:01:18.115 spawn: [mpeg2video @ 0x22f75a0] Invalid frame dimensions 0x0.
2020-02-01 22:01:22.954 spawn: Last message repeated 10 times
2020-02-01 22:01:22.954 spawn: Input #0, mpegts, from 'pipe:0':
2020-02-01 22:01:22.954 spawn: Duration: N/A, start: 41097.942622, bitrate: 5384 kb/s
2020-02-01 22:01:22.954 spawn: Program 1
2020-02-01 22:01:22.954 spawn: Metadata:
2020-02-01 22:01:22.954 spawn: service_name : M4 Sport
2020-02-01 22:01:22.954 spawn: service_provider: DIGI Debrecen
2020-02-01 22:01:22.954 spawn: Stream #0:0[0x258]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
2020-02-01 22:01:22.954 spawn: Stream #0:1[0x262](hun): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
2020-02-01 22:01:22.954 spawn: Stream #0:2[0x263](mul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
2020-02-01 22:01:22.954 spawn: Stream #0:3[0x28a](Hun,Hun): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
2020-02-01 22:01:22.972 spawn: [libx264 @ 0x23c4ce0] using SAR=64/45
2020-02-01 22:01:22.979 spawn: [libx264 @ 0x23c4ce0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
2020-02-01 22:01:22.986 spawn: [libx264 @ 0x23c4ce0] profile Constrained Baseline, level 3.1
2020-02-01 22:01:22.986 spawn: Output #0, mpegts, to 'pipe:1':
2020-02-01 22:01:22.986 spawn: Metadata:
2020-02-01 22:01:22.986 spawn: service_provider: STRING
2020-02-01 22:01:22.986 spawn: service_name : STRING
2020-02-01 22:01:22.986 spawn: encoder : Lavf56.36.100
2020-02-01 22:01:22.986 spawn: Stream #0:0(hun): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 192 kb/s
2020-02-01 22:01:22.986 spawn: Stream #0:1(mul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 192 kb/s
2020-02-01 22:01:22.986 spawn: Stream #0:2: Video: h264 (libx264), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 2604 kb/s, 50 fps, 90k tbn, 50 tbc
2020-02-01 22:01:22.986 spawn: Metadata:
2020-02-01 22:01:22.986 spawn: encoder : Lavc56.41.100 libx264
2020-02-01 22:01:22.986 spawn: Stream mapping:
2020-02-01 22:01:22.986 spawn: Stream #0:1 -> #0:0 (copy)
2020-02-01 22:01:22.986 spawn: Stream #0:2 -> #0:1 (copy)
2020-02-01 22:01:22.986 spawn: Stream #0:0 -> #0:2 (mpeg2video (native) -> h264 (libx264))
2020-02-01 22:01:23.490 spawn: frame= 66 fps=0.0 q=23.0 size= 374kB time=00:00:01.32 bitrate=2320.9kbits/s dup=41 drop=0
2020-02-01 22:01:24.007 spawn: frame= 128 fps=128 q=23.0 size= 927kB time=00:00:02.56 bitrate=2966.9kbits/s dup=41 drop=0
2020-02-01 22:01:24.500 spawn: frame= 188 fps=124 q=23.0 size= 1393kB time=00:00:03.76 bitrate=3034.8kbits/s dup=41 drop=0
2020-02-01 22:01:25.007 spawn: frame= 238 fps=118 q=23.0 size= 1839kB time=00:00:04.76 bitrate=3165.4kbits/s dup=41 drop=0
2020-02-01 22:01:25.521 spawn: frame= 300 fps=118 q=23.0 size= 2294kB time=00:00:06.00 bitrate=3132.6kbits/s dup=41 drop=0
2020-02-01 22:01:26.005 spawn: [mpeg2video @ 0x22fe420] 00 motion_type at 23 16
2020-02-01 22:01:26.005 spawn: [mpeg2video @ 0x22fe420] Warning MVs not available
2020-02-01 22:01:26.005 spawn: [mpeg2video @ 0x22fe420] concealing 900 DC, 900 AC, 900 MV errors in B frame
2020-02-01 22:01:26.038 spawn: [mpegts @ 0x22f35c0] PES packet size mismatch
2020-02-01 22:01:26.038 spawn: frame= 364 fps=119 q=23.0 size= 2772kB time=00:00:07.28 bitrate=3118.9kbits/s dup=41 drop=0
2020-02-01 22:01:26.038 spawn: [mpegts @ 0x22f35c0] PES packet size mismatch
2020-02-01 22:01:26.565 spawn: frame= 426 fps=120 q=25.0 size= 3381kB time=00:00:08.52 bitrate=3250.5kbits/s dup=55 drop=0
2020-02-01 22:01:27.079 spawn: frame= 466 fps=115 q=24.0 size= 3696kB time=00:00:09.32 bitrate=3248.3kbits/s dup=55 drop=0
2020-02-01 22:01:27.566 spawn: frame= 492 fps=108 q=24.0 size= 3879kB time=00:00:09.84 bitrate=3229.3kbits/s dup=55 drop=0
2020-02-01 22:01:28.103 spawn: frame= 520 fps=102 q=24.0 size= 4119kB time=00:00:10.40 bitrate=3244.6kbits/s dup=55 drop=0
2020-02-01 22:01:28.626 spawn: frame= 546 fps= 97 q=23.0 size= 4293kB time=00:00:10.92 bitrate=3220.8kbits/s dup=55 drop=0
2020-02-01 22:01:29.209 spawn: frame= 574 fps= 93 q=24.0 size= 4508kB time=00:00:11.48 bitrate=3217.1kbits/s dup=55 drop=0
2020-02-01 22:01:29.681 spawn: frame= 598 fps= 89 q=24.0 size= 4695kB time=00:00:11.96 bitrate=3215.7kbits/s dup=55 drop=0
2020-02-01 22:01:30.239 spawn: frame= 626 fps= 87 q=24.0 size= 4917kB time=00:00:12.52 bitrate=3217.4kbits/s dup=55 drop=0
2020-02-01 22:01:30.744 spawn: frame= 650 fps= 84 q=24.0 size= 5108kB time=00:00:13.00 bitrate=3218.8kbits/s dup=55 drop=0
2020-02-01 22:01:31.292 spawn: frame= 676 fps= 82 q=24.0 size= 5339kB time=00:00:13.52 bitrate=3234.9kbits/s dup=55 drop=0
2020-02-01 22:01:31.788 spawn: frame= 700 fps= 80 q=24.0 size= 5529kB time=00:00:14.00 bitrate=3235.0kbits/s dup=55 drop=0
2020-02-01 22:01:32.378 spawn: frame= 728 fps= 78 q=24.0 size= 5743kB time=00:00:14.56 bitrate=3231.2kbits/s dup=55 drop=0
2020-02-01 22:01:32.883 spawn: frame= 754 fps= 76 q=24.0 size= 5960kB time=00:00:15.08 bitrate=3237.9kbits/s dup=55 drop=0
2020-02-01 22:01:33.389 spawn: frame= 782 fps= 75 q=24.0 size= 6165kB time=00:00:15.64 bitrate=3229.0kbits/s dup=55 drop=0
2020-02-01 22:01:33.900 spawn: frame= 806 fps= 74 q=24.0 size= 6344kB time=00:00:16.12 bitrate=3223.8kbits/s dup=55 drop=0
2020-02-01 22:01:34.408 spawn: frame= 834 fps= 73 q=22.0 size= 6518kB time=00:00:16.68 bitrate=3201.0kbits/s dup=55 drop=0
2020-02-01 22:01:34.948 spawn: frame= 862 fps= 72 q=23.0 size= 6712kB time=00:00:17.24 bitrate=3189.5kbits/s dup=55 drop=0
2020-02-01 22:01:35.435 spawn: frame= 886 fps= 71 q=23.0 size= 6875kB time=00:00:17.72 bitrate=3178.3kbits/s dup=55 drop=0
2020-02-01 22:01:35.970 spawn: frame= 914 fps= 71 q=23.0 size= 7070kB time=00:00:18.28 bitrate=3168.2kbits/s dup=55 drop=0
2020-02-01 22:01:36.508 spawn: frame= 938 fps= 69 q=23.0 size= 7250kB time=00:00:18.76 bitrate=3165.9kbits/s dup=55 drop=0
2020-02-01 22:01:37.063 spawn: frame= 964 fps= 69 q=23.0 size= 7472kB time=00:00:19.28 bitrate=3175.0kbits/s dup=55 drop=0
2020-02-01 22:01:37.550 spawn: frame= 988 fps= 68 q=23.0 size= 7640kB time=00:00:19.76 bitrate=3167.2kbits/s dup=55 drop=0
2020-02-01 22:01:38.101 spawn: frame= 1016 fps= 67 q=22.0 size= 7827kB time=00:00:20.32 bitrate=3155.4kbits/s dup=55 drop=0
2020-02-01 22:01:38.587 spawn: frame= 1044 fps= 67 q=22.0 size= 7959kB time=00:00:20.88 bitrate=3122.7kbits/s dup=55 drop=0
2020-02-01 22:01:39.158 spawn: frame= 1072 fps= 66 q=22.0 size= 8124kB time=00:00:21.44 bitrate=3104.0kbits/s dup=55 drop=0
2020-02-01 22:01:39.674 spawn: frame= 1098 fps= 66 q=21.0 size= 8271kB time=00:00:21.96 bitrate=3085.6kbits/s dup=55 drop=0
2020-02-01 22:01:40.193 spawn: frame= 1124 fps= 65 q=21.0 size= 8461kB time=00:00:22.48 bitrate=3083.3kbits/s dup=55 drop=0
2020-02-01 22:01:40.691 spawn: frame= 1148 fps= 65 q=22.0 size= 8629kB time=00:00:22.96 bitrate=3078.8kbits/s dup=55 drop=0
2020-02-01 22:01:41.197 spawn: frame= 1174 fps= 64 q=21.0 size= 8815kB time=00:00:23.48 bitrate=3075.5kbits/s dup=55 drop=0
2020-02-01 22:01:41.727 spawn: frame= 1200 fps= 64 q=21.0 size= 9082kB time=00:00:24.00 bitrate=3100.1kbits/s dup=55 drop=0
2020-02-01 22:01:42.245 spawn: frame= 1226 fps= 64 q=21.0 size= 9264kB time=00:00:24.52 bitrate=3095.0kbits/s dup=55 drop=0
2020-02-01 22:01:42.726 spawn: frame= 1252 fps= 63 q=21.0 size= 9454kB time=00:00:25.04 bitrate=3092.9kbits/s dup=55 drop=0
2020-02-01 22:01:43.312 spawn: frame= 1276 fps= 63 q=21.0 size= 9704kB time=00:00:25.52 bitrate=3114.9kbits/s dup=55 drop=0
2020-02-01 22:01:43.904 spawn: frame= 1306 fps= 63 q=21.0 size= 9922kB time=00:00:26.12 bitrate=3111.9kbits/s dup=55 drop=0
2020-02-01 22:01:44.463 spawn: frame= 1336 fps= 62 q=21.0 size= 10157kB time=00:00:26.72 bitrate=3113.9kbits/s dup=55 drop=0
2020-02-01 22:01:44.982 spawn: frame= 1362 fps= 62 q=21.0 size= 10391kB time=00:00:27.24 bitrate=3124.8kbits/s dup=55 drop=0
2020-02-01 22:01:45.534 spawn: frame= 1388 fps= 62 q=21.0 size= 10589kB time=00:00:27.76 bitrate=3124.7kbits/s dup=55 drop=0
2020-02-01 22:01:46.000 spawn: frame= 1412 fps= 61 q=20.0 size= 10778kB time=00:00:28.24 bitrate=3126.6kbits/s dup=55 drop=0
2020-02-01 22:01:46.554 spawn: frame= 1442 fps= 61 q=21.0 size= 11022kB time=00:00:28.84 bitrate=3130.8kbits/s dup=55 drop=0
2020-02-01 22:01:47.055 spawn: frame= 1466 fps= 61 q=22.0 size= 11231kB time=00:00:29.32 bitrate=3138.0kbits/s dup=55 drop=0
2020-02-01 22:01:47.586 spawn: frame= 1486 fps= 60 q=24.0 size= 11726kB time=00:00:29.72 bitrate=3232.2kbits/s dup=55 drop=0
2020-02-01 22:01:48.108 spawn: frame= 1514 fps= 60 q=23.0 size= 12159kB time=00:00:30.28 bitrate=3289.6kbits/s dup=55 drop=0
2020-02-01 22:01:48.608 spawn: frame= 1542 fps= 60 q=23.0 size= 12345kB time=00:00:30.84 bitrate=3279.2kbits/s dup=55 drop=0
2020-02-01 22:01:49.147 spawn: frame= 1570 fps= 60 q=22.0 size= 12504kB time=00:00:31.40 bitrate=3262.2kbits/s dup=55 drop=0
2020-02-01 22:01:49.644 spawn: frame= 1596 fps= 60 q=23.0 size= 12638kB time=00:00:31.92 bitrate=3243.5kbits/s dup=55 drop=0
2020-02-01 22:01:50.233 spawn: frame= 1624 fps= 60 q=22.0 size= 12803kB time=00:00:32.48 bitrate=3229.2kbits/s dup=55 drop=0
2020-02-01 22:01:50.711 spawn: frame= 1650 fps= 60 q=23.0 size= 12978kB time=00:00:33.00 bitrate=3221.8kbits/s dup=55 drop=0
2020-02-01 22:01:51.258 spawn: frame= 1672 fps= 59 q=23.0 size= 13186kB time=00:00:33.44 bitrate=3230.4kbits/s dup=55 drop=0
2020-02-01 22:01:51.773 spawn: frame= 1702 fps= 59 q=23.0 size= 13369kB time=00:00:34.04 bitrate=3217.4kbits/s dup=55 drop=0
2020-02-01 22:01:52.254 spawn: frame= 1726 fps= 59 q=22.0 size= 13543kB time=00:00:34.52 bitrate=3214.0kbits/s dup=55 drop=0
2020-02-01 22:01:52.817 spawn: frame= 1752 fps= 59 q=23.0 size= 13725kB time=00:00:35.04 bitrate=3208.8kbits/s dup=55 drop=0
2020-02-01 22:01:53.408 spawn: frame= 1778 fps= 59 q=24.0 size= 14165kB time=00:00:35.56 bitrate=3263.2kbits/s dup=55 drop=0
2020-02-01 22:01:53.879 spawn: frame= 1806 fps= 59 q=23.0 size= 14566kB time=00:00:36.12 bitrate=3303.5kbits/s dup=55 drop=0
2020-02-01 22:01:54.391 spawn: frame= 1832 fps= 58 q=22.0 size= 14786kB time=00:00:36.64 bitrate=3305.8kbits/s dup=55 drop=0
2020-02-01 22:01:54.944 spawn: frame= 1856 fps= 58 q=22.0 size= 14926kB time=00:00:37.12 bitrate=3294.1kbits/s dup=55 drop=0
2020-02-01 22:01:55.459 spawn: frame= 1888 fps= 58 q=22.0 size= 15113kB time=00:00:37.76 bitrate=3278.7kbits/s dup=55 drop=0
2020-02-01 22:01:55.976 spawn: frame= 1914 fps= 58 q=24.0 size= 15329kB time=00:00:38.28 bitrate=3280.5kbits/s dup=55 drop=0
2020-02-01 22:01:56.456 spawn: frame= 1938 fps= 58 q=24.0 size= 15552kB time=00:00:38.76 bitrate=3286.9kbits/s dup=55 drop=0
2020-02-01 22:01:56.843 subscription: 00BC: "HTTP" unsubscribing from "M4 Sport", hostname="81.135.40.124", username="admin", client="VLC/3.0.8 LibVLC/3.0.8"
Do you think that Intel® HD Graphics 500 is powerful enough to do the HW transcoding? If it is, how can I set ffmpeg to use it as HW transcoder?
I've also noticed this in the log: ffmpeg version 2.7.1, despite the synocommunity latest ffmpeg package is installed on my NAS, clearly not in the above location
Found it (4.2.1), but:
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
2020-02-01 22:14:19.043 spawn: built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
2020-02-01 22:14:19.044 spawn: configuration: --target-os=linux --cross-prefix=/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-fontconfig --enable-libass --enable-libbluray --enable-avresample --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libsoxr --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-gnutls --disable-debug --disable-doc --disable-static --enable-libfdk-aac --enable-nonfree --extra-cflags='-DSYNO_VIDEOSTATION -DSYNO_AUDIOSTATION -DSYNO_MEDIASERVER -DSYNO_DSM' --e
2020-02-01 22:14:19.044 spawn: libavutil 56. 31.100 / 56. 31.100
2020-02-01 22:14:19.044 spawn: libavcodec 58. 54.100 / 58. 54.100
2020-02-01 22:14:19.044 spawn: libavformat 58. 29.100 / 58. 29.100
2020-02-01 22:14:19.044 spawn: libavdevice 58. 8.100 / 58. 8.100
2020-02-01 22:14:19.044 spawn: libavfilter 7. 57.100 / 7. 57.100
2020-02-01 22:14:19.044 spawn: libavresample 4. 0. 0 / 4. 0. 0
2020-02-01 22:14:19.044 spawn: libswscale 5. 5.100 / 5. 5.100
2020-02-01 22:14:19.044 spawn: libswresample 3. 5.100 / 3. 5.100
2020-02-01 22:14:19.044 spawn: libpostproc 55. 5.100 / 55. 5.100
2020-02-01 22:14:19.088 spawn: [mpeg2video @ 0x116f500] Invalid frame dimensions 0x0.
2020-02-01 22:14:22.688 spawn: Last message repeated 5 times
2020-02-01 22:14:22.688 spawn: Input #0, mpegts, from 'pipe:0':
2020-02-01 22:14:22.688 spawn: Duration: N/A, start: 41877.672167, bitrate: 5384 kb/s
2020-02-01 22:14:22.688 spawn: Program 1
2020-02-01 22:14:22.688 spawn: Metadata:
2020-02-01 22:14:22.688 spawn: service_name : M4 Sport
2020-02-01 22:14:22.688 spawn: service_provider: DIGI Debrecen
2020-02-01 22:14:22.689 spawn: Stream #0:0[0x258]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
2020-02-01 22:14:22.689 spawn: Stream #0:1[0x262](hun): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
2020-02-01 22:14:22.689 spawn: Stream #0:2[0x263](mul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
2020-02-01 22:14:22.689 spawn: Stream #0:3[0x28a](Hun,Hun): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
2020-02-01 22:14:22.690 spawn: Stream mapping:
2020-02-01 22:14:22.690 spawn: Stream #0:1 -> #0:0 (copy)
2020-02-01 22:14:22.690 spawn: Stream #0:2 -> #0:1 (copy)
2020-02-01 22:14:22.690 spawn: Stream #0:0 -> #0:2 (mpeg2video (native) -> h264 (libx264))
2020-02-01 22:14:22.696 spawn: Error initializing output stream 0:2 -- Error while opening encoder for output stream #0:2 - maybe incorrect parameters such as bit_rate, rate, width or height
2020-02-01 22:14:22.698 spawn: Conversion failed!
RE: Codec profile - full frame rate deinterlacing? - Added by Zoltan Szabad almost 5 years ago
Synology DS718+, CPU:Celeron J3455, Tvheadend 4.3.99rc1~221c29b, UPGRADED TO ffmpeg 4.2.2 (apollo lake version from th0ma7's repo: https://github.com/th0ma7/synology/blob/master/packages/ffmpeg_apollolake-6.1_4.2.2-27.spk)
HW transcoding with VAAPI Motion Adaptive full framerate deinterlacing (CPU usage @ 10%) scaled to 720p
/usr/local/ffmpeg/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i pipe:0 -vf 'deinterlace_vaapi=rate=field:auto=1,scale_vaapi=w=1280:h=720' -c:v h264_vaapi -bufsize 3000k -b:v 2M -c:a aac -b:a 96k -f mpegts pipe:1
You can remove the scaling, it works in 1920x1080 (I was actually surprised) but you'll need to use -b:v 4M at least, I've also added the highest compression level to achieve maximum quality for the available bandwidth.
/usr/local/ffmpeg/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i pipe:0 -vf 'deinterlace_vaapi=rate=field:auto=1' -c:v h264_vaapi -bufsize 3000k -compression_level 1 -b:v 4M -c:a aac -b:a 96k -f mpegts pipe:1
- « Previous
- 1
- 2
- Next »