Re: [FFmpeg-user] Unable to use hardware encoder h264_rkmpp with software decoded ATSC OTA transmission using rk

2020-08-13 Thread Carl Zwanzig

On 8/13/2020 12:28 PM, Brad Bruggemann wrote:

ffmpeg version 589de66a0b Copyright (c) 2000-2018 the FFmpeg developers


Always the first question- have you tried an up-to-date build of ffmpeg? If 
not, please do.


Later,

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Unable to use hardware encoder h264_rkmpp with software decoded ATSC OTA transmission using rk

2020-08-13 Thread Brad Bruggemann
When attempting to hardware encode to h264 using the Rockchip MPP encoder
h264_rkmpp from an ATSC source, FFMPEG errors out with:

"Impossible to convert between the formats supported by the filter
'Parsed_null_0' and the filter 'auto_scaler_0'"
The sample file used in this example can be downloaded here:
https://transfer.sh/BRMej/out.ts

The full command used and resulting output is as follows:
$ ffmpeg -loglevel 48 -c:v mpeg2video -f mpegts -i out.ts -f mp4 -c:v
h264_rkmpp -c:a libfdk_aac -preset ultrafast -mbd rd -copyinkf -flags
+ilme+ildct -fflags +genpts out.mp4 -y

ffmpeg version 589de66a0b Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 9.3.0 (GCC)
  configuration: --prefix=/usr/local --extra-libs='-lpthread -lm'
--enable-hardcoded-tables --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
--enable-rkmpp --enable-version3 --enable-libdrm --enable-libx265
--enable-nonfree
  libavutil  56. 14.100 / 56. 14.100
  libavcodec 58. 18.100 / 58. 18.100
  libavformat58. 12.100 / 58. 12.100
  libavdevice58.  3.100 / 58.  3.100
  libavfilter 7. 16.100 /  7. 16.100
  libswscale  5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc55.  1.100 / 55.  1.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument '48'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'mpeg2video'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'mpegts'.
Reading option '-i' ... matched as input url with argument 'out.ts'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'mp4'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'h264_rkmpp'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'libfdk_aac'.
Reading option '-preset' ... matched as AVOption 'preset' with
argument 'ultrafast'.
Reading option '-mbd' ... matched as AVOption 'mbd' with argument 'rd'.
Reading option '-copyinkf' ... matched as option 'copyinkf' (copy
initial non-keyframes) with argument '1'.
Reading option '-flags' ... matched as AVOption 'flags' with argument
'+ilme+ildct'.
Reading option '-fflags' ... matched as AVOption 'fflags' with
argument '+genpts'.
Reading option 'out.mp4' ... matched as output url.
Reading option '-y' ... matched as option 'y' (overwrite output files)
with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument 48.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url out.ts.
Applying option c:v (codec name) with argument mpeg2video.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an input file: out.ts.
[mpegts @ 0xaaab03c8df20] Opening 'out.ts' for reading
[file @ 0xaaab03c8e820] Setting default whitelist 'file,crypto'
[mpegts @ 0xaaab03c8df20] Before avformat_find_stream_info() pos: 0
bytes read:5013504 seeks:1 nb_streams:0
[mpegts @ 0xaaab03c8df20] stream=0 stream_type=0 pid=31 prog_reg_desc=
[mpegts @ 0xaaab03c8df20] probing stream 0 pp:2500
[mpegts @ 0xaaab03c8df20] Probe with size=204749, packets=1 detected
mpegvideo with score=25
[mpegts @ 0xaaab03c8df20] probed stream 0
[mpegts @ 0xaaab03c8df20] stream=1 stream_type=0 pid=34 prog_reg_desc=
[mpeg2video @ 0xaaab03cab640] Format yuv420p chosen by get_format().
[mpegts @ 0xaaab03c8df20] probing stream 1 pp:2500
[mpegts @ 0xaaab03c8df20] Probe with size=7680, packets=1 detected ac3
with score=25
[mpegts @ 0xaaab03c8df20] probed stream 1
[mpegts @ 0xaaab03c8df20] max_analyze_duration 500 reached at
5005000 microseconds st:0
[mpegts @ 0xaaab03c8df20] PES packet size mismatch
[mpegts @ 0xaaab03c8df20] After avformat_find_stream_info() pos: 0
bytes read:9195664 seeks:3 frames:306
Input #0, mpegts, from 'out.ts':
  Duration: 00:00:18.42, start: 29234.532200, bitrate: 5406 kb/s
Stream #0:0[0x31], 152, 1/9: Video: mpeg2video (Main), 1
reference frame, yuv420p(yuv420p) (tv, bt709, top first, left),
1920x1080 [SAR 1:1 DAR 16:9], 0/1, Closed Captions, 29.97 fps, 29.97
tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x34], 154, 1/9: Audio: ac3, 48000 Hz, 5.1(side),
fltp, 384 kb/s
Successfully opened the file.
Parsing a group of options: output url out.mp4.
Applying option f (force format) with argument mp4.
Applying option c:v (codec name) with argument h264_rkmpp.
Applying option c:a (codec name) with argument libfdk_aac.
Applying option copyinkf (copy initial non-keyframes) with argument 1.
Successfully parsed a group of options.
Opening an output file: out.mp4.
Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp))
specified for output file #0 (out.mp4) has not been used for any

Re: [FFmpeg-user] Slowing ffmpeg down

2020-08-13 Thread Shaun Procter


> On 13 Aug 2020, at 2:35 am, Rich Andrews  wrote:
> 
> On Tue, Aug 11, 2020 at 11:54 PM Shaun Procter  >
> wrote:
> 
>>> On 12 Aug 2020, at 9:01 am, Rich Andrews 
>> wrote:
>>> 
>>> Is there any trick to slow down ffmpeg on a simple stream mapping?
>>> 
>>> Stream mapping:
>>> Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
>>> 
>>> Given an input file that is looped and output with a command such as:
>>> 
>>> ffmpeg-4.2.1-armhf-static/ffmpeg -y -t 200 -stream_loop -1 -i
>> HoldMusic.wav
>>> -map 0:a:0 -f wav output.wav
>>> 
>>> ffmpeg can move the data really quickly!
>>> 
>>> bitrate=1411.2kbits/s speed= 262x
>>> 
>>> Any way to get that speed down to ~1x?  My purpose is that ffmpeg is
>> being
>>> used as a child subprocess and I would like to be able to test its
>> behavior
>>> in-situ.  There is a lot of timing in my  application between fork and
>> join
>>> and having ffmpeg be slow would be really helpful.
>>> 
>>> Push comes to shove, I'll just use another program to more slowly copy,
>> but
>>> that wouldn't be as good as using ffmpeg itself since it has a host of
>>> behaviors as a child process regarding signaling and return codes. Come
>> to
>>> think of it, since I built ffmpeg, maybe I can just build a variant that
>>> sleeps frequently?
>>> 
>> 
>> You can use the -re flag like this,
>> 
>> ffmpeg-4.2.1-armhf-static/ffmpeg -re -y -t 200 -stream_loop -1 -I
>> HoldMusic.wav -map 0:a:0 -f wav output.wav
>> 
>> “The FFmpeg's "-re" flag means to "Read input at native frame rate. Mainly
>> used to simulate a grab device." i.e. if you wanted to stream a video file,
>> then you would want to use this, otherwise it might stream it too fast (it
>> attempts to stream at line speed by default). My guess is you typically
>> don't want to use this flag when streaming from a live device, ever.” -
>> https://trac.ffmpeg.org/wiki/StreamingGuide
>> 
>> Hope that helps.
>> 
>> Shaun
>> 
>> 
> I feel silly for having looked at that very switch and didn't bother trying
> it thinking that the input file doesn't have a framerate.  '-re' works
> perfectly.  Thank you for the perfect solution!

No worries at all, am glad I could help. It’s definitely not silly and we all 
need to start somewhere. The main thing is you asked for help and that shows 
intelligence.

> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org 
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user 
> 
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org  with 
> subject "unsubscribe".

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".