[FFmpeg-user] Step 1 encode video, Step 2 stream over UDP-> NOT working (HEVC, UDP, x265, streaming)
Rudi Hrvatin
rudi.hrvatin at gmail.com
Wed Dec 17 12:20:28 CET 2014
Hi Moritz,
> On Wed, Dec 17, 2014 at 10:34:33 +0100, Rudi Hrvatin wrote:
> > This works fine, I get just some warning. The video if playable using
> > ffplay so I think this *works fine*.
>
> This depends on what you will try to play it with as the final client
> in your chain. ffplay and mplayer (and possibly vlc) may be overly
> tolerant.
>
Well at the end the most important thing is the calculation of PSNR and
later SSIM. I don't care about the playing.
>
> > This commands produces some errors. What am I doing wrong? (I also tried
> > without the -f mp4 but also didn't work).
> [...]
> > [mp4 @ 0000000004cd05a0]* muxer does not support non seekable output*
>
> There must be around 1000 Google hits regarding the streaming of MP4
> with ffmpeg. :-)
>
> MP4 was not (well) designed for this. It does work with fragments, if
> you really must use MP4.
>
> LMGTFY:
> http://stackoverflow.com/a/25482763
>
> Well I used MP4 because it worked. I would prefer to use some other
format. I think MPEG2-TS is more suitable for this task. Let me post the
steps again just for the mpegts(MPEG2-TS) format.
*STEP 1* is to encode a file. There are this warning, but I'm don't know
how to fix them. But the video still plays with ffplay.
ffmpeg -i BQTerrace_1920x1080_60_qp22.bin -r 25 -b:v 2500k -c:v hevc
-preset medium -x
65-params crf=27 -y -f mpegts test.ts
ffmpeg version N-68441-g4fa42e0 Copyright (c) 2000-2014 the FFmpeg
developers
built on Dec 14 2014 22:13:03 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --ena
le-iconv --enable-libass --enable-libbluray --enable-libbs2b
--enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-li
modplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroeding
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbi
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink
--enable-zlib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.105 / 56. 15.105
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 3.101 / 5. 3.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[hevc @ 000000000032e100] *Unknown HEVC profile: 0*
Last message repeated 3 times
[hevc @ 000000000031cee0] Stream #0: *not enough frames to estimate rate;
consider increasing probesize*
Input #0, hevc, from 'BQTerrace_1920x1080_60_qp22.bin':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc, yuv420p10le(tv), 1920x1080, 25 fps, 25 tbr,
1200k tbn, 25 tbc
x265 [info]: HEVC encoder version 1.4
x265 [info]: build info [Windows][GCC 4.9.2][64 bit] 8bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: WPP streams / frame threads / pool : 17 / 2 / 4
x265 [info]: CTU size / RQT depth inter / intra : 64 / 1 / 1
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut : 25 / 250 / 40
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb / refs: 1 / 1 / 0 / 3
x265 [info]: Rate Control / AQ-Strength / CUTree : CRF-27.0 / 1.0 / 1
x265 [info]: tools: rd=3 lft sao signhide tmvp
[hevc @ 0000000006857de0] *Unknown HEVC profile: 0*
Last message repeated 1 times
Output #0, mpegts, to 'test.ts':
Metadata:
encoder : Lavf56.15.105
Stream #0:0: Video: hevc (libx265), yuv420p, 1920x1080, q=2-31, 2500
kb/s, 25 fps, 90k tbn, 25 tbc
Metadata:
encoder : Lavc56.14.100 libx265
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> hevc (libx265))
Press [q] to stop, [?] for help
[hevc @ 0000000006857de0] Unknown HEVC profile: 0
Last message repeated 1 times
frame= 600 fps=6.5 q=0.0 Lsize= 7740kB time=00:00:23.92
bitrate=2650.7kbits/s
video:7113kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 8.813824%
x265 [info]: frame I: 3, Avg QP:27.06 kb/s: 35250.87
x265 [info]: frame P: 121, Avg QP:27.73 kb/s: 9571.68
x265 [info]: frame B: 476, Avg QP:33.05 kb/s: 403.04
x265 [info]: global : 600, Avg QP:31.95 kb/s: 2426.29
x265 [info]: Weighted P-Frames: Y:9.1% UV:6.6%
x265 [info]: consecutive B-frames: 0.8% 0.0% 3.2% 6.5% 89.5%
*STEP 2* stream the file over UDP. Here I don't know what to do. What
parameters should I change/add/remove? Or is the source file "test.ts"
already corrupted? (The output is much longer because for each frame there
are the same errors)
ffmpeg -re -i test.ts -c:v copy -f mpegts udp://172.18.60.47:1234
ffmpeg version N-68441-g4fa42e0 Copyright (c) 2000-2014 the FFmpeg
developers
built on Dec 14 2014 22:13:03 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b
--enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink
--enable-zlib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.105 / 56. 15.105
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 3.101 / 5. 3.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mpegts, from 'test.ts':
Duration: 00:00:24.00, start: 1.480000, bitrate: 2641 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: hevc (Main) ([36][0][0][0] / 0x0024),
yuv420p(tv), 1920x1080, 25 fps, 25 tbr, 90k tbn, 25 tbc
Output #0, mpegts, to 'udp://172.18.60.47:1234':
Metadata:
encoder : Lavf56.15.105
Stream #0:0: Video: hevc ([36][0][0][0] / 0x0024), yuv420p, 1920x1080,
q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mpegts @ 00000000050b0520] *HEVC bitstream error, startcode missing, size
75310 data 00000102*
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
2941 data 00000102
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
1436 data 00000100
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
57986 data 00000102
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
3777 data 00000102
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
1369 data 00000100
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
55920 data 00000102
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
3855 data 00000102
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
1707 data 00000100
[mpegts @ 00000000050b0520] HEVC bitstream error, startcode missing, size
2177 data 00000100
frame= 11 fps=0.0 q=-1.0 Lsize= 419kB time=00:00:00.36
bitrate=9537.9kbits/s
video:387kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 8.256908%
Received signal 2: terminating.
Any help appreciated. :)
Best regards,
Rudi
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
More information about the ffmpeg-user
mailing list