[FFmpeg-user] Overlaying subtitles using overlay_cuda filter

2022-01-16 Thread Andy Sheimo
Using the following command with ffmpeg:

ffmpeg -loglevel debug -stats -ss 0 -t 5187.893 -hwaccel cuda
-hwaccel_output_format cuda -i .mkv -filter_complex
[0:0][0:4]overlay_cuda[v] -map [v] -c:v hevc_nvenc -b:v 4000k -maxrate:v
12000k -bufsize:v 12000k -color_primaries:v bt709 -color_trc:v bt709
-colorspace:v bt709 -metadata:s:v title= -disposition:v default -map 0:1
-c:a:0 eac3 -disposition:a:0 default -map 0:2 -c:a:1 eac3 -disposition:a:1
0 -map 0:3 -c:s:0 copy -disposition:s:0 0 -metadata:g title= -default_mode
passthrough .mkv

Gives me the following error:

Impossible to convert between the formats supported by the filter 'graph 0
input from stream 0:4' and the filter 'auto_scale_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

>From what I am understanding this means that the format of the subtitles
which is S_HDMV/PGS is not able to be converted. from the vf_overlay_cuda.c
<https://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/16b3be4989575c291338c8e34aedc99489910ac7:/libavfilter/vf_overlay_cuda.c>
the
possible inputs are:

static const enum AVPixelFormat supported_overlay_formats[] = {
AV_PIX_FMT_NV12,
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUVA420P,
AV_PIX_FMT_NONE,
};

I am assuming possibly incorrectly that a subtitle would be AV_PIX_FMT_NONE
and should be an acceptable input. Is this just a limitation of the
overlay_cuda filter? Is there a conversion that should be done on the
subtitle track to make it compatible? I'm at a loss as to the direction to
take as I have been unable to find examples of how to use this filter since
the updates to it in the last year. Any input is appreciated.
ffmpeg version N-104831-g4f44a218e5-ffmpeg-windows-build-helpers Copyright (c) 
2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --pkg-config=pkg-config --pkg-config-flags=--static 
--extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug 
--disable-w32threads --arch=x86_64 --target-os=mingw32 
--cross-prefix=/home/andy/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-
 --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig 
--enable-gmp --enable-gnutls --enable-libass --enable-libbluray 
--enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi 
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug 
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex 
--enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc 
--enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi 
--enable-libmysofa --enable-libopenjpeg --enable-libopenh264 
--enable-liblensfun --enable-libvmaf --enable-libsrt --enable-libxml2 
--enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-libsvthevc 
--enable-libsvtav1 --enable-libaom --enable-libvpx --enable-nvenc 
--enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lpthread 
--extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC 
--extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl 
--enable-frei0r --enable-librubberband --enable-libvidstab --enable-libx264 
--enable-libx265 --enable-avisynth --enable-libaribb24 --enable-libxvid 
--enable-libdavs2 --enable-libxavs2 --enable-libxavs 
--extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static 
--disable-shared 
--prefix=/home/andy/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32
  libavutil  57. 10.101 / 57. 10.101
  libavcodec 59. 14.100 / 59. 14.100
  libavformat59.  9.102 / 59.  9.102
  libavdevice59.  0.101 / 59.  0.101
  libavfilter 8. 19.100 /  8. 19.100
  libswscale  6.  1.101 /  6.  1.101
  libswresample   4.  0.100 /  4.  0.100
  libpostproc56.  0.100 / 56.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) 
with argument 'debug'.
Reading option '-stats' ... matched as option 'stats' (print progress report 
during encoding) with argument '1'.
Reading option '-ss' ... matched as option 'ss' (set the start time offset) 
with argument '0'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" 
seconds of audio/video) with argument '5187.893'.
Reading option '-hwaccel' ... matched as option 'hwaccel' (use HW accelerated 
decoding) with argument 'cuda'.
Reading option '-hwaccel_output_format' ... matched as option 
'hwaccel_output_format' (select output format used with HW accelerated 
decoding) with argument 'cuda'.
Reading option '-i' ... matched as input url with argument 'J:\Remuxed\My 
Neighbor Totoro\My Neighbor Totoro.mkv'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create 
a complex filtergraph) with argument '[0:0]

[FFmpeg-user] error during conversion

2020-12-11 Thread Andy Sheimo
Trying to transcode a file and perform a pixel conversion from 8 to 10 bit.
The transcode errors with Impossible to convert between the formats
supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

I have tried inserting scale_qsv into the command with no success either.
The original command line is as follows:

ffmpeg -loglevel debug -stats -qsv_device 1 -hwaccel qsv -c:v vc1_qsv -i
"F:\Testing 3\BLADE RUNNER\Blade Runner - The Final Cut.mkv" -map 0:0 -c:v
hevc_qsv -pix_fmt:v p010le -b:v 6000k -maxrate:v 18000k -load_plugin:v
hevc_hw -color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709
-metadata:s:v title= -disposition:v default -map 0:1 -c:a:0 copy
-metadata:s:a:0 title= -disposition:a:0 default -sn -metadata:g title=
-default_mode passthrough "Blade Runner - The Final Cut.mkv"

here is the debug output:
ffmpeg version N-99979-gb0a8b40294-ffmpeg-windows-build-helpers Copyright
(c) 2000-2020 the FFmpeg developers
  built with gcc 10.1.0 (GCC)
  configuration: --pkg-config=pkg-config --pkg-config-flags=--static
--extra-version=ffmpeg-windows-build-helpers --enable-version3
--disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32
--cross-prefix=/home/asheimo/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-
--enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopus --enable-libsoxr --enable-libvo-amrwbenc
--enable-libvorbis --enable-opengl --enable-libaom --enable-libvpx
--enable-nvenc --enable-nvdec --enable-cuda-llvm --extra-libs=-lharfbuzz
--extra-libs=-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC
--extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf
--enable-libmfx --enable-gpl --enable-frei0r --enable-filter=frei0r
--enable-librubberband --enable-libvidstab --enable-libx264
--enable-libx265 --enable-libxvid --enable-libdavs2 --enable-libxavs2
--enable-libxavs --enable-avresample --extra-cflags='-mtune=generic'
--extra-cflags=-O3 --enable-static --disable-shared
--prefix=/home/asheimo/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32
  libavutil  56. 60.100 / 56. 60.100
  libavcodec 58.112.103 / 58.112.103
  libavformat58. 64.100 / 58. 64.100
  libavdevice58. 11.103 / 58. 11.103
  libavfilter 7. 90.100 /  7. 90.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc55.  8.100 / 55.  8.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-stats' ... matched as option 'stats' (print progress
report during encoding) with argument '1'.
Reading option '-qsv_device' ... matched as option 'qsv_device' (set QSV
hardware device (DirectX adapter index, DRM path or X11 display name)) with
argument '1'.
Reading option '-hwaccel' ... matched as option 'hwaccel' (use HW
accelerated decoding) with argument 'qsv'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument
'vc1_qsv'.
Reading option '-i' ... matched as input url with argument 'F:\Testing
3\BLADE RUNNER\Blade Runner - The Final Cut.mkv'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0:0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument
'hevc_qsv'.
Reading option '-pix_fmt:v' ... matched as option 'pix_fmt' (set pixel
format) with argument 'p010le'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use
-b:v)) with argument '6000k'.
Reading option '-maxrate:v' ... matched as AVOption 'maxrate:v' with
argument '18000k'.
Reading option '-load_plugin:v' ... matched as AVOption 'load_plugin:v'
with argument 'hevc_hw'.
Reading option '-color_primaries:v' ... matched as AVOption
'color_primaries:v' with argument 'bt709'.
Reading option '-color_trc:v' ... matched as AVOption 'color_trc:v' with
argument 'bt709'.
Reading option '-colorspace:v' ... matched as AVOption 'colorspace:v' with
argument 'bt709'.
Reading option '-metadata:s:v' ... matched as option 'metadata' (add
metadata) with argument 'title='.
Reading option '-disposition:v' ... matched as option 'disposition'
(disposition) with argument 'default'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0:1'.
Reading option '-c:a:0' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '-metadata:s:a:0' ... matched as option 'metadata' (add
metadata) with argument 'title='.
Reading option '-disposition:a:0' ... matched as option 'disposition'
(disposition) with argument 'default'.
Reading option '-sn' ... matched as option 'sn' (disable subtitle) with
argument '1'.
Reading option '-metadata:g' ... 

Re: [FFmpeg-user] Compilation Guide / MSVC on Wiki

2020-12-02 Thread Andy Sheimo
Adding on to what Gyan stated, if you really want to build your own there
are several projects on github that work well and could help you further
your education.

https://github.com/rdp/ffmpeg-windows-build-helpers

https://github.com/m-ab-s/media-autobuild_suite

good luck
___
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".

Re: [FFmpeg-user] Uninstalling ffmpeg

2020-12-02 Thread Andy Sheimo
>
>
> i just don't get the stupidity of the OP which can be solved by a little
> child within 2 minutes of thinking in case of a slow brain
>
> having a static binary somewhere is a no-brainer - period
>

Actually having a static binary is not a no brainer. I know that I use a
static binary and I can make said static binary jump through hoops, but I
can't tell you why I use a static binary or the difference between that and
a shared binary. Someday I should probably learn but as of today I don't
know. if that makes me "a little child" with "a slow brain" then said
person is brilliant.

Also not everyone has great google-fu, sometimes finding the right keywords
is difficult, so in some cases why not ask a group of people that use the
software all the time? They will be able to answer quickly.

I've asked questions here and gotten zero responses, does that mean I have
been shunned? I doubt it, it's more likely that I have asked something that
no one has an answer for. Does that make everyone on this list "a little
child"?

Perspective is everything, I suggest you re-evaluate yours.
___
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] HW 8bit to 10bit conversion

2020-11-22 Thread Andy Sheimo
Is it possible in a full hardware pipeline i.e. -hwaccel either nvidia or
intel(qsv) to convert a video from 8bit to 10bit. Currently we get errors:

Impossible to convert between the formats supported by the filter
'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

ffmpeg -loglevel error -stats -hwaccel qsv -c:v h264_qsv -i
 -map 0:0 -c:v hevc_qsv -pix_fmt:v p010le -b:v 6000k
-maxrate:v 18000k -load_plugin:v hevc_hw -color_primaries:v bt709
-color_trc:v bt709 -colorspace:v bt709 -metadata:s:v title\=
-disposition:v default -map 0:1 -c:a:0 ac3 -b:a:0 640k -metadata:s:a:0
title\= -disposition:a:0 default -sn -metadata:g title\= -default_mode
passthrough 
___
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] Fwd: Yadif_cuda and Pix_fmt

2020-09-14 Thread Andy Sheimo
I sent this message a couple times with zero response. Is there anyone that
can help with using NVDEC for decoding, converting 8bit to 10bit on the
GPU, then using NVENC to encode the video?


If I understand correctly, you want to first convert to 10 bit and then
> upload
> to cuda (and nvenc).


I am trying to keep the transcode completely on the GPU using CUDA to
decode then NVENC to encode, avoiding sending the data to the cpu and back
again.



> The "pix_fmt" option will try to convert the output of
> the filterchain which is impossible in your command line, you have to
> insert the format filter into the filterchain.
>
> Could you provide an example or point me toward documentation to help me
> understand how to do that please.
___
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".

Re: [FFmpeg-user] Yadif_cuda and Pix_fmt

2020-08-31 Thread Andy Sheimo
If I understand correctly, you want to first convert to 10 bit and then
> upload
> to cuda (and nvenc).


I am trying to keep the transcode completely on the GPU using CUDA to
decode then NVENC to encode, avoiding sending the data to the cpu and back
again.



> The "pix_fmt" option will try to convert the output of
> the filterchain which is impossible in your command line, you have to
> insert the format filter into the filterchain.
>
> Could you provide an example or point me toward documentation to help me
> understand how to do that please.
___
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".

Re: [FFmpeg-user] Yadif_cuda and Pix_fmt

2020-08-25 Thread Andy Sheimo
>
> If I understand correctly, you want to first convert to 10 bit and then
> upload
> to cuda (and nvenc).


I am trying to keep the transcode completely on the GPU using CUDA to
decode then NVENC to encode, avoiding sending the data to the cpu and back
again.



> The "pix_fmt" option will try to convert the output of
> the filterchain which is impossible in your command line, you have to
> insert the format filter into the filterchain.
>
> Could you provide an example or point me toward documentation to help me
> understand how to do that please.
___
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".

Re: [FFmpeg-user] Yadif_cuda and Pix_fmt

2020-08-25 Thread Andy Sheimo
Apologies for forgetting the command and output

ffmpeg -loglevel debug -stats -hwaccel cuda -i "F:\\Remuxed\\Robin Hood
Special Edition 2013\\Oo-de-lally Disney Sing-Along Song-featurette.mkv"
-map 0:0 -filter:v "yadif_cuda=deint=interlaced" -c:v hevc_nvenc -pix_fmt:v
p010le -b:v 1500k -maxrate:v 4500k -rc:v vbr_hq -spatial_aq:v 1
-color_primaries:v smpte170m -color_trc:v bt709 -colorspace:v smpte170m
-metadata:s:v "title=" -disposition:v default -map 0:1 -c:a:0 copy
-disposition:a:0 default -map 0:2 -c:s:0 copy -disposition:s:0 0
-metadata:g "title=" "Oo-de-lally Disney Sing-Along Song-featurette.mkv"
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.1 (GCC) 20200726
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
--enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm
--enable-librav1e --disable-w32threads --enable-libmfx --enable-ffnvcodec
--enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
--enable-amf
  libavutil  56. 51.100 / 56. 51.100
  libavcodec 58. 91.100 / 58. 91.100
  libavformat58. 45.100 / 58. 45.100
  libavdevice58. 10.100 / 58. 10.100
  libavfilter 7. 85.100 /  7. 85.100
  libswscale  5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc55.  7.100 / 55.  7.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-stats' ... matched as option 'stats' (print progress
report during encoding) with argument '1'.
Reading option '-hwaccel' ... matched as option 'hwaccel' (use HW
accelerated decoding) with argument 'cuda'.
Reading option '-i' ... matched as input url with argument
'F:\\Remuxed\\Robin Hood Special Edition 2013\\Oo-de-lally Disney
Sing-Along Song-featurette.mkv'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0:0'.
Reading option '-filter:v' ... matched as option 'filter' (set stream
filtergraph) with argument 'yadif_cuda=deint=interlaced'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument
'hevc_nvenc'.
Reading option '-pix_fmt:v' ... matched as option 'pix_fmt' (set pixel
format) with argument 'p010le'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use
-b:v)) with argument '1500k'.
Reading option '-maxrate:v' ... matched as AVOption 'maxrate:v' with
argument '4500k'.
Reading option '-rc:v' ... matched as AVOption 'rc:v' with argument
'vbr_hq'.
Reading option '-spatial_aq:v' ... matched as AVOption 'spatial_aq:v' with
argument '1'.
Reading option '-color_primaries:v' ... matched as AVOption
'color_primaries:v' with argument 'smpte170m'.
Reading option '-color_trc:v' ... matched as AVOption 'color_trc:v' with
argument 'bt709'.
Reading option '-colorspace:v' ... matched as AVOption 'colorspace:v' with
argument 'smpte170m'.
Reading option '-metadata:s:v' ... matched as option 'metadata' (add
metadata) with argument 'title='.
Reading option '-disposition:v' ... matched as option 'disposition'
(disposition) with argument 'default'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0:1'.
Reading option '-c:a:0' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '-disposition:a:0' ... matched as option 'disposition'
(disposition) with argument 'default'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0:2'.
Reading option '-c:s:0' ... matched as option 'c' (codec name) with
argument 'copy'.
Reading option '-disposition:s:0' ... matched as option 'disposition'
(disposition) with argument '0'.
Reading option '-metadata:g' ... matched as option 'metadata' (add
metadata) with argument 'title='.
Reading option 'Oo-de-lally Disney Sing-Along Song-featurette.mkv' ...
matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option stats (print progress report during encoding) with argument
1.
Successfully parsed a group of options.
Parsing a group of options: input url F:\\Remuxed\\Robin Hood Special
Edition 2013\\Oo-de-lally Disney Sing-Along Song-featurette.mkv.
Applying option hwaccel (use HW 

[FFmpeg-user] Yadif_cuda and Pix_fmt

2020-08-24 Thread Andy Sheimo
I'm trying to use yadif_cuda during a transcode along with converting from
8bit to 10bit. The process errors out:

Impossible to convert between the formats supported by the filter
'Parsed_yadif_cuda_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

If I don't set the pix_fmt then the transcode works without issue. I'm
trying to understand why I am getting that failure. It would seem to be
that the yadif_cuda filter would take the input stream, perform the
deinterlacing then the hevc_nvenc encoder should accept pix_fmt p010le.
What am I missing here.
___
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".

Re: [FFmpeg-user] question about fps filter

2020-05-27 Thread Andy Sheimo
The output file is how I noticed the issue it was reporting original frame
rate as 24000/1001 and current frame rate as 3/1001.

On Wed, May 27, 2020 at 1:43 AM Edward Park  wrote:

> Hi,
> > I found this in the debug output and am not sure why it sees what was
> > passed by the command line but then is ignored in the filter graph can
> > someone help me understand please? The complete debug output is available
> > but too big to include here.
> >
> > [Parsed_yadif_cuda_0 @ 0220ac5561c0] Setting 'deint' to value
> > 'interlaced'
> > [Parsed_fps_1 @ 0220ac74a500] Setting 'fps' to value '24000/1001'
> > [Parsed_fps_1 @ 0220ac74a500] fps=24000/1001
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'video_size'
> to
> > value '720x480'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pix_fmt' to
> > value '119'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'time_base' to
> > value '1/1000'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pixel_aspect'
> > to value '186/157'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'frame_rate'
> to
> > value '3/1001'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] w:720 h:480
> pixfmt:cuda
> > tb:1/1000 fr:3/1001 sar:186/157
>
> This doesn't necessarily mean the fps was ignored, it just means the input
> has that frame rate. As you've said it looks like the argument to the fps
> filter was parsed correctly, the message being logged before doesn't mean
> anything (it wasn't later overridden to 3/1001 or anything). Is the
> output file 3/1001 fps?
>
> Regards,
> Ted Park
>
> ___
> 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".

Re: [FFmpeg-user] question about fps filter

2020-05-26 Thread Andy Sheimo
Thanks for the info Moritz that is helpful to me. I'll keep looking at
things and see if my issue goes away in the next couple weeks.

-Andy

On Tue, May 26, 2020 at 2:27 AM Moritz Barsnick  wrote:

> Hi Andy,
>
> On Mon, May 25, 2020 at 20:43:03 -0400, Andy Sheimo wrote:
> > How can I check if this version contains the changes you reference?
> > > ffmpeg.exe -version
> > > ffmpeg version N-97877-g1e8ed181e3-ffmpeg-windows-build-helpers
> Copyright (c) 2000-2020 the FFmpeg developers
>
> Simply speaking, by checking which git commit that version was built
> from. The so-called hash of the git commit is the hexadecimal part
> after the 'g' in the version:
> 1e8ed181e3
> (or rather, a shortened version of the hash - but it doesn't matter
> here).
>
> > >> What version of ffmpeg are you using?
> > >> There have been recent updates to the NVENC encoder's implementation
> in
> > >> ffmpeg that better handle frame rate, such as this commit:
> > >>
> > >>
> https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/b18fd2b95b2fea10f0b5381333a1b4c032f010bc
> > >> Use the latest build and retest.
>
> If you replace the base part of this URL with said hash, as such:
> https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1e8ed181e3
> you will see the corresponding commit, and that you are using a build
> which includes something committed on Fri, 22 May 2020, while Dennis's
> link referenced a change made on Fri, 15 May 2020. So what you are
> using includes what Dennis pointed out.
>
> (In reality, it may be more complicated, because git isn't guaranteed
> to be linear, but this method suffices for checking how current a build
> is.)
>
> Cheers,
> Moritz
> ___
> 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".

Re: [FFmpeg-user] question about fps filter

2020-05-25 Thread Andy Sheimo
How can I check if this version contains the changes you reference?

On Fri, May 22, 2020 at 9:07 PM Andy Sheimo  wrote:

> using this version created today using
> https://github.com/rdp/ffmpeg-windows-build-helpers
>
> ffmpeg.exe -version
> ffmpeg version N-97877-g1e8ed181e3-ffmpeg-windows-build-helpers Copyright
> (c) 2000-2020 the FFmpeg developers
> built with gcc 8.3.0 (GCC)
> configuration: --pkg-config=pkg-config --pkg-config-flags=--static
> --extra-version=ffmpeg-windows-build-helpers --enable-version3
> --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32
> --cross-prefix=/home/asheimo/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-
> --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig
> --enable-gmp --enable-gnutls --enable-libass --enable-libbluray
> --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi
> --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex
> --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc
> --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi
> --enable-libmysofa --enable-libopenjpeg --enable-libopenh264
> --enable-liblensfun --enable-libvmaf --enable-libsrt --enable-demuxer=dash
> --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm
> --enable-libsvthevc --enable-libaom --enable-libvpx --enable-nvenc
> --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm
> --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC
> --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf
> --enable-libmfx --enable-gpl --enable-frei0r --enable-filter=frei0r
> --enable-librubberband --enable-libvidstab --enable-libx264
> --enable-libx265 --enable-libxvid --enable-libxavs --enable-avresample
> --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static
> --disable-shared
> --prefix=/home/asheimo/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32
> libavutil  56. 46.100 / 56. 46.100
> libavcodec 58. 87.100 / 58. 87.100
> libavformat58. 43.100 / 58. 43.100
> libavdevice58.  9.103 / 58.  9.103
> libavfilter 7. 82.100 /  7. 82.100
> libavresample   4.  0.  0 /  4.  0.  0
> libswscale  5.  6.101 /  5.  6.101
> libswresample   3.  6.100 /  3.  6.100
> libpostproc    55.  6.100 / 55.  6.100
>
> On Fri, May 22, 2020 at 6:24 PM Dennis Mungai  wrote:
>
>> On Sat, 23 May 2020 at 01:07, Andy Sheimo  wrote:
>>
>> > I am using the command line seen here but the fps filter is being
>> ignored.
>> >
>> > ffmpeg.exe -loglevel debug -stats -hwaccel cuda -hwaccel_output_format
>> cuda
>> > -i "Evanescence - Anywhere but Home.mkv" -map 0:0 -filter:v
>> > yadif_cuda=deint=interlaced,fps=24000/1001 -c:v h264_nvenc -b:v 2000k
>> > -maxrate:v 6000k -rc:v vbr_hq -spatial-aq:v 1 -temporal-aq:v 1
>> -profile:v
>> > high -color_primaries:v smpte170m -color_trc:v bt709 -colorspace:v
>> > smpte170m -metadata:s:v title= -disposition:v default -map 0:1 -c:a:0
>> eac3
>> > -b:a:0 256k -metadata:s:a:0 title= -disposition:a:0 default -map 0:2
>> -c:a:1
>> > copy -metadata:s:a:1 title= -disposition:a:1 0 -sn -metadata:g title=
>> > "Evanescence - Anywhere but Home 2.mkv"
>> >
>> > I found this in the debug output and am not sure why it sees what was
>> > passed by the command line but then is ignored in the filter graph can
>> > someone help me understand please? The complete debug output is
>> available
>> > but too big to include here.
>> >
>> > [Parsed_yadif_cuda_0 @ 0220ac5561c0] Setting 'deint' to value
>> > 'interlaced'
>> > [Parsed_fps_1 @ 0220ac74a500] Setting 'fps' to value '24000/1001'
>> > [Parsed_fps_1 @ 0220ac74a500] fps=24000/1001
>> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'video_size'
>> to
>> > value '720x480'
>> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pix_fmt' to
>> > value '119'
>> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'time_base'
>> to
>> > value '1/1000'
>> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting
>> 'pixel_aspect'
>> > to value '186/157'
>> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'frame_rate'
>> to
>> > value '3/1001'
>> > [graph 0 input from stream 0:0 @ 0220ac749f40] w:720 h

Re: [FFmpeg-user] yadif-cuda issues

2020-05-23 Thread Andy Sheimo
Thanks for looking into this.

On Sat, May 23, 2020 at 12:12 AM Kyle Schwarz  wrote:

> I worked with Rodger to address this, and it's been resolved in his
> patch 'compat/cuda/ptx2c: fix BSD sed compatibility'
>
> It's sitting in the devel list, but hopefully it'll be committed soon
> to fix this.
> ___
> 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".

Re: [FFmpeg-user] question about fps filter

2020-05-22 Thread Andy Sheimo
using this version created today using
https://github.com/rdp/ffmpeg-windows-build-helpers

ffmpeg.exe -version
ffmpeg version N-97877-g1e8ed181e3-ffmpeg-windows-build-helpers Copyright
(c) 2000-2020 the FFmpeg developers
built with gcc 8.3.0 (GCC)
configuration: --pkg-config=pkg-config --pkg-config-flags=--static
--extra-version=ffmpeg-windows-build-helpers --enable-version3
--disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32
--cross-prefix=/home/asheimo/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-
--enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig
--enable-gmp --enable-gnutls --enable-libass --enable-libbluray
--enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc
--enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi
--enable-libmysofa --enable-libopenjpeg --enable-libopenh264
--enable-liblensfun --enable-libvmaf --enable-libsrt --enable-demuxer=dash
--enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm
--enable-libsvthevc --enable-libaom --enable-libvpx --enable-nvenc
--enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm
--extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC
--extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf
--enable-libmfx --enable-gpl --enable-frei0r --enable-filter=frei0r
--enable-librubberband --enable-libvidstab --enable-libx264
--enable-libx265 --enable-libxvid --enable-libxavs --enable-avresample
--extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static
--disable-shared
--prefix=/home/asheimo/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32
libavutil  56. 46.100 / 56. 46.100
libavcodec 58. 87.100 / 58. 87.100
libavformat58. 43.100 / 58. 43.100
libavdevice58.  9.103 / 58.  9.103
libavfilter 7. 82.100 /  7. 82.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale  5.  6.101 /  5.  6.101
libswresample   3.  6.100 /  3.  6.100
libpostproc55.  6.100 / 55.  6.100

On Fri, May 22, 2020 at 6:24 PM Dennis Mungai  wrote:

> On Sat, 23 May 2020 at 01:07, Andy Sheimo  wrote:
>
> > I am using the command line seen here but the fps filter is being
> ignored.
> >
> > ffmpeg.exe -loglevel debug -stats -hwaccel cuda -hwaccel_output_format
> cuda
> > -i "Evanescence - Anywhere but Home.mkv" -map 0:0 -filter:v
> > yadif_cuda=deint=interlaced,fps=24000/1001 -c:v h264_nvenc -b:v 2000k
> > -maxrate:v 6000k -rc:v vbr_hq -spatial-aq:v 1 -temporal-aq:v 1 -profile:v
> > high -color_primaries:v smpte170m -color_trc:v bt709 -colorspace:v
> > smpte170m -metadata:s:v title= -disposition:v default -map 0:1 -c:a:0
> eac3
> > -b:a:0 256k -metadata:s:a:0 title= -disposition:a:0 default -map 0:2
> -c:a:1
> > copy -metadata:s:a:1 title= -disposition:a:1 0 -sn -metadata:g title=
> > "Evanescence - Anywhere but Home 2.mkv"
> >
> > I found this in the debug output and am not sure why it sees what was
> > passed by the command line but then is ignored in the filter graph can
> > someone help me understand please? The complete debug output is available
> > but too big to include here.
> >
> > [Parsed_yadif_cuda_0 @ 0220ac5561c0] Setting 'deint' to value
> > 'interlaced'
> > [Parsed_fps_1 @ 0220ac74a500] Setting 'fps' to value '24000/1001'
> > [Parsed_fps_1 @ 0220ac74a500] fps=24000/1001
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'video_size'
> to
> > value '720x480'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pix_fmt' to
> > value '119'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'time_base' to
> > value '1/1000'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pixel_aspect'
> > to value '186/157'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'frame_rate'
> to
> > value '3/1001'
> > [graph 0 input from stream 0:0 @ 0220ac749f40] w:720 h:480
> pixfmt:cuda
> > tb:1/1000 fr:3/1001 sar:186/157
> > [format @ 0220ac74bac0] Setting 'pix_fmts' to value
> > 'yuv420p|nv12|p010le|yuv444p|p016le|yuv444p16le|bgr0|rgb0|cuda|d3d11'
> > [AVFilterGraph @ 0220ac511d80] query_formats: 5 queried, 4 merged, 0
> > already done, 0 delayed
> > [h264_nvenc @ 0220ac561540] Using input frames context (format cuda)
> > with h264_nvenc encoder.
> > ___
> >
>
> 

[FFmpeg-user] question about fps filter

2020-05-22 Thread Andy Sheimo
I am using the command line seen here but the fps filter is being ignored.

ffmpeg.exe -loglevel debug -stats -hwaccel cuda -hwaccel_output_format cuda
-i "Evanescence - Anywhere but Home.mkv" -map 0:0 -filter:v
yadif_cuda=deint=interlaced,fps=24000/1001 -c:v h264_nvenc -b:v 2000k
-maxrate:v 6000k -rc:v vbr_hq -spatial-aq:v 1 -temporal-aq:v 1 -profile:v
high -color_primaries:v smpte170m -color_trc:v bt709 -colorspace:v
smpte170m -metadata:s:v title= -disposition:v default -map 0:1 -c:a:0 eac3
-b:a:0 256k -metadata:s:a:0 title= -disposition:a:0 default -map 0:2 -c:a:1
copy -metadata:s:a:1 title= -disposition:a:1 0 -sn -metadata:g title=
"Evanescence - Anywhere but Home 2.mkv"

I found this in the debug output and am not sure why it sees what was
passed by the command line but then is ignored in the filter graph can
someone help me understand please? The complete debug output is available
but too big to include here.

[Parsed_yadif_cuda_0 @ 0220ac5561c0] Setting 'deint' to value
'interlaced'
[Parsed_fps_1 @ 0220ac74a500] Setting 'fps' to value '24000/1001'
[Parsed_fps_1 @ 0220ac74a500] fps=24000/1001
[graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'video_size' to
value '720x480'
[graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pix_fmt' to
value '119'
[graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'time_base' to
value '1/1000'
[graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'pixel_aspect'
to value '186/157'
[graph 0 input from stream 0:0 @ 0220ac749f40] Setting 'frame_rate' to
value '3/1001'
[graph 0 input from stream 0:0 @ 0220ac749f40] w:720 h:480 pixfmt:cuda
tb:1/1000 fr:3/1001 sar:186/157
[format @ 0220ac74bac0] Setting 'pix_fmts' to value
'yuv420p|nv12|p010le|yuv444p|p016le|yuv444p16le|bgr0|rgb0|cuda|d3d11'
[AVFilterGraph @ 0220ac511d80] query_formats: 5 queried, 4 merged, 0
already done, 0 delayed
[h264_nvenc @ 0220ac561540] Using input frames context (format cuda)
with h264_nvenc encoder.
___
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".

Re: [FFmpeg-user] yadif-cuda issues

2020-05-22 Thread Andy Sheimo
I've been trying those scripts and been getting errors which I have a
ticket open on.

On Fri, May 22, 2020 at 11:43 AM Kyle Schwarz  wrote:

> On Fri May 22 2020 at 06:44:40 Andy Sheimo  wrote:
> > I tried to report this issue to Zeranoe's forums but they have since
> closed
> > down and a message pointing to the official ffmpeg contact messages is in
> > the forums place. Could you please advise if official support for
> > Zeranoe's builds is available here or are windows users trying to use
> those
> > builds out of luck?
>
> So far I'm unable to reproduce this as apparently my GTX 1060 "is lacking
> required capabilities". I tried:
> > ffmpeg -hwaccel nvdec -hwaccel_output_format cuda -i i.mkv -vf
> yadif_cuda=0:-1:1 -c:v h264_nvenc o.mkv
>
> On Tue Apr 21 2020 at 00:43:07, Dennis Mungai 
> wrote:
> > I've seen a similar issue here on the "CUDA_ERROR_INVALID_IMAGE: device
> > kernel image is invalid error" posted on this mailing list related to
> > Zeranoe's builds.
>
> I'm not able to find other mailing list posts that contain
> "CUDA_ERROR_INVALID_IMAGE" related to the Zeranoe builds. There is however
> an
> open bug that contains it (https://trac.ffmpeg.org/ticket/8457), which is
> not
> Windows related.
>
> If this is indeed a Windows/Zeranoe issue, it's rather specific and would
> implicate my cross-compiler itself. I'll need to be able to reproduce this
> to
> confirm, but you could try Rogers build script to see if it happens there
> too.
> ___
> 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".

Re: [FFmpeg-user] yadif-cuda issues

2020-05-21 Thread Andy Sheimo
I tried to report this issue to Zeranoe's forums but they have since closed
down and a message pointing to the official ffmpeg contact messages is in
the forums place. Could you please advise if official support for
Zeranoe's builds is available here or are windows users trying to use those
builds out of luck?

Thanks

On Mon, Apr 20, 2020 at 6:12 PM Andy Sheimo  wrote:

> OK will report. Thanks!
>
> On Mon, Apr 20, 2020 at 6:11 PM Dennis Mungai  wrote:
>
>> On Tue, 21 Apr 2020, 00:59 Andy Sheimo,  wrote:
>>
>> > Here is the output from nvidia-smi:
>> > Mon Apr 20 17:56:48 2020
>> >
>> >
>> +-+
>> > | NVIDIA-SMI 442.92   Driver Version: 442.92   CUDA Version:
>> 10.2
>> >   |
>> >
>> >
>> |---+--+--+
>> > | GPU  NameTCC/WDDM | Bus-IdDisp.A | Volatile
>> Uncorr.
>> > ECC |
>> > | Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage | GPU-Util
>> Compute
>> > M. |
>> >
>> >
>> |===+==+==|
>> > |   0  GeForce GTX 106... WDDM  | :01:00.0  On |
>> >  N/A |
>> > | 41%   31CP8 8W / 120W |341MiB /  3072MiB |  0%
>> >  Default |
>> >
>> >
>> +---+--+--+
>> >
>> >
>> >
>> >
>> +-+
>> > | Processes:   GPU
>> > Memory |
>> > |  GPU   PID   Type   Process name Usage
>> >|
>> >
>> >
>> |=|
>> > |0  3588C+G   Insufficient Permissions   N/A
>> >|
>> > |0  5432C+G   ...osoft.LockApp_cw5n1h2txyewy\LockApp.exe N/A
>> >|
>> > |0  6580C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A
>> >|
>> > |0  7292C+G   ...3.0.0_x64__8wekyb3d8bbwe\Calculator.exe N/A
>> >|
>> > |0 11704C+G   ...AppData\Local\slack\app-4.4.2\slack.exe N/A
>> >|
>> > |0 12492C+G   ...w5n1h2txyewy\InputApp\TextInputHost.exe N/A
>> >|
>> > |0 13628C+G   ...\bin\cef\cef.win7x64\steamwebhelper.exe N/A
>> >|
>> > |0 13888C+G   ...x64__8wekyb3d8bbwe\Microsoft.Photos.exe N/A
>> >|
>> > |0 13960C+G   C:\Windows\explorer.exeN/A
>> >|
>> > |0 14424C+G   ...s (x86)\DisplayFusion\DisplayFusion.exe N/A
>> >|
>> > |0 15028C+G   ...mmersiveControlPanel\SystemSettings.exe N/A
>> >|
>> > |0 16680C+G   ...6)\Google\Chrome\Application\chrome.exe N/A
>> >|
>> > |0 17068C+G   110.0_x64__8wekyb3d8bbwe\YourPhone.exe N/A
>> >|
>> > |0 18020C+G   ...5n1h2txyewy\StartMenuExperienceHost.exe N/A
>> >|
>> > |0 18268C+G   ...dows.Search_cw5n1h2txyewy\SearchApp.exe N/A
>> >|
>> >
>> >
>> +-+
>> >
>> > 2. the build is a Zeranoe build: ffmpeg-20200417-889ad93-win64-static
>> >
>> > On Mon, Apr 20, 2020 at 5:51 PM Dennis Mungai 
>> wrote:
>> >
>> > > On Tue, 21 Apr 2020 at 00:31, Andy Sheimo  wrote:
>> > >
>> > > > I'm trying to use the yadif_cuda deinterlace but I have not been
>> able
>> > to
>> > > > get it to work. Every option I.ve tried fails, I'm pretty sure I'm
>> > > getting
>> > > > something wrong so I'm looking for some advice.
>> > > >
>> > > > Here is my version:
>> > > > ffmpeg version git-2020-04-17-889ad93 Copyright (c) 2000-2020 the
>> > FFmpeg
>> > > > developers
>> > > > built with gcc 9.3.1 (GCC) 20200328
>> > > > configuration: --enable-gpl --enable-version3 --enable-sdl2
>> > > > --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
>> > > > --enable-libdav1d --enable-libbluray --enable-libfreetype
>> > > > --enable-

Re: [FFmpeg-user] yadif-cuda issues

2020-04-20 Thread Andy Sheimo
OK will report. Thanks!

On Mon, Apr 20, 2020 at 6:11 PM Dennis Mungai  wrote:

> On Tue, 21 Apr 2020, 00:59 Andy Sheimo,  wrote:
>
> > Here is the output from nvidia-smi:
> > Mon Apr 20 17:56:48 2020
> >
> >
> +-+
> > | NVIDIA-SMI 442.92   Driver Version: 442.92   CUDA Version: 10.2
> >   |
> >
> >
> |---+--+--+
> > | GPU  NameTCC/WDDM | Bus-IdDisp.A | Volatile Uncorr.
> > ECC |
> > | Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage | GPU-Util
> Compute
> > M. |
> >
> >
> |===+==+==|
> > |   0  GeForce GTX 106... WDDM  | :01:00.0  On |
> >  N/A |
> > | 41%   31CP8 8W / 120W |341MiB /  3072MiB |  0%
> >  Default |
> >
> >
> +---+--+--+
> >
> >
> >
> >
> +-+
> > | Processes:   GPU
> > Memory |
> > |  GPU   PID   Type   Process name Usage
> >|
> >
> >
> |=|
> > |0  3588C+G   Insufficient Permissions   N/A
> >|
> > |0  5432C+G   ...osoft.LockApp_cw5n1h2txyewy\LockApp.exe N/A
> >|
> > |0  6580C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A
> >|
> > |0  7292C+G   ...3.0.0_x64__8wekyb3d8bbwe\Calculator.exe N/A
> >|
> > |0 11704C+G   ...AppData\Local\slack\app-4.4.2\slack.exe N/A
> >|
> > |0 12492C+G   ...w5n1h2txyewy\InputApp\TextInputHost.exe N/A
> >|
> > |0 13628C+G   ...\bin\cef\cef.win7x64\steamwebhelper.exe N/A
> >|
> > |0 13888C+G   ...x64__8wekyb3d8bbwe\Microsoft.Photos.exe N/A
> >|
> > |0 13960C+G   C:\Windows\explorer.exeN/A
> >|
> > |0 14424C+G   ...s (x86)\DisplayFusion\DisplayFusion.exe N/A
> >|
> > |0 15028C+G   ...mmersiveControlPanel\SystemSettings.exe N/A
> >|
> > |0 16680C+G   ...6)\Google\Chrome\Application\chrome.exe N/A
> >|
> > |0 17068C+G   110.0_x64__8wekyb3d8bbwe\YourPhone.exe N/A
> >|
> > |0 18020C+G   ...5n1h2txyewy\StartMenuExperienceHost.exe N/A
> >|
> > |0 18268C+G   ...dows.Search_cw5n1h2txyewy\SearchApp.exe N/A
> >|
> >
> >
> +-+
> >
> > 2. the build is a Zeranoe build: ffmpeg-20200417-889ad93-win64-static
> >
> > On Mon, Apr 20, 2020 at 5:51 PM Dennis Mungai  wrote:
> >
> > > On Tue, 21 Apr 2020 at 00:31, Andy Sheimo  wrote:
> > >
> > > > I'm trying to use the yadif_cuda deinterlace but I have not been able
> > to
> > > > get it to work. Every option I.ve tried fails, I'm pretty sure I'm
> > > getting
> > > > something wrong so I'm looking for some advice.
> > > >
> > > > Here is my version:
> > > > ffmpeg version git-2020-04-17-889ad93 Copyright (c) 2000-2020 the
> > FFmpeg
> > > > developers
> > > > built with gcc 9.3.1 (GCC) 20200328
> > > > configuration: --enable-gpl --enable-version3 --enable-sdl2
> > > > --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> > > > --enable-libdav1d --enable-libbluray --enable-libfreetype
> > > > --enable-libmp3lame --enable-libopencore-amrnb
> > --enable-libopencore-amrwb
> > > > --enable-libopenjpeg --enable-libopus --enable-libshine
> > > --enable-libsnappy
> > > > --enable-libsoxr --enable-libsrt --enable-libtheora
> --enable-libtwolame
> > > > --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> > > > --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
> > > > --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf
> > > > --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
> > > > --enable-libspeex --enable-libxvid --enable-libaom
> --disable-w32threads
> > > > --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable

Re: [FFmpeg-user] yadif-cuda issues

2020-04-20 Thread Andy Sheimo
Here is the output from nvidia-smi:
Mon Apr 20 17:56:48 2020
+-+
| NVIDIA-SMI 442.92   Driver Version: 442.92   CUDA Version: 10.2
  |
|---+--+--+
| GPU  NameTCC/WDDM | Bus-IdDisp.A | Volatile Uncorr.
ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage | GPU-Util  Compute
M. |
|===+==+==|
|   0  GeForce GTX 106... WDDM  | :01:00.0  On |
 N/A |
| 41%   31CP8 8W / 120W |341MiB /  3072MiB |  0%
 Default |
+---+--+--+


+-+
| Processes:   GPU
Memory |
|  GPU   PID   Type   Process name Usage
   |
|=|
|0  3588C+G   Insufficient Permissions   N/A
   |
|0  5432C+G   ...osoft.LockApp_cw5n1h2txyewy\LockApp.exe N/A
   |
|0  6580C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A
   |
|0  7292C+G   ...3.0.0_x64__8wekyb3d8bbwe\Calculator.exe N/A
   |
|0 11704C+G   ...AppData\Local\slack\app-4.4.2\slack.exe N/A
   |
|0 12492C+G   ...w5n1h2txyewy\InputApp\TextInputHost.exe N/A
   |
|0 13628C+G   ...\bin\cef\cef.win7x64\steamwebhelper.exe N/A
   |
|0 13888C+G   ...x64__8wekyb3d8bbwe\Microsoft.Photos.exe N/A
   |
|0 13960C+G   C:\Windows\explorer.exeN/A
   |
|0 14424C+G   ...s (x86)\DisplayFusion\DisplayFusion.exe N/A
   |
|0 15028C+G   ...mmersiveControlPanel\SystemSettings.exe N/A
   |
|0 16680C+G   ...6)\Google\Chrome\Application\chrome.exe N/A
   |
|0 17068C+G   110.0_x64__8wekyb3d8bbwe\YourPhone.exe N/A
   |
|0 18020C+G   ...5n1h2txyewy\StartMenuExperienceHost.exe N/A
   |
|0 18268C+G   ...dows.Search_cw5n1h2txyewy\SearchApp.exe N/A
   |
+-+

2. the build is a Zeranoe build: ffmpeg-20200417-889ad93-win64-static

On Mon, Apr 20, 2020 at 5:51 PM Dennis Mungai  wrote:

> On Tue, 21 Apr 2020 at 00:31, Andy Sheimo  wrote:
>
> > I'm trying to use the yadif_cuda deinterlace but I have not been able to
> > get it to work. Every option I.ve tried fails, I'm pretty sure I'm
> getting
> > something wrong so I'm looking for some advice.
> >
> > Here is my version:
> > ffmpeg version git-2020-04-17-889ad93 Copyright (c) 2000-2020 the FFmpeg
> > developers
> > built with gcc 9.3.1 (GCC) 20200328
> > configuration: --enable-gpl --enable-version3 --enable-sdl2
> > --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> > --enable-libdav1d --enable-libbluray --enable-libfreetype
> > --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> > --enable-libopenjpeg --enable-libopus --enable-libshine
> --enable-libsnappy
> > --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame
> > --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> > --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
> > --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf
> > --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
> > --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads
> > --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid
> > --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
> > --enable-avisynth --enable-libopenmpt --enable-amf
> > libavutil  56. 42.102 / 56. 42.102
> > libavcodec 58. 80.100 / 58. 80.100
> > libavformat58. 42.100 / 58. 42.100
> > libavdevice58.  9.103 / 58.  9.103
> > libavfilter 7. 77.101 /  7. 77.101
> > libswscale  5.  6.101 /  5.  6.101
> > libswresample   3.  6.100 /  3.  6.100
> > libpostproc55.  6.100 / 55.  6.100
> >
> > here are the commands I am using:
> > ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda
> -i
> > "L:\Sheimo_Originals\Star Trek Into Darkness\Star Trek Into Darkness -
> > 1080p.mkv" -map 0:0 -vf yadif_cuda=0:-1:1 -c:v h264_nvenc -map 0:1 -c:a:0
> > eac3 -b:a:0 640k -metadata:s:a:0 title= -disposition:a:0 default -sn
> > -metadata:g title= "Star Trek Into Darkness - 1080p.mkv"
> >
> > or
> > ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda
> -i
> &g

[FFmpeg-user] yadif-cuda issues

2020-04-20 Thread Andy Sheimo
I'm trying to use the yadif_cuda deinterlace but I have not been able to
get it to work. Every option I.ve tried fails, I'm pretty sure I'm getting
something wrong so I'm looking for some advice.

Here is my version:
ffmpeg version git-2020-04-17-889ad93 Copyright (c) 2000-2020 the FFmpeg
developers
built with gcc 9.3.1 (GCC) 20200328
configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
--enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads
--enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth --enable-libopenmpt --enable-amf
libavutil  56. 42.102 / 56. 42.102
libavcodec 58. 80.100 / 58. 80.100
libavformat58. 42.100 / 58. 42.100
libavdevice58.  9.103 / 58.  9.103
libavfilter 7. 77.101 /  7. 77.101
libswscale  5.  6.101 /  5.  6.101
libswresample   3.  6.100 /  3.  6.100
libpostproc55.  6.100 / 55.  6.100

here are the commands I am using:
ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda -i
"L:\Sheimo_Originals\Star Trek Into Darkness\Star Trek Into Darkness -
1080p.mkv" -map 0:0 -vf yadif_cuda=0:-1:1 -c:v h264_nvenc -map 0:1 -c:a:0
eac3 -b:a:0 640k -metadata:s:a:0 title= -disposition:a:0 default -sn
-metadata:g title= "Star Trek Into Darkness - 1080p.mkv"

or
ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda -i
"L:\Sheimo_Originals\Star Trek Into Darkness\Star Trek Into Darkness -
1080p.mkv" -map 0:0 -vf yadif_cuda=deint=interlaced -c:v h264_nvenc -map
0:1 -c:a:0 eac3 -b:a:0 640k -metadata:s:a:0 title= -disposition:a:0 default
-sn -metadata:g title= "Star Trek Into Darkness - 1080p.mkv"

or
ffmpeg -loglevel debug -stats -hwaccel nvdec -hwaccel_output_format cuda -i
"L:\Sheimo_Originals\Star Trek Into Darkness\Star Trek Into Darkness -
1080p.mkv" -map 0:0 -filter:v yadif_cuda=deint=interlaced -c:v h264_nvenc
-b:v 2000k -maxrate:v 6000k -rc:v vbr_hq -profile:v high -color_primaries:v
smpte170m -color_trc:v bt709 -colorspace:v smpte170m -metadata:s:v title=
-disposition:v default -map 0:1 -c:a:0 eac3 -b:a:0 640k -metadata:s:a:0
title= -disposition:a:0 default -sn -metadata:g title= "Star Trek Into
Darkness - 1080p.mkv"

The most common error I receive is:
[Parsed_yadif_cuda_0 @ 020bd180a2c0]
cu->cuModuleLoadData(>cu_module, vf_yadif_cuda_ptx) failed ->
CUDA_ERROR_INVALID_IMAGE: device kernel image is invalid
[Parsed_yadif_cuda_0 @ 020bd180a2c0] Failed to configure output pad on
Parsed_yadif_cuda_0
Error reinitializing filters!
Failed to inject frame into filter network: Generic error in an external
library
Error while processing the decoded data for stream #0:0

full log attached as output.txt

The other common error is:
[auto_scaler_0 @ 020daa1ac880] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 020daa1ac880] w:iw h:ih flags:'bicubic' interl:0
[Parsed_yadif_cuda_0 @ 020da98bedc0] auto-inserting filter
'auto_scaler_0' between the filter 'graph 0 input from stream 0:0' and the
filter 'Parsed_yadif_cuda_0'
Impossible to convert between the formats supported by the filter 'graph 0
input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

full log attached as output2.txt.

The second error I am pretty sure has to do with me calling some software
filter in a full hardware pipeline but I am unsure what it is. I also heard
rumor of auto_scale being inserted when it doesn't need to be but I will
let the experts tell me if they see that.

My goal is to be able to use yadif_cuda so that I can keep a complete gpu
pipeline. Any and all help is appreciated. Thanks
ffmpeg version git-2020-04-17-889ad93 Copyright (c) 2000-2020 the FFmpeg 
developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass 
--enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg 
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr 
--enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx 
--enable-libwavpack --enable-libwebp --enable-libx264 

Re: [FFmpeg-user] Issue with hwaccel cuvid

2020-04-08 Thread Andy Sheimo
Dennis, Thank you. Lesson learned, check latest builds before submitting
questions. Using the latest static build has resolved the issue.

Cheers, -Andy

On Wed, Apr 8, 2020 at 12:14 PM Dennis Mungai  wrote:

> On Wed, 8 Apr 2020 at 19:04, Andy Sheimo  wrote:
>
> > This still produces the same error;
> >
> > ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
> > -hwaccel_output_format cuda -c:v mpeg2_cuvid -extra_hw_frames 3 -i
> > "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a
> copy
> > -c:v h264_nvenc test.mkv
> >
> > But this works to complete the job;
> >
> > ffmpeg -threads 1 -loglevel verbose -hwaccel cuda
> > -hwaccel_output_format cuda -extra_hw_frames 3 -i
> > "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a
> copy
> > -c:v h264_nvenc test.mkv
> >
> > By not specifying  -c:v mpeg2_cuvid do we know what decoder is being
> used?
> > Is the process still completely in hardware? Do you think this is a
> > limitation of the cuvid decoder?
> >
> > Thanks for your help. -Andy
> >
>
> NVDEC (an alias to the CUDA hwaccel) handles GPU memory quite differently
> from CUVID, and when its' in use, the decoder is not specified.
> CUVID, however, was never a true hwaccel, but rather a "wrapper" that
> "brings up"/initializes a specific decoder by name passed to it via -c:v,
> in a similar fashion to the bring-up seen with QuickSync (-hwaccel qsv).
>
> I cannot speak much about why CUVID is failing on your end. I migrated all
> my workflows to NVDEC an year ago.
>
> Perhaps omitting the hwacccel_output_format with CUVID will help?
>
> Try this:
>
> ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
> -c:v mpeg2_cuvid -extra_hw_frames 3 -i
> "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
> -c:v h264_nvenc test.mkv
>
> Then report back.
> ___
> 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".

Re: [FFmpeg-user] Issue with hwaccel cuvid

2020-04-08 Thread Andy Sheimo
This still produces the same error;

ffmpeg -threads 1 -loglevel verbose -hwaccel cuvid
-hwaccel_output_format cuda -c:v mpeg2_cuvid -extra_hw_frames 3 -i
"l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
-c:v h264_nvenc test.mkv

But this works to complete the job;

ffmpeg -threads 1 -loglevel verbose -hwaccel cuda
-hwaccel_output_format cuda -extra_hw_frames 3 -i
"l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
-c:v h264_nvenc test.mkv

By not specifying  -c:v mpeg2_cuvid do we know what decoder is being used?
Is the process still completely in hardware? Do you think this is a
limitation of the cuvid decoder?

Thanks for your help. -Andy

On Wed, Apr 8, 2020 at 11:36 AM Dennis Mungai  wrote:

> On Wed, 8 Apr 2020 at 17:57, Andy Sheimo  wrote:
>
> > I keep getting an error on some files and it appears to be due to a
> > scaler being inserted but I don't know how to fix it. Any help would be
> > appreciated. logging below:
> >
> > K:\Video\GAMERA THE BRAVE>ffmpeg -loglevel verbose -hwaccel cuvid
> > -hwaccel_output_format yuv420p -c:v mpeg2_cuvid -i
> > "l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a
> copy
> > -c:v h264_nvenc test.mkv
> > ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
> >   built with gcc 9.2.1 (GCC) 20200122
> >   configuration: --enable-gpl --enable-version3 --enable-sdl2
> > --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> > --enable-libdav1d --enable-libbluray --enable-libfreetype
> > --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> > --enable-libopenjpeg --enable-libopus --enable-libshine
> --enable-libsnappy
> > --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
> > --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
> > --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
> --enable-gmp
> > --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> > --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
> > --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
> > --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
> > --enable-avisynth --enable-libopenmpt
> >   libavutil  56. 31.100 / 56. 31.100
> >   libavcodec 58. 54.100 / 58. 54.100
> >   libavformat58. 29.100 / 58. 29.100
> >   libavdevice58.  8.100 / 58.  8.100
> >   libavfilter 7. 57.100 /  7. 57.100
> >   libswscale  5.  5.100 /  5.  5.100
> >   libswresample   3.  5.100 /  3.  5.100
> >   libpostproc55.  5.100 / 55.  5.100
> > Input #0, matroska,webm, from 'l:\welter_originals\gamera the
> > brave\Latatude Zero-trailer.mkv':
> >   Metadata:
> > encoder : libmakemkv v1.15.0 (1.3.5/1.4.7) win(x64-release)
> > creation_time   : 2020-03-05T18:41:29.00Z
> >   Duration: 00:02:28.75, start: 0.00, bitrate: 4685 kb/s
> > Stream #0:0(eng): Video: mpeg2video (Main), 1 reference frame,
> > yuv420p(tv, top first, left), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157
> DAR
> > 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
> > Metadata:
> >   BPS-eng : 4488094
> >   DURATION-eng: 00:02:28.74860
> >   NUMBER_OF_FRAMES-eng: 3567
> >   NUMBER_OF_BYTES-eng: 83449382
> >   SOURCE_ID-eng   : 0100E0
> >   _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
> >   _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
> >   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> > SOURCE_ID
> > Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s
> (default)
> > Metadata:
> >   title   : Mono
> >   BPS-eng : 192000
> >   DURATION-eng: 00:02:28.70400
> >   NUMBER_OF_FRAMES-eng: 4647
> >   NUMBER_OF_BYTES-eng: 3568896
> >   SOURCE_ID-eng   : 0180BD
> >   _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
> >   _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
> >   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> > SOURCE_ID
> > File 'test.mkv' already exists. Overwrite ? [y/N] y
> > [mpeg2_cuvid @ 01ec985dfbc0] Initializing cuvid hwaccel
> > [mpeg2_cuvid @ 01ec985dfbc0] CUVID capabilities for mpeg2_cuvid:
> > [mpeg2_cuvid @ 01ec985dfbc0] 8 bit: supported: 1, min_width: 48,
> > max_width: 4080, min_height: 16, max_height: 4080
> > [mpeg2_cuvid @ 01ec985dfbc0] 10 bit: supported: 0, min_width: 0,
> > max_widt

[FFmpeg-user] Issue with hwaccel cuvid

2020-04-08 Thread Andy Sheimo
I keep getting an error on some files and it appears to be due to a
scaler being inserted but I don't know how to fix it. Any help would be
appreciated. logging below:

K:\Video\GAMERA THE BRAVE>ffmpeg -loglevel verbose -hwaccel cuvid
-hwaccel_output_format yuv420p -c:v mpeg2_cuvid -i
"l:\welter_originals\gamera the brave\Latatude Zero-trailer.mkv" -c:a copy
-c:v h264_nvenc test.mkv
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth --enable-libopenmpt
  libavutil  56. 31.100 / 56. 31.100
  libavcodec 58. 54.100 / 58. 54.100
  libavformat58. 29.100 / 58. 29.100
  libavdevice58.  8.100 / 58.  8.100
  libavfilter 7. 57.100 /  7. 57.100
  libswscale  5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'l:\welter_originals\gamera the
brave\Latatude Zero-trailer.mkv':
  Metadata:
encoder : libmakemkv v1.15.0 (1.3.5/1.4.7) win(x64-release)
creation_time   : 2020-03-05T18:41:29.00Z
  Duration: 00:02:28.75, start: 0.00, bitrate: 4685 kb/s
Stream #0:0(eng): Video: mpeg2video (Main), 1 reference frame,
yuv420p(tv, top first, left), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR
279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Metadata:
  BPS-eng : 4488094
  DURATION-eng: 00:02:28.74860
  NUMBER_OF_FRAMES-eng: 3567
  NUMBER_OF_BYTES-eng: 83449382
  SOURCE_ID-eng   : 0100E0
  _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
  _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
  _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
SOURCE_ID
Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s (default)
Metadata:
  title   : Mono
  BPS-eng : 192000
  DURATION-eng: 00:02:28.70400
  NUMBER_OF_FRAMES-eng: 4647
  NUMBER_OF_BYTES-eng: 3568896
  SOURCE_ID-eng   : 0180BD
  _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
  _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
  _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
SOURCE_ID
File 'test.mkv' already exists. Overwrite ? [y/N] y
[mpeg2_cuvid @ 01ec985dfbc0] Initializing cuvid hwaccel
[mpeg2_cuvid @ 01ec985dfbc0] CUVID capabilities for mpeg2_cuvid:
[mpeg2_cuvid @ 01ec985dfbc0] 8 bit: supported: 1, min_width: 48,
max_width: 4080, min_height: 16, max_height: 4080
[mpeg2_cuvid @ 01ec985dfbc0] 10 bit: supported: 0, min_width: 0,
max_width: 0, min_height: 0, max_height: 0
[mpeg2_cuvid @ 01ec985dfbc0] 12 bit: supported: 0, min_width: 0,
max_width: 0, min_height: 0, max_height: 0
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (mpeg2_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpeg2_cuvid @ 01ec985dfbc0] Initializing cuvid hwaccel
[mpeg2_cuvid @ 01ec985dfbc0] Formats: Original: cuda | HW: cuda | SW:
nv12
[graph 0 input from stream 0:0 @ 01ec98632f00] w:720 h:480 pixfmt:cuda
tb:1/1000 fr:3/1001 sar:186/157 sws_param:flags=2
[h264_nvenc @ 01ec985efe00] Loaded Nvenc version 10.0
[h264_nvenc @ 01ec985efe00] Nvenc initialized successfully
Output #0, matroska, to 'test.mkv':
  Metadata:
encoder : Lavf58.29.100
Stream #0:0(eng): Video: h264 (h264_nvenc) (Main), 1 reference frame
(H264 / 0x34363248), cuda(left), 720x480 [SAR 186:157 DAR 279:157],
q=-1--1, 2000 kb/s, 29.97 fps, 1k tbn, 29.97 tbc
Metadata:
  BPS-eng : 4488094
  DURATION-eng: 00:02:28.74860
  NUMBER_OF_FRAMES-eng: 3567
  NUMBER_OF_BYTES-eng: 83449382
  SOURCE_ID-eng   : 0100E0
  _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.0 win(x64-release)
  _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 18:41:29
  _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
SOURCE_ID
  encoder : Lavc58.54.100 h264_nvenc
Side data:
  cpb: bitrate max/min/avg: 0/0/200 buffer size: 400 vbv_delay:
-1
Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 

Re: [FFmpeg-user] How to hardcode subtitles

2020-03-23 Thread Andy
On Mon, Mar 16, 2020 at 4:04 AM Moritz Barsnick  wrote:
>
> On Sun, Mar 15, 2020 at 22:05:47 -0400, Andy wrote:
> > Can someone please shed some light on how to hardcode subtitles onto a file
> > that already has a subtitles(not hardcoded)?
>
> There's a wiki entry explaining this:
>
> https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
>
> Also note the part "If the subtitle is embedded in the container...",
> which is your case.
>
> Cheers,
> Moritz
> ___
> 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".


There are 3 subtitles in the file, how do I choose the correct subtitles?
Text #1
ID   : 3
Format   : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info: Advanced Sub Station Alpha
Compression mode : Lossless
Language : Italian
Default  : Yes
Forced   : Yes
DURATION : 01:47:24.38000

Text #2
ID   : 4
Format   : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info: Advanced Sub Station Alpha
Compression mode : Lossless
Language : Italian
Default  : No
Forced   : No
DURATION : 01:47:25.75500

Text #3
ID   : 5
Format   : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info: Advanced Sub Station Alpha
Compression mode : Lossless
Language : English
Default  : No
Forced   : No
DURATION : 01:47:25.75500

Input #0, matroska,webm, from
'LImmortale.2019.BluRay.1080xH264.Ita.AC3.5.1.Sub.Eng.Ita.mkv':
  Metadata:
title   : Encoded By realDMDJ
creation_time   : 2020-03-14 08:39:17
ENCODER : Lavf58.20.100
  Duration: 01:55:25.15, start: 0.00, bitrate: 3249 kb/s
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709), 1920x1080

[SAR 90:67 DAR 160:67], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
Metadata:
  DURATION: 01:55:25.13000
Stream #0:1(ita): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
Metadata:
  title   : Surround
  DURATION: 01:55:25.15200
Stream #0:2(ita): Subtitle: ass (default) (forced)
Metadata:
  DURATION: 01:47:24.38000
Stream #0:3(ita): Subtitle: ass
Metadata:
  DURATION: 01:47:25.75500
Stream #0:4(eng): Subtitle: ass
Metadata:
  DURATION: 01:47:25.75500
___
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] How to hardcode subtitles

2020-03-15 Thread Andy
Can someone please shed some light on how to hardcode subtitles onto a file
that already has a subtitles(not hardcoded)?

Mediainfo provides the following information

ffprobe version 4.1.3-static https://johnvansickle.com/ffmpeg/
Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-gpl --enable-version3 --enable-static
--disable-debug --disable-ffplay --disable-indev=sndio
--disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gmp --enable-gray --enable-libaom
--enable-libfribidi --enable-libass --enable-libvmaf
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
--enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus
--enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  5.100 / 58.  5.100
  libavfilter 7. 40.101 /  7. 40.101
  libswscale  5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc55.  3.100 / 55.  3.100
Input #0, matroska,webm, from
'LImmortale.2019.BluRay.1080xH264.Ita.AC3.5.1.Sub.Eng.Ita.mkv':
  Metadata:
title   : Encoded By realDMDJ
creation_time   : 2020-03-14T08:39:17.00Z
ENCODER : Lavf58.20.100
  Duration: 01:55:25.15, start: 0.00, bitrate: 3249 kb/s
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive),
1920x1080 [SAR 90:67 DAR 160:67], 24 fps, 24 tbr, 1k tbn, 48 tbc
(default)
Metadata:
  DURATION: 01:55:25.13000
Stream #0:1(ita): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
(default)
Metadata:
  title   : Surround
  DURATION: 01:55:25.15200
Stream #0:2(ita): Subtitle: ass (default) (forced)
Metadata:
  DURATION: 01:47:24.38000
Stream #0:3(ita): Subtitle: ass
Metadata:
  DURATION: 01:47:25.75500
Stream #0:4(eng): Subtitle: ass
Metadata:
  DURATION: 01:47:25.75500


Mediainfo provides the following information:
General
Unique ID:
339833835165267786502206373342323544125
(0xFFA99DAD54CAD8304A7E412718A6103D)
Complete name:
LImmortale.2019.BluRay.1080xH264.Ita.AC3.5.1.Sub.Eng.Ita.mkv
Format   : Matroska
Format version   : Version 4
File size: 2.62 GiB
Duration : 1 h 55 min
Overall bit rate : 3 250 kb/s
Movie name   : Encoded By realDMDJ
Encoded date : UTC 2020-03-14 08:39:17
Writing application  : HandBrake 1.2.2 2019022300
Writing library  : Lavf58.20.100
ErrorDetectionType   : Per level 1

Video
ID   : 1
Format   : AVC
Format/Info  : Advanced Video Codec
Format profile   : Main@L4
Format settings  : CABAC / 4 Ref Frames
Format settings, CABAC   : Yes
Format settings, Reference frames: 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1 h 55 min
Bit rate : 2 800 kb/s
Width: 1 920 pixels
Height   : 1 080 pixels
Display aspect ratio : 2.40:1
Frame rate mode  : Constant
Frame rate   : 24.000 FPS
Color space  : YUV
Chroma subsampling   : 4:2:0
Bit depth: 8 bits
Scan type: Progressive
Bits/(Pixel*Frame)   : 0.056
Stream size  : 2.21 GiB (84%)
Writing library  : x264 core 157 r2935 545de2f
Encoding settings: cabac=1 / ref=2 /
deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6 / psy=1 /
psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1
/ 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 /
chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 /
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=240 /
keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 /
rc=abr / mbtree=1 / bitrate=2800 / 

[FFmpeg-user] Add logo to GPU transcoding UDP stream

2020-01-12 Thread Andy
When transcoding with CPU, adding -i /home/1.png -filter_complex
"[0:v][1:v] overlay=55:25" worked fine, but with GPU its throwing an
error msg

This is the command I tried using
ffmpeg -vsync 0 -hwaccel cuvid -c:v h264_cuvid -deint 1
-drop_second_field 1 -i 'udp://0.0.0.0:' -i /home/1.png
-filter_complex "[0:v][1:v] overlay=55:25" -c:v h264_nvenc -g 50 -vb
1300k -preset:v medium -bf 1 -c:a aac -bufsize 16M -aspect 16:9
-dts_delta_threshold 1000 -ac 2 -ar 48k -ab 96k 1.mp4

This results in
Input #0, mpegts, from 'udp://0.0.0.0:':
  Duration: N/A, start: 38678.701722, bitrate: N/A
  Program 108
Metadata:
  service_name: YI NEWS
  service_provider: YI
Stream #0:0[0x33a]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps,
50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x39e](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000
Hz, stereo, fltp, 192 kb/s
Input #1, png_pipe, from '/home/1.png':
  Duration: N/A, bitrate: N/A
Stream #1:0: Video: png, rgba(pc), 50x50 [SAR 3780:3780 DAR 1:1],
25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 (h264_cuvid) -> overlay:main (graph 0)
  Stream #1:0 (png) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (h264_nvenc)
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
Press [q] to stop, [?] for help
[mpegts @ 0x30c0dc0] Thread message queue blocking; consider raising
the thread_queue_size option (current value: 8)
Impossible to convert between the formats supported by the filter
'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #1:0
[aac @ 0x30ec2c0] Qavg: 194.219
[aac @ 0x30ec2c0] 2 frames left in the queue on closing
Conversion failed!

How to solve this? Thank you.
___
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".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-20 Thread Andy
It seems like again I hit the wall. While one mpeg2 source works with
the mpeg2_cuvid option, the other gives me troubles.

ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v mpeg2_cuvid -deint 1
-drop_second_field 1 -i 'http://0.0.0.0:46007' -c:v h264_nvenc -vb
1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k -map 0:0 -map
0:1 -f flv rtmp://0.0.0.0:1940/live/1
ffmpeg version N-95728-g1354c39 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --enable-cuda --enable-cuvid --enable-nvenc
--enable-nonfree --enable-libnpp
--extra-cflags=-I/usr/local/cuda/include
--extra-ldflags=-L/usr/local/cuda/lib64 --enable-libx264
--enable-libfdk-aac --enable-gpl
  libavutil  56. 35.101 / 56. 35.101
  libavcodec 58. 62.100 / 58. 62.100
  libavformat58. 35.100 / 58. 35.100
  libavdevice58.  9.100 / 58.  9.100
  libavfilter 7. 66.100 /  7. 66.100
  libswscale  5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc55.  6.100 / 55.  6.100
[mpegts @ 0x3092a40] Could not find codec parameters for stream 0
(Video: mpeg2video ([27][0][0][0] / 0x001B), none(tv)): unspecified
size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'http://0.0.0.0:46007':
  Duration: N/A, start: 67033.565011, bitrate: 192 kb/s
  Program 107
Metadata:
  service_name: NTV
  service_provider: NTV BD
Stream #0:0[0x327]: Video: mpeg2video ([27][0][0][0] / 0x001B),
none(tv), 90k tbr, 90k tbn, 90k tbc
Stream #0:1[0x2c3]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 192 kb/s
[AVHWFramesContext @ 0x3a36600] [IMGUTILS @ 0x7ffc3bcc6230] Picture
size 0x0 is invalid
[mpeg2_cuvid @ 0x3098a40] Error initializing a CUDA frame pool
cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
[mpeg2_cuvid @ 0x3098a40] ff_get_format failed: -1
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (mpeg2_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
Error while opening decoder for input stream #0:0 : Operation not permitted
___
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".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-18 Thread Andy
This finally fixed it:

-hwaccel cuvid -c:v mpeg2_cuvid

Indeed, you need to specify the input type before transcoding!

Thank you


On Mon, Nov 18, 2019 at 12:35 PM Ted Park  wrote:
>
> I just noticed this but it some examples it seems you are specifying h264 
> decoder for an input that (apparently) is mpeg? I’m not sure which is which, 
> but I think cuvid and nvdec differ in the way they map or copy to graphics 
> memory thought maybe that might be the difference between the logs (hw 
> decoder into gpu you probably need to specify format, especially when its 
> input is http, I don’t know if in ffmpeg the protocol takes mime type into 
> account.) For the compilation issues, check that you have cuda nvenc ffnv… 
> etc where they can be found by configure script, clean before make.
> ___
> 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".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-18 Thread Andy
Unfortunately lowering threads did not help and resulted in the same error.
I noticed that all inputs that im having issues with are mpegts...

On Sun, Nov 17, 2019 at 12:33 AM Dennis Mungai  wrote:

> Hey there,
>
> Lower your decoder threads and retest:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v h264_cuvid -deint 1
> -drop_second_field 1 -i 'http://0.0.0.0:4603' -c:v h264_nvenc -vb
> 1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k test.mp4
>
> Now with the yadif_cuda filter:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel nvdec -hwaccel_output_format cuda -i
> 'http://0.0.0.0:4603' -vf "yadif_cuda" -c:v h264_nvenc -vb 1000k
> -preset:v medium -c:a
> aac -ac 2 -ar 48k -ab 96k test.mp4
>
> For usage see:
>
> ffmpeg -h filter=yadif_cuda
>
> For what to expect, see
>
> https://stackoverflow.com/questions/55687189/how-to-use-gpu-to-accelerate-the-processing-speed-of-ffmpeg-filter/55747785#55747785
>
> Running the nvdec & cuvid decoders with multiple threads is the
> fastest way to land in hot water.
> Infact, the decoder will warn you if threads (either in auto mode or
> manually set) exceed 16. These hwaccels do not implement threading.
>
> You can confirm that by running:
>
> ffmpeg -h decoder=h264_cuvid
>
> And see that threading is not a reported capability.
>
> I also changed your commands to -vsync 1 as the MP4 muxer
> implelentation in libav supports CFR only, and NALU HRD stuffing isn't
> supported.
> Even if you're using libx264, do not use
>
> -x264-params "nal-hrd=cbr"
>
> When generating (f)mp4 content as you'll generate invalid output, with
> audio predominantly out of sync.
> If you truly require VFR output as part of your workflow, then stick
> to either mpegts (also supported in chunks via HLS or segment muxer)
> OR matroska (mkv).
>
> Cheers,
>
> Dennis M.
>
> On Sat, 16 Nov 2019 at 20:37, Ted Park  wrote:
> >
> > How is the stream being served over http? Does it make any difference if
> you save a file wget for example first?
> > ___
> > 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".
___
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".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-18 Thread Andy
On Mon, Nov 18, 2019 at 12:35 PM Ted Park  wrote:
>
> I just noticed this but it some examples it seems you are specifying h264
decoder for an input that (apparently) is mpeg? I’m not sure which is
which, but I think cuvid and nvdec differ in the way they map or copy to
graphics memory thought maybe that might be the difference between the logs
(hw decoder into gpu you probably need to specify format, especially when
its input is http, I don’t know if in ffmpeg the protocol takes mime type
into account.) For the compilation issues, check that you have cuda nvenc
ffnv… etc where they can be found by configure script, clean before make.
> ___
> 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".

You are right, and all the inputs that are giving me troubles are indeed SD
MPEG2 video mpegts format. I tried searching on how to specify input for
hwaccel but can't find anything for mpegts
___
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".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-16 Thread Andy
On Sun, Nov 17, 2019 at 12:33 AM Dennis Mungai  wrote:
>
> Hey there,
>
> Lower your decoder threads and retest:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel cuvid -c:v h264_cuvid -deint 1
> -drop_second_field 1 -i 'http://0.0.0.0:4603' -c:v h264_nvenc -vb
> 1000k -preset:v medium -c:a aac -ac 2 -ar 48k -ab 96k test.mp4
>
> Now with the yadif_cuda filter:
>
> ffmpeg -threads 1 -vsync 1 -hwaccel nvdec -hwaccel_output_format cuda -i
> 'http://0.0.0.0:4603' -vf "yadif_cuda" -c:v h264_nvenc -vb 1000k
> -preset:v medium -c:a
> aac -ac 2 -ar 48k -ab 96k test.mp4
>
> For usage see:
>
> ffmpeg -h filter=yadif_cuda
>
> For what to expect, see
> https://stackoverflow.com/questions/55687189/how-to-use-gpu-to-accelerate-the-processing-speed-of-ffmpeg-filter/55747785#55747785
>
> Running the nvdec & cuvid decoders with multiple threads is the
> fastest way to land in hot water.
> Infact, the decoder will warn you if threads (either in auto mode or
> manually set) exceed 16. These hwaccels do not implement threading.
>
> You can confirm that by running:
>
> ffmpeg -h decoder=h264_cuvid
>
> And see that threading is not a reported capability.
>
> I also changed your commands to -vsync 1 as the MP4 muxer
> implelentation in libav supports CFR only, and NALU HRD stuffing isn't
> supported.
> Even if you're using libx264, do not use
>
> -x264-params "nal-hrd=cbr"
>
> When generating (f)mp4 content as you'll generate invalid output, with
> audio predominantly out of sync.
> If you truly require VFR output as part of your workflow, then stick
> to either mpegts (also supported in chunks via HLS or segment muxer)
> OR matroska (mkv).
>
> Cheers,
>
> Dennis M.
>
> On Sat, 16 Nov 2019 at 20:37, Ted Park  wrote:
> >
> > How is the stream being served over http? Does it make any difference if 
> > you save a file wget for example first?
> > ___
> > 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".

Unfortunately, the first command results in the same error(i tried mkv
and flv) and second command gives me a No such filter: 'yadif_cuda'
error/ I am trying to figure out how to recompile ffmpeg with this
filter but to no avail.
___
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".

Re: [FFmpeg-user] ffmpeg cuvid not transcoding properly

2019-11-14 Thread Andy
No luck with -vf yadif_cuda=0:-1:0
___
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] broadcast multicast stream problems

2019-02-27 Thread Andy Smith
Hi list, 

  I have a requirement to effectively relay a stream to a multicast IP.
The source is an HTTP address streaming 1x video (H264) and 1x audio
(A53 stereo). The idea would be to relay this unmodified to a multicast
IP. I've tried the following: 

ffmpeg -re -y -i http://10.10.10.10/stream -c copy -f mpegts
"udp://239.192.1.185:5000" 

When I try and connect to the mulitcast stream with VLC player I get an
error about "SDP required: 

A description in SDP format is required to receive the RTP stream". 

If I use rtsp instead of mpegts/udp it bombs out with the error "Could
not write header for output file #0 (incorrect codec parameters ?):
Network is unreachable".

But I'm unsure if its possible to add an SDP description, or even if its
possible to relay this video stream at all via ffmpeg. 

Off topic, I have been able to do this with vlc command line, but its
unreliable, stops and starts, and just plain doesn't work when I try and
run multiple streams. 

I don't have any experience really with multicast and particularly
ffmpeg so I may be getting this all wrong, any suggestions gratefully
recieved, 

thanks, Andy.
___
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".

Re: [FFmpeg-user] AMD screen record + h/w vaapi encode to mkv fails.

2018-03-07 Thread Andy Furniss

Andy Furniss wrote:

Andy Furniss wrote:

Haven't had time to bisect, but I can't screengrab to mkv any more.
kmsgrab + playing with vsync etc. give the same error as this example, 
mp4 works OK.


Bisected to -

commit ae7df68edd79bce5c318810c6b307ee4e81cd2a6
Author: James Almer <jamr...@gmail.com>
Date:   Fri Nov 24 19:42:50 2017 -0300

 avformat/avc: return an error in ff_isom_write_avcc if the buffer 
lenght is too small


 Signed-off-by: James Almer <jamr...@gmail.com>


I thought this was just screen rec initially, but it can be reproduced
with a transcode as well. Replacing mkv with mp4 in the examples will 
work OK.


Adding Mark to cc.

ffm -vaapi_device /dev/dri/renderD128 -i ~/abc-60fps.mp4 -an -sn -vf 
'format=nv12,hwupload' -c:v h264_vaapi -profile:v 578 -bf 0 -y ~/out.mkv
ffmpeg version N-90242-g5ab0ecf283 Copyright (c) 2000-2018 the FFmpeg 
developers

  built with gcc 7.3.0 (GCC)
  configuration: --prefix=/usr --disable-doc --enable-gpl 
--enable-libvpx --enable-libx265 --enable-libx264 --enable-gnutls 
--enable-libdrm --enable-libfreetype --enable-libmp3lame

  libavutil  56.  8.100 / 56.  8.100
  libavcodec 58. 13.102 / 58. 13.102
  libavformat58. 10.100 / 58. 10.100
  libavdevice58.  2.100 / 58.  2.100
  libavfilter 7. 12.100 /  7. 12.100
  libswscale  5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
  libpostproc55.  0.100 / 55.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/andy/abc-60fps.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.0.100
  Duration: 00:01:36.00, start: 0.00, bitrate: 624 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
1920x1080, 619 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)

Metadata:
  handler_name: VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
Press [q] to stop, [?] for help
[h264_vaapi @ 0x4062880] Warning: some packed headers are not supported 
(want 0xd, got 0).
Could not write header for output file #0 (incorrect codec parameters 
?): Invalid data found when processing input

Error initializing output stream 0:0 --
Conversion failed!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] AMD screen record + h/w vaapi encode to mkv fails.

2018-02-24 Thread Andy Furniss

Andy Furniss wrote:

Haven't had time to bisect, but I can't screengrab to mkv any more.
kmsgrab + playing with vsync etc. give the same error as this example, 
mp4 works OK.


Bisected to -

commit ae7df68edd79bce5c318810c6b307ee4e81cd2a6
Author: James Almer <jamr...@gmail.com>
Date:   Fri Nov 24 19:42:50 2017 -0300

avformat/avc: return an error in ff_isom_write_avcc if the buffer 
lenght is too small


Signed-off-by: James Almer <jamr...@gmail.com>

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

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

[FFmpeg-user] AMD screen record + h/w vaapi encode to mkv fails.

2018-02-23 Thread Andy Furniss

Haven't had time to bisect, but I can't screengrab to mkv any more.
kmsgrab + playing with vsync etc. give the same error as this example, 
mp4 works OK.


 ffm -loglevel debug -vaapi_device /dev/dri/renderD128 -f x11grab 
-video_size 1920x1080 -i :0 -vf 'format=nv12,hwupload' -c:v h264_vaapi 
-profile:v 578 -bf 0 -y out.mkv
ffmpeg version N-90148-g0419623cdc Copyright (c) 2000-2018 the FFmpeg 
developers

  built with gcc 7.3.0 (GCC)
  configuration: --prefix=/usr --disable-doc --enable-gpl 
--enable-libvpx --enable-libx265 --enable-libx264 --enable-gnutls 
--enable-libdrm --enable-libfreetype --enable-libmp3lame

  libavutil  56.  7.101 / 56.  7.101
  libavcodec 58. 12.102 / 58. 12.102
  libavformat58.  9.100 / 58.  9.100
  libavdevice58.  2.100 / 58.  2.100
  libavfilter 7. 12.100 /  7. 12.100
  libswscale  5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc55.  0.100 / 55.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging 
level) with argument 'debug'.
Reading option '-vaapi_device' ... matched as option 'vaapi_device' (set 
VAAPI hardware device (DRM path or X11 display name)) with argument 
'/dev/dri/renderD128'.
Reading option '-f' ... matched as option 'f' (force format) with 
argument 'x11grab'.
Reading option '-video_size' ... matched as AVOption 'video_size' with 
argument '1920x1080'.

Reading option '-i' ... matched as input url with argument ':0'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with 
argument 'format=nv12,hwupload'.
Reading option '-c:v' ... matched as option 'c' (codec name) with 
argument 'h264_vaapi'.
Reading option '-profile:v' ... matched as option 'profile' (set 
profile) with argument '578'.

Reading option '-bf' ... matched as AVOption 'bf' with argument '0'.
Reading option '-y' ... matched as option 'y' (overwrite output files) 
with argument '1'.

Reading option 'out.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 
display name)) with argument /dev/dri/renderD128.
[AVHWDeviceContext @ 0x2152640] Opened VA display via DRM device 
/dev/dri/renderD128.

[AVHWDeviceContext @ 0x2152640] libva: VA-API version 1.1.0
[AVHWDeviceContext @ 0x2152640] libva: va_getDriverName() returns 0
[AVHWDeviceContext @ 0x2152640] libva: User requested driver 'radeonsi'
[AVHWDeviceContext @ 0x2152640] libva: Trying to open 
/usr/lib/dri/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x2152640] libva: Found init function 
__vaDriverInit_1_1

[AVHWDeviceContext @ 0x2152640] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x2152640] Initialised VAAPI connection: version 1.1
[AVHWDeviceContext @ 0x2152640] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x2152640] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x2152640] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x2152640] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x2152640] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x2152640] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x2152640] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x2152640] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x2152640] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x2152640] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x2152640] Unknown driver "Mesa Gallium driver 
18.1.0-devel for AMD Radeon R9 200 Series (TONGA / DRM 3.25.0 / 
4.16.0-rc1-g2693c7e7ca44, LLVM 7.0.0)", assuming standard behaviour.

Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url :0.
Applying option f (force format) with argument x11grab.
Successfully parsed a group of options.
Opening an input file: :0.
[x11grab @ 0x223ca00] Probe buffer size limit of 500 bytes reached
[x11grab @ 0x223ca00] Stream #0: not enough frames to estimate rate; 
consider increasing probesize

Input #0, x11grab, from ':0':
  Duration: N/A, start: 1519432751.575405, bitrate: N/A
Stream #0:0, 1, 1/100: Video: rawvideo, 1 reference frame 
(BGR[0] / 0x524742), bgr0, 1920x1080, 0/1, 29.97 fps, 1000k tbr, 1000k 
tbn, 1000k tbc

Successfully opened the file.
Parsing a group of options: output url out.mkv.
Applying option vf (set video filters) with argument format=nv12,hwupload.
Applying option c:v (codec name) with argument h264_vaapi.
Applying option profile:v (set profile) with argument 578.
Successfully parsed a group of options.
Opening an output file: out.mkv.
[file @ 0x224ab40] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_vaapi))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per 
stream)

[rawvideo @ 0x22467c0] 

Re: [FFmpeg-user] 4K 60Hz Directshow Video Capture

2018-02-12 Thread Andy Furniss

Carl Eugen Hoyos wrote:


Is there really a hardware encoder that supports lossless encoding?


https://developer.nvidia.com/nvidia-video-codec-sdk#NVENCFeatures

Doesn't mention rgb though.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] 4K 60Hz Directshow Video Capture

2018-02-12 Thread Andy Furniss

Alex P wrote:

Hi James,

ffmpeg -f dshow -video_size 3840x2160 -framerate 6/1001 -rtbufsize 21 
-pixel_format bgr24 -i video="MZ0380 PCI, Analog 01 Capture" -c:v h264_nvenc 
-preset lossless -f null -
Gives me the same error


Maybe it doesn't do rgb24 lossless - you should paste full output of 
ffmpeg and not top post on this list.



ffmpeg -f dshow -video_size 3840x2160 -framerate 6/1001 -rtbufsize 21 
-pixel_format bgr24 -i video="MZ0380 PCI, Analog 01 Capture" -c:v rawvideo -f 
null -
Gets me nearly x1 performance when executing from a ram disk but

ffmpeg -f dshow -video_size 3840x2160 -framerate 6/1001 -rtbufsize 21 
-pixel_format bgr24 -i video="MZ0380 PCI, Analog 01 Capture" -c:v rawvideo 
raw.nut
Only gets me x0.5 and the buffer overflows.


The device that raw.nut is written to would need to take 1.5 
gigabytes/sec to get full speed.


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

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

Re: [FFmpeg-user] Compressed audio streams (DTS, Dolby) decoding

2018-01-20 Thread Andy Furniss

Frédéric wrote:

Are there different ways to decode a Dolby stream? Is it possible 
that ffmpeg chose a different approach than amplifiers (audio chips)

do?


Yes, but it's probably not the cause of rear too loud.
If it's ac3 then the parameter -drc_scale will change whether dynamic
range control metadata is used. Default for ffmpeg = 1 = fully applied IIRC.


Are there some parameters Kodi can give to ffmpeg so the decoding
changes?


As above, Kodi  may set different, though I wouldn't really expect it to
cause channel level difference between front and rear.

Have you tried a channel id type check to make sure nothing is getting
mixed up?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Extracting frames from 59.94 FPS video - only every other frame is different

2017-12-01 Thread Andy Furniss

Andy Furniss wrote:

Will Price wrote:

Hello,

I'm having a strange problem when extracting frames from a video 
recorded from a GoPro HERO 5 Black camera (1080p, 60FPS, Linear FOV). 
When I view the extracted frames it appears that every two frames is a 
duplicate of one another, i.e. frames 1 and 2 look the same, frame 3 
shows a change, but frame 4 again looks the same as 3.


Only sometimes - there are also runs of different frames.

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c3a7e709c0] Using non-standard frame 
rate 59/1


Maybe something to do with this.


Though playing the vid that may just be a distraction.

Looks like the early part is duped but the later part mostly isn't.

Maybe it's intended by the camera eg. the early part is lower motion or 
lower light level.


Either could be a factor - you could experiment taking other scenes 
varying motion or light levels and see if there is a pattern.

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

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

Re: [FFmpeg-user] Extracting frames from 59.94 FPS video - only every other frame is different

2017-12-01 Thread Andy Furniss

Will Price wrote:

Hello,

I'm having a strange problem when extracting frames from a video recorded from 
a GoPro HERO 5 Black camera (1080p, 60FPS, Linear FOV). When I view the 
extracted frames it appears that every two frames is a duplicate of one 
another, i.e. frames 1 and 2 look the same, frame 3 shows a change, but frame 4 
again looks the same as 3.


Only sometimes - there are also runs of different frames.


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c3a7e709c0] Using non-standard frame rate 59/1


Maybe something to do with this.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] weston support for ffmpeg

2017-11-10 Thread Andy Furniss

TONU ZALPURE wrote:

HI All,

I have setup [Raspberry Pi3 + Automotive Grade Linux]
It has weston UI instead of X11.

How to enable weston GUI support in ffmpeg insted of X11 GUI?
I tried --enable-weston but it doesn’t seem to be working.

I am trying to play video using ffplay.
but get error
Could not initialise SDL-NO available video device
(Did you set the DISPLAY variable)


Testing on a PC with unknown versions of wayland, weston and sdl2.

SDL_VIDEODRIVER=wayland ffplay 

works, but scaling doesn't.

Maybe try mpv as a alternative (though I know nothing about RPi).

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

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

Re: [FFmpeg-user] LATM demuxer

2017-11-01 Thread Andy Furniss

Carl Eugen Hoyos wrote:

2017-10-31 15:54 GMT+01:00 Andy Furniss <adf.li...@gmail.com>:

Sometime this year I thought I saw mention of ffmpeg and a
LATM standalone demuxer.


I committed it six years ago.
(The technical name of the file format is "loas", "latm" is one
of the things you can put into loas.)

Your question was possibly: "Why does fdk not decode latm?"
The answer is related to a decision FFmpeg developers made
long ago (they knew it wasn't a very good idea), not
implementing a bitstream filter that converts latm to aac and
allowing to decode the result with any aac decoder but
instead implementing an assigned latm decoder that cannot
be replaced so easily.


OK, thanks for the info.
FWIW I eventually found the "mention of ffmpeg and LATM" that I referred to.
It was in a devel mail suggesting some possible gsoc 2017 qualification
tasks, one of which was a -bsf for LATM.
I guess it wasn't actually used/taken.


Carl Eugen

PS: Concerning "clean-up": Instead of fixing issues like the
above, known for nearly a decade, for example configure
was changed so that on some systems, building takes
(literally!) hours instead of minutes now.


Oh, nasty, it always did/does seem a bit long, but then not seeing
stuff scrolling past may make the wait seem longer.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] LATM demuxer

2017-10-31 Thread Andy Furniss

Andy Furniss wrote:
Sometime this year I thought I saw mention of ffmpeg and a LATM 
standalone demuxer. I may mis-recall/ may have misread, does anyone

know anything about this?

The reason I would need it is that currently feeding latm to decode
with fdk seems impossible.

Re-coding seems to lose the normal drc and the dvb (drc and mixdown) 
meta that fdk seems to have options to handle.


In the absence of being able to do -c:a copy = the AAC re-coding
case. Is there is a way not to loose meta data?

TIA


Hmm, it's years since I looked at this last and then IIRC it was stated
that fdk lib didn't do latm.
Looking at latest git there are files named like it possibly does now.

Whatever, it doesn't work, so here's some output working without then
failing with libfdk_aac.

ffmpeg -i ~/bp-part-c1.ts -f null -
ffmpeg version N-88204-g7f9de7b Copyright (c) 2000-2017 the FFmpeg 
developers

  built with gcc 5.3.0 (GCC)
  configuration: --prefix=/usr --disable-doc --enable-gpl 
--enable-nonfree --enable-libvpx --enable-libx265 --enable-libx264 
--enable-gnutls --enable-libdrm --enable-libfreetype --enable-libfdk-aac

  libavutil  56.  0.100 / 56.  0.100
  libavcodec 58.  0.101 / 58.  0.101
  libavformat58.  0.101 / 58.  0.101
  libavdevice58.  0.100 / 58.  0.100
  libavfilter 7.  0.100 /  7.  0.100
  libswscale  5.  0.100 /  5.  0.100
  libswresample   3.  0.100 /  3.  0.100
  libpostproc55.  0.100 / 55.  0.100
[h264 @ 0x389cc80] mmco: unref short failure
Last message repeated 1 times
[mpegts @ 0x38983a0] PES packet size mismatch
Input #0, mpegts, from '/home/andy/bp-part-c1.ts':
  Duration: 00:24:18.20, start: 68053.963267, bitrate: 6403 kb/s
  Program 17540
Metadata:
  service_name: BBC ONE HD
  service_provider:
Stream #0:0[0x19c9]: Video: h264 (High) ([27][0][0][0] / 0x001B), 
yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 
25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x19ca](eng): Audio: aac_latm (LC) ([17][0][0][0] / 
0x0011), 48000 Hz, 5.1, fltp
Stream #0:2[0x19ce](eng): Audio: aac_latm (HE-AACv2) ([17][0][0][0] 
/ 0x0011), 48000 Hz, stereo, fltp
Stream #0:3[0x19cd](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 
0x0006)

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (aac_latm (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[h264 @ 0x38cd2c0] mmco: unref short failure
[h264 @ 0x391f660] mmco: unref short failure
Output #0, null, to 'pipe:':
  Metadata:
encoder : Lavf58.0.101
Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1080 [SAR 1:1 
DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc

Metadata:
  encoder : Lavc58.0.101 wrapped_avframe
Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, 5.1, s16, 4608 kb/s
Metadata:
  encoder : Lavc58.0.101 pcm_s16le
frame=  936 fps=267 q=-0.0 Lsize=N/A time=00:00:38.84 bitrate=N/A 
speed=11.1x
video:483kB audio:21492kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: unknown




ffmpeg -c:a libfdk_aac -i ~/bp-part-c1.ts -f null -
ffmpeg version N-88204-g7f9de7b Copyright (c) 2000-2017 the FFmpeg 
developers

  built with gcc 5.3.0 (GCC)
  configuration: --prefix=/usr --disable-doc --enable-gpl 
--enable-nonfree --enable-libvpx --enable-libx265 --enable-libx264 
--enable-gnutls --enable-libdrm --enable-libfreetype --enable-libfdk-aac

  libavutil  56.  0.100 / 56.  0.100
  libavcodec 58.  0.101 / 58.  0.101
  libavformat58.  0.101 / 58.  0.101
  libavdevice58.  0.100 / 58.  0.100
  libavfilter 7.  0.100 /  7.  0.100
  libswscale  5.  0.100 /  5.  0.100
  libswresample   3.  0.100 /  3.  0.100
  libpostproc55.  0.100 / 55.  0.100
[h264 @ 0x2d73c80] mmco: unref short failure
Last message repeated 1 times
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4007
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4006
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 400a
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4006
Last message repeated 1 times
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002
Last message repeated 1 times
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001
[libfdk_aac @ 0x2d74d80] Multiple frames in a packet.
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4007
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4007
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 1001
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() failed: 4002
[libfdk_aac @ 0x2d74d80] aacDecoder_DecodeFrame() 

[FFmpeg-user] LATM demuxer

2017-10-31 Thread Andy Furniss

Sometime this year I thought I saw mention of ffmpeg and a LATM
standalone demuxer.
I may mis-recall/ may have misread, does anyone know anything about this?

The reason I would need it is that currently feeding latm to decode with
fdk seems impossible.

Re-coding seems to lose the normal drc and the dvb (drc and mixdown)
meta that fdk seems to have options to handle.

In the absence of being able to do -c:a copy = the AAC re-coding case.
Is there is a way not to loose meta data?

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

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

Re: [FFmpeg-user] How can I recode the movie in a way that I can step forward frame by frame?

2017-10-22 Thread Andy Furniss

Andy Furniss wrote:

Andy Furniss wrote:

LaHu wrote:
I assume the movie is encoded using IPB frames. Thus I can't step 
from any frame to the previous/next frame but from I-frames to 
I-frames only.


This is not true, mpv can step OK with IPB, it can also field step if 
you are de-interlacing.


Hmm, testing mpv more that I did initially - it doesn't always work 
going backwards on h264, it will do it - but not reliably.


It seems my fail case was due to being m2ts, ts is the same.

If I just remux the ts to mkv then I can step backwards OK with mpv.

ffmpeg -i in.ts -c copy out.mkv

No re-encoding needed, so this will be fast and lossless.

Depending on what audio/subs you need the above may need adapting.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] How can I recode the movie in a way that I can step forward frame by frame?

2017-10-22 Thread Andy Furniss

Andy Furniss wrote:

LaHu wrote:
I assume the movie is encoded using IPB frames. Thus I can't step from 
any frame to the previous/next frame but from I-frames to I-frames only.


This is not true, mpv can step OK with IPB, it can also field step if 
you are de-interlacing.


Hmm, testing mpv more that I did initially - it doesn't always work 
going backwards on h264, it will do it - but not reliably.


It always works going forwards.


So I'd like to convert the movie to an I-frame only format.


For the same quality, I frame only will be a lot bigger.


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

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

Re: [FFmpeg-user] How can I recode the movie in a way that I can step forward frame by frame?

2017-10-22 Thread Andy Furniss

LaHu wrote:
I assume the movie is encoded using IPB frames. Thus I can't step from 
any frame to the previous/next frame but from I-frames to I-frames only.


This is not true, mpv can step OK with IPB, it can also field step if 
you are de-interlacing.



So I'd like to convert the movie to an I-frame only format.


For the same quality, I frame only will be a lot bigger.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] How can I recode the movie in a way that I can step forward frame by frame?

2017-10-22 Thread Andy Furniss

Carl Eugen Hoyos wrote:

2017-10-21 17:44 GMT+02:00 LaHu :

I like to watch movies in details. In order to check a movie for logical
errors I watch some scenes in slow motion or even stepping throug them
forward and backwards. I can't step really +-1 Frame, sometimes it moves
several seconds ahead.


Which player can step back one frame?


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

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

Re: [FFmpeg-user] h264 support in webm containers?

2017-08-21 Thread Andy Baird
Hey Carl,

Here's a sample: https://www.dropbox.com/s/sf9agwlxxij5g93/replay-
1503297479867.webm?dl=0

And here's the ffmpeg output of a copy operation:

$ ./bin/ffmpeg.exe -i replay-1503297479867.webm -c copy test.webm
ffmpeg version N-86848-g03a9e6f Copyright (c) 2000-2017 the FFmpeg
developers
  built with gcc 7.1.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda
--enable-cuvid --e
 nable-d3d11va --enable-dxva2
--enable-libmfx --enable-nvenc --enable-avisynth --

 enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enable-iconv
  --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-li
   bfreetype
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -

 -enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enabl
 e-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li

 bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolam
 e --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx

  --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable
   -libxavs --enable-libxvid --enable-libzimg
--enable-lzma --enable-zlib
  libavutil  55. 68.100 / 55. 68.100
  libavcodec 57.102.100 / 57.102.100
  libavformat57. 76.100 / 57. 76.100
  libavdevice57.  7.100 / 57.  7.100
  libavfilter 6. 95.100 /  6. 95.100
  libswscale  4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc54.  6.100 / 54.  6.100
Input #0, matroska,webm, from 'replay-1503297479867.webm':
  Metadata:
encoder : Chrome
  Duration: N/A, start: 0.00, bitrate: N/A
Stream #0:0(eng): Video: h264 (Constrained Baseline),
yuv420p(progressive),
854x480, SAR 1:1 DAR 427:240, 30.30
fps, 29.50 tbr, 1k tbn, 60 tbc (default)
Output #0, webm, to 'test.webm':
  Metadata:
encoder : Lavf57.76.100
Stream #0:0(eng): Video: h264 (Constrained Baseline),
yuv420p(progressive),
854x480 [SAR 1:1 DAR 427:240],
q=2-31, 30.30 fps, 29.50 tbr, 1k tbn, 1k tbc (def
   ault)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[webm @ 025d4de0] Only VP8 or VP9 video and Vorbis or Opus audio
and Web
 VTT subtitles are supported for WebM.
av_interleaved_write_frame(): Invalid argument
Error writing trailer of test.webm: Invalid argument
frame=1 fps=0.0 q=-1.0 Lsize=   0kB time=00:00:00.00
bitrate=2864.0kbits
 /s speed=N/A
video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing ov
   erhead: unknown
Conversion failed!


On Fri, Aug 18, 2017 at 4:17 AM, Carl Eugen Hoyos <ceffm...@gmail.com>
wrote:

> 2017-08-17 21:24 GMT+02:00 Andy Baird <andyba...@gmail.com>:
>
> > Are there any plans for ffmpeg to support h264 for webm?
>
> Please provide a sample.
>
> Carl Eugen
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://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
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

[FFmpeg-user] h264 support in webm containers?

2017-08-17 Thread Andy Baird
Chrome supports H264 codec webm when recording.
https://bugs.chromium.org/p/chromium/issues/detail?id=601636

In recent versions of Chromium it appears to be the default encoder if none
is provided, so we're likely to see a lot more webm's floating around out
there with H264 encoding despite being against the "webm container
guidelines": https://www.webmproject.org/docs/container/


Are there any plans for ffmpeg to support h264 for webm?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] 2 pass CBR or VBR not really fixing the bitrate?

2017-07-31 Thread Andy Furniss

Manuel Tiglio wrote:


ffmpeg -i input.mp4 -c:v libx264 -x264-params "nal-hrd=cbr" -b:v 1M -minrate 1M 
-maxrate 1M -bufsize 2M output.ts

But I will give it a shot.


Also see x264 --fullhelp WRT nal-hrd=cbr, it may not be what you need, 
no mp4 and possible "filling".


 x264 --fullhelp | grep nal-hrd -A 3
  --nal-hrd   Signal HRD information (requires vbv-bufsize)
  - none, vbr, cbr (cbr not allowed in 
.mp4)
  --fillerForce hard-CBR and generate filler 
(implied by

  --nal-hrd cbr)

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

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

Re: [FFmpeg-user] 2 pass CBR or VBR not really fixing the bitrate?

2017-07-31 Thread Andy Furniss

Manuel Tiglio wrote:



On Jul 31, 2017, at 11:29 AM, Nicolas George 
wrote:

Le tridi 13 thermidor, an CCXXV, Manuel Tiglio a écrit :

1.23. For VOD content the peak bit rate SHOULD be no more than
200% of the average bit rate.


Without a proper definition of "peak bit rate", this sentence is 
meaningless.


Are you saying that Apple’s authoring requirements for HLS are
meaningless?


A bit rate is a quantity of information divided by a time. Since it
is discrete, there is no way of doing calculus, and therefore there
is no notion of instantaneous bit rate. Thus, without saying the 
period of time on which the bit rate is computed, it does not mean 
anything.


When doing streaming you typically send packets of 6-10 secs, so in
that interval the peak (i.e. maximum value) bitrate does not have to
exceed 10% (110% constrained VBR) or 100% (200% constrained VBR) of
the average bitrate in that interval.

But the exact value of that length of time is irrelevant.

The fact that it is a discrete series is also irrelevant, you can
compute discrete bitrates in the same way that you compute finite
differences (for example).

This is really really standard for anyone working on streaming. What
is not standard is that ffmpeg has such large fluctuations between
the peak and average bitrate


You are encoding with libx264 not ffmpeg, it's just passing params.

What are you using to measure these "large fluctuations" and over what
timescale?

I see in the guide you linked that chunks are required to start with an
I frame - these for the same quality are usually far bigger than b or p
frames, so if you measure over small time there is bound to be a high
variation.

FWIW the player buffer size constraint AIUI is meant to absorb these
sort of things when fed at a constant/limited rate = it's not a
parameter that means the bitstream will at a small scale be constant
rate, it means the player using that buffer size at a certain "feed"
rate will not under/overflow when it meets short term fluctuations. If
you set it too small in some effort to make the encoder avoid these you
will likely end up with I frame pulsing.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] ffmpeg: chroma pixels are wrong when using cuvid to decode h264 stream to yuv file

2017-07-17 Thread Andy Furniss

ekin yang wrote:

Dear expert,


Currently I am trying to use ffmpeg and Nvidia GPU card to decoding
h264 stream to yuv file.  There are no errors during the decoding
process. But I find the yuv file I got is not exactly correct. It
seems the luma pixels are correct but chroma pixels are wrong.

GPU: Nvidia telsa m40

driver: 375.26

cuda toolkit:8.0

ffmpeg version: 3.3.2

Decoding command line : ./ffmpeg -c:v h264_cuvid -i inputfile.264
output.yuv


[cid:c4bbc81f-3431-4c37-ba55-4d90cc266239]



Can anybody help out this problem? I am so much appreciated.


You should really post full console output from the command.

yuv is ambiguous = there are many different layouts and you need to know
which one to display/convert it correctly. ffmpeg output should say
what it is.

If you want a certain format eg. yuv420p then ffmpeg can convert for
you, use -pix_fmt yuv420p with your command.

I guess that cuvid is producing nv12 so you could just try telling
what you use to process/convert the yuv that's what it is.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Recoding H.264/4.2.2 to H.264/4.2.0

2017-06-07 Thread Andy Furniss

Mike Brown wrote:

On Wed, Jun 07, 2017 at 03:00:12PM +0100, Andy Furniss wrote:

Mike Brown wrote:

On Wed, Jun 07, 2017 at 12:03:33PM +0200, Moritz Barsnick wrote:

On Tue, Jun 06, 2017 at 21:54:41 -0500, Mike Brown wrote:

If given an H.264/4.2.2 elementary stream, can ffmpeg recode
it to H.264/4.2.0.  If so, what would the command line be?


$ ffmpeg -i myelementarystream_422.h264 -c:v libx264 [ other
x264/encoding options ] -pix_fmt yuv420p outfile.h264


Thanks, I appreciate the response.


OK as long as it's progressive, interlaced would need different,
maybe (untested/from memory)

-vf scale=interl=1,format=yuv240p

plus specific interlace encode options to libx264.


It is interlaced and I need to keep it that way (2:3 pulldown
video).


I don't have any experience with pulldown.


Is there a list of all the libx264 options online?


As you don't need a container then I think all you will need is to use
something like -

 -x264-params tff=1 ...

if the source is top field first or bff=1 otherwise.

That should make libx264 use mbaff - which you should seen in the output.

There's probably a way to do it without using x264 options, I am just
pasting from old notes.

Historically, IME ffmpeg has trouble with generating and or determining
framerate with raw h264 streams - I don't know if that will be an issue
for you or not.

options after -x264-params are listed by x264 --fullhelp, but you need
to change the format eg, --tff becomes tff=1.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Recoding H.264/4.2.2 to H.264/4.2.0

2017-06-07 Thread Andy Furniss

Mike Brown wrote:

On Wed, Jun 07, 2017 at 12:03:33PM +0200, Moritz Barsnick wrote:

On Tue, Jun 06, 2017 at 21:54:41 -0500, Mike Brown wrote:

If given an H.264/4.2.2 elementary stream, can ffmpeg recode it to
H.264/4.2.0.  If so, what would the command line be?


$ ffmpeg -i myelementarystream_422.h264 -c:v libx264 [ other x264/encoding 
options ] -pix_fmt yuv420p outfile.h264


Thanks, I appreciate the response.


OK as long as it's progressive, interlaced would need different, maybe 
(untested/from memory)


-vf scale=interl=1,format=yuv240p

plus specific interlace encode options to libx264.




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

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

Re: [FFmpeg-user] memory leak with vaapi decode since ffmpeg_vaapi: Convert to use hw_frames_ctx only

2017-05-28 Thread Andy Furniss

Mark Thompson wrote:



Hmph, looks like the parameter buffer confusion strikes again.


The original VAAPI specification contained the following functions:

""" /** * After this call, the buffer is deleted and this buffer_id
is no longer valid * Only call this if the buffer is not going to be
passed to vaRenderBuffer */ VAStatus vaDestroyBuffer ( ... /** * Send
decode buffers to the server. * Buffers are automatically destroyed
afterwards */ VAStatus vaRenderPicture ( """

The newer lavc implementation follows this, and does not call
vaDestroyBuffer() on buffers passed to vaRenderPicture().  Not doing
this would cause random crashes in multithreaded programs, because
another buffer with the same ID could be created between the two
calls.

However, the Intel implementation never actually followed the
specification - it leaked the buffers passed to vaRenderPicture().
So, a special driver quirk was added to detect that driver and
additionally destroy the buffers in that case:
.
This restored same behaviour as old lavc with the Intel driver
without breaking other implementations.

That worked for a bit.

Unfortunately, Intel got tired of people complaining that their
driver was broken.  Rather than fixing it, they decided to change the
specification:

(this is an ABI and API break, and the SONAME was not changed).

Thus we have the state now:

VAAPI < 0.40: A)  Destroy buffers: wrong, will crash in multithreaded
programs. B)  Don't destroy buffers: correct, driver quirk restores
behaviour for Intel.

VAAPI >= 0.40: A)  Destroy buffers: correct, but may crash old
drivers which haven't been updated (not detectable, because the
library allows loading old drivers without telling the user). B)
Don't destroy buffers: wrong, driver quirk restores correct behaviour
for Intel, others may leak memory.

lavc currently chooses (B) in both cases on the grounds that leaking
memory is preferable to crashing randomly.  There is some thought of
switching to (A) for VAAPI >= 0.40, but given that we can't detect
the version at runtime and the libraries consider everything to be
compatible this seems dangerous.


For Mesa, I feel like I remember it having a correct < 0.40
implementation, but looking again it doesn't seem to and there isn't
any obvious change (maybe I am just wrong).  Do you know if this
changed?  Adding the driver quirk like the Intel driver is probably
the right thing to do if it has always been like that, if it hasn't
then we need more magic to be able to distinguish versions to prevent
older ones from crashing.


Thanks for the explanation.

I haven't seen anything change in mesa and st/va search on cgit doesn't
come up with anything obvious.

In your github link there is a link to a bug that states gstreamer
always released, and testing it doesn't leak.

Since AMD devs develop with that, they wouldn't have seen this, or, I
guess, needed to implement in driver.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] memory leak with vaapi decode since ffmpeg_vaapi: Convert to use hw_frames_ctx only

2017-05-28 Thread Andy Furniss

Andy Furniss wrote:

First reported on mpv github issues.

Since below ffmpeg -hwaccel vaapi -i sommething-h264 -f null -

will steadily eat memory.

commit 542a65d0b33abf81e5087ec9142bb11a54f23cde
Author: Mark Thompson <s...@jkqxz.net>
Date:   Sun Jul 31 22:51:45 2016 +0100

 ffmpeg_vaapi: Convert to use hw_frames_ctx only

 Most of the functionality here has moved into lavc.

 (cherry picked from commit 3e8651a7ccd8e89cc2f162cf614a3c9f7f4d9fcf)



valgrind 10k frames bluray

valgrind --leak-check=full --fullpath-after=/mnt/sdb1/Gits 
/mnt/sdb1/Gits/ffmpeg/ffmpeg_g -hwaccel vaapi  -i 00023.m2ts -vframes 
1 -an -sn  -f null -

==13089== Memcheck, a memory error detector
==13089== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==13089== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==13089== Command: /mnt/sdb1/Gits/ffmpeg/ffmpeg_g -hwaccel vaapi -i 
00023.m2ts -vframes 1 -an -sn -f null -

==13089==
ffmpeg version N-86289-g6c3a63f Copyright (c) 2000-2017 the FFmpeg 
developers

  built with gcc 5.3.0 (GCC)
  configuration: --prefix=/usr --disable-doc --enable-gpl 
--enable-libvpx --enable-libx265 --enable-libx264 --enable-gnutls

  libavutil  55. 63.100 / 55. 63.100
  libavcodec 57. 96.101 / 57. 96.101
  libavformat57. 72.101 / 57. 72.101
  libavdevice57.  7.100 / 57.  7.100
  libavfilter 6. 90.100 /  6. 90.100
  libswscale  4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc54.  6.100 / 54.  6.100
[mpegts @ 0xb80bc80] start time for stream 10 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 11 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 12 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 13 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 14 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 15 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 16 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 17 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 18 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 19 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 20 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 21 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] start time for stream 22 is not set in 
estimate_timings_from_pts
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 10 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 11 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 12 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 13 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 14 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 15 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 16 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 17 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 18 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 19 
(Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[mpegts @ 0xb80bc80] Could not find codec parameters for stream 20 
(Subtitle: hdmv_pgs_subtitle

[FFmpeg-user] memory leak with vaapi decode since ffmpeg_vaapi: Convert to use hw_frames_ctx only

2017-05-26 Thread Andy Furniss

First reported on mpv github issues.

Since below ffmpeg -hwaccel vaapi -i sommething-h264 -f null -

will steadily eat memory.

commit 542a65d0b33abf81e5087ec9142bb11a54f23cde
Author: Mark Thompson 
Date:   Sun Jul 31 22:51:45 2016 +0100

ffmpeg_vaapi: Convert to use hw_frames_ctx only

Most of the functionality here has moved into lavc.

(cherry picked from commit 3e8651a7ccd8e89cc2f162cf614a3c9f7f4d9fcf)
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] benching with -f null - fails on bluray sample since ffmpeg: init filtergraphs only after we have a frame on each input

2017-05-26 Thread Andy Furniss

Andy Furniss wrote:


andy [ffmpeg]$ ./ffmpeg -i ~/br-264-thd71.m2ts -f null -



Too many packets buffered for output stream 0:1.
Conversion failed!


With wm4s suggestion to raise max queue size this works.

ffmpeg -i ~/br-264-thd71.m2ts -max_muxing_queue_size 300 -f null -
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Converting and encoding in same step without pipes

2017-04-07 Thread Andy Furniss

Aarthi Priya Thirumalai wrote:

Hello all,

In my current set, I am trying to encode content with ffmpeg. The
ffmpeg receives the source input through a Black Magic Declink 4K pro
capture card. Input to the capture card is a prores 4:2:2 4k60 10bit
content from Atomos Shogun device. I want to convert my input from
Prores 4K10 bit 4:2:2 to 4K10bit 4:2:0 and directly encode through
libx265/libx264 in ffmpeg in a single step instead of doing the
conversion and storing in a intermediary file and again feeding that
into ffmpeg.

I would like to know if there is a way to do this  - conversion and
encoding in a single step, without using system pipes in ffpmeg? pls
let me know your thoughts and suggestions.


If the content is progressive then as simple as adding

-vf format=yuv420p10le

You could also consider adding flags to get slightly better psnr/ssim
though the difference is likely to be small in this case and I don't
know what ones would be best without testing a sample.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Converting 4:2:2 pro-res to 4:2:0 for AVC encoding

2017-04-07 Thread Andy Furniss

Pradeep Ramachandran wrote:


mov doesn't seem to support yuv420p10le. I am still stuck with mov
as the player that I am using to stream the input video can only
stream in mov format


Tested 10 bit libx264 and libx265 and both will write to mov with
current ffmpeg.

Maybe you need to build/install 10 bit versions of libx264/5 or maybe
it's not that easy if you are on windows - which I know nothing about
ffmpeg wise.

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

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

Re: [FFmpeg-user] gain the highest quality with H264 at a certain bit rate

2017-03-29 Thread Andy Furniss

negin tebyani wrote:


Well ignoring requests for ffmpeg console output and a section
of the master that the provided samples were made from means
that less people will even try to help you.



I don'n know how to reach for ffmpeg output console, but here is a section
of the master video:

 https://ufile.io/6c57f1


OK, so after converting good, bad and master to ffv1 and getting them
start at the same frame, testing is easy = make test encode from "new"
master, then a script can almost instantly make appear 4 stacked .pngs
of any frame I want.

They are all crap in different ways, depending on what frame is chosen
but I guess the aim it just to get a look more like the good than bad.

I am using newer ffmpeg/libx264 than you, and of course this test is not
perfect eg. I convert to .png (with flags) which may look better/worse
than whatever player you use. Also as I cut to match frames the starting
point is different - but given all that the thing that gets me closer
to your good sample is simply adding -tune psnr

. -c:v libx264 -b:v 2048k -maxrate 2048k -bufsize 5000k -tune psnr 
-preset veryslow ..


Maybe other options will get closer - you would really have to post a
screen/player shot of what you consider "bad", one with the clock on
screen so I can easily find the frame and compare.



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

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

Re: [FFmpeg-user] gain the highest quality with H264 at a certain bit rate

2017-03-28 Thread Andy Furniss

negin tebyani wrote:


I'm realy stuck in here, I have tried any commands and any suggestions, but


Well ignoring requests for ffmpeg console output and a section
of the master that the provided samples were made from means
that less people will even try to help you.


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

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

Re: [FFmpeg-user] gain the highest quality with H264 at a certain bit rate

2017-03-27 Thread Andy Furniss

negin tebyani wrote:

this is the source video mediainfo:


That's not ffmpeg console output, but anyway ..


Bit rate mode: Constant
Bit rate : 4 000 Kbps


So it's not a much of a master but (I guess) some re-encoded web stream
made from a broadcast stream, which you are encoding for a third time.

Was the "good" sample coded from this?

Maybe whoever made that one had a better master. In this case, I guess 
the original broadcast, which was likely higher and variable bitrate.



and yes, I need to use constant bitrate. do I need to use 2 pass with
constant bitrate?


Probably not - others may/have given their opinion.
AIUI 2 pass is better for variable bitrate when targeting some file size.



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

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

Re: [FFmpeg-user] gain the highest quality with H264 at a certain bit rate

2017-03-27 Thread Andy Furniss

negin tebyani wrote:

I am trying to reach that quality and using those parameters but the result
is still low quality..


Please don't top post on this list - reply in line like I do here.


you mean bufsize could affect the quality??


A bit, but I don't know how much in this case, just that it was an
obvious difference between good and bad - so worth changing.


I removed zerolatency but I am not getting a impressive result.


For good reason it is usual on here to be asked for full console
output as well as the command used.

Can you post that please and if possible supply the section of the
master file you used to make the results you posted.

Do you absolutely need constant bitrate output or are you just testing
to match up with the other encode?

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

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

Re: [FFmpeg-user] gain the highest quality with H264 at a certain bit rate

2017-03-27 Thread Andy Furniss

negin tebyani wrote:

I have encoded my videos using ffmpeg and H264, and this is my ffmpeg
command (2 pass encoding):


I don't think 2 pass is needed for constant bitrate - but am in no way
an expert on encoding.

Look at the differences in the params you pasted 

bufsize 3000k (you) vs 5000k.

possibly omit -tune zerolatency

subme is different - maybe try -preset veryslow

See what it looks like ...

Can you post the master for these?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Slight blur on converted video

2017-03-25 Thread Andy Furniss

Dave wrote:


The full ffmpeg output is:

$ ./ffmpeg -y -i in.mp4 -acodec pcm_s16le -vcodec prores_ks -profile:v 1 -vf 
scale=interl=1 -sws_flags full_chroma_inp+full_chroma_int -copytb -1 out.mov


FWIW I tested a bit the format conversion + various flags and the
only ones that made the ssim/psnr better 420 -> 422 10 bit and
back were accurate_rnd or bitexact, both gave the same score.

interl=1 recently got improved, I don't know if that fix is in
current release or not.

Whatever the flags, there is no softening and the psnr/ssim are
high for chroma (exact for luma).

So as has been said - try throwing more bits at it.

On the face of it going from 10mbit h264 to 80mbit prores may
seem plenty, but prores is I frame only. If you look at libh264
stats when encoding you will see that the (normally sparse) I
frames are generally 10x the size of the others. I frame compression
is "expensive".

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

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

Re: [FFmpeg-user] Slight blur on converted video

2017-03-24 Thread Andy Furniss

Erik Dobberkau wrote:

W dniu 2017-03-24 o 12:04, Dave pisze:


To answer your suggestions Chronek:

I tried encoding with your suggested command line it was still pretty
much the same.

1) I downloaded a fresh copy of ffmpeg and compiled it and still had the
same results
2) I am not really in a position to comment on
3) I assure you AME is using the same settings
4) Might be a possibility, I am a bit of a newbie when it comes to this.
Below is the metadata for the original clip in case anything is lost in the
cut down version.

The cut down version of the clip was created with QuickTime and you can
download it here:

http://www.bit.st/screenshots/in.mp





I got a decent result with one of the latest zeranoe builds:

ffmpeg -i in.mp4 -c:v prores_ks -profile:v 1 -flags +ilme+ildct -top 1 -vf
scale=interl=1 -sws_flags +full_chroma_inp+full_chroma_int -c:a pcm_s16le
-ar 48000 -ac 2  dave_proresLT.mov

Setting sws_flags just makes a minimal difference. Vendor and vtag don't
make any difference at all, except the writing library metadate. Pix_fmt is
set automatically.

The standard prores encoder is even blurrier than prores_ks, but it's twice
as fast on my machine. What's interesting, DNxHD remains just as sharp when
using the intermediate bitrate (115/120/145M, 8bpc), in comparison -- so 2
more bpc doesn't automatically give you a "better" result.



Haven't had time to look properly just a couple of thoughts.

in.mp4 is not too good to start with! Lol at the hat when (guess)
the encoder makes the cloth texture appear and does psy so it stays
still for a while the hat moves, before disappearing.

The screenshots look worse than encoding this test, though it is
slightly blurred.

What are we looking with?

Me a crappy tn panel 8 bit in - but then dithered, more than that, what
are we playing with? Me using mpv + opengl so the conversion to rgb for
display does preserve the full 10 bit 422. Use another player and you
may find that it gets a cheap non interlace aware cludge down back to
yuv420p before getting converted to rgb.




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

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

Re: [FFmpeg-user] Chroma problem converting mp4 to prores

2017-03-03 Thread Andy Furniss

David Cecco wrote:

Sorry about the slow response, that has fixed the issue, thanks chronek!

The file still seems a bit soft in quality though.  I have tried turning the 
-qscale right down to 1 and adjusting the bits_per_mb up to 2400 and the 
picture improved but it still wasn’t 100%, but the file grew to 2.5x the size.

I tried with the prores codec as opposed to the prores_ks codec and it was 
better, but again not 100% interestingly the file size didn’t grow when using 
the bits_per_mb with prores.

Here is an example output:

$ ffmpeg -y -i "5082197_Soccer Enrique Upd.mp4" -acodec pcm_s16le -vcodec prores_ks 
-profile:v 1 -vf scale=interl=1 -sws_flags full_chroma_inp+full_chroma_int -copytb -1 
"5082197_Soccer Enrique Upd.mov"
ffmpeg version 3.2.2-tessus Copyright (c) 2000-2016 the FFmpeg developers


Note scale=interl=1 recently changed (hopefully for the better).

You may want to test again with git.

Sometimes adding +accurate_rnd can help, though IIRC it 420 -> 422
8 bit was unaffected, don't know about 10bit.

Interlaced 420 -> rgb really does need it + the other flags.

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

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

Re: [FFmpeg-user] -pix_fmt yuv420p and deinterlacing

2017-02-25 Thread Andy Furniss

Katherine Frances wrote:


ffmpeg -i uncompressed_master.mov -c:v libx264 -pix_fmt yuv420p -c:a
libfdk_aac -b:a 128k access_copy.mp4


If the masters really are interlaced you will slightly break them
doing this.

You need to add -vf scale=interl=1

Additionally ffmpeg git master recently changed this to be better than
it was, so using latest should be best.

To retain interlacing you would also need a different command for libx264.

What to do depends on what you want and what the source really is.

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

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

Re: [FFmpeg-user] Convert MPEG-PS progressive to Interlaced

2017-01-31 Thread Andy Furniss

Andy Furniss wrote:

kumar vikram wrote:



But the op specifically asked for field-encoding.



Note to everybody (including me): Please try not to guess - if
the op still needs the information, he can post his command line
and console output and we can try to answer.


ffmpeg.exe -y -i INPUT_FILE -c:v mpeg2video -flags +ildct+ilme -vf
scale=interl=1,tinterlace=merge,fieldorder=tff OUTPUT_FILE


You forgot the output - also I doubt this would make 422 from 420 so
it's not the command that made the analyzed stream?


Sorry for doubting - should have tried first, so this command will
produce 422 from 420. But will also result in double height on the
stream I tested with (= the field coded stream I linked to earlier).
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Convert MPEG-PS progressive to Interlaced

2017-01-31 Thread Andy Furniss

kumar vikram wrote:



But the op specifically asked for field-encoding.



Note to everybody (including me): Please try not to guess - if the
op still needs the information, he can post his command line and
console output and we can try to answer.


ffmpeg.exe -y -i INPUT_FILE -c:v mpeg2video -flags +ildct+ilme -vf
scale=interl=1,tinterlace=merge,fieldorder=tff OUTPUT_FILE


You forgot the output - also I doubt this would make 422 from 420 so
it's not the command that made the analyzed stream?

If your input is mpeg2 you shouldn't need tinterlace=merge in addition
Paul said to use weave and he is a dev so knows.

You would only really need to weave if the input was fields and the
output of ffmpeg mpeg2decoder will always be weaved.

If you do need to convert 420 to 422 then scale=interl=1 is correct, but
not quite right - since ilpack was removed I don't know how you would be
able to get it perfect. The difference is hard to see and to do with
chroma subsampling positions being different for interlaced and progressive.



(mpeg2 video is not necessarily frame-based.)

Okay I think I have left too much scope for confusion here. So let me
just clarify a bit.

Attached two snapshots from elecard stream analyzer.

1. ps_interlaced.png - is for the the I-P filed based interlaced
stream. 2. ps_ffmpeg_output.png - is for the converted stream using
above command.

The rect marked in red is the point which is the problem.

As per my understanding of the PS spec(IEC-13818-2), if
picture_structure is set to 3, it means frame picture.


I didn't read the spec but 3 may well be correct as frame coded
interlaced is what mpeg2 interlaced streams often are. You can see it's
not progressive and the field dominance of the weave is indicated.


As you can see in ps_interlaced.png, the field picture_structure is
set to either 1 or 2 which means top or bottom field.

I have tried the above command and several other options which I
could found from google.

Hope someone could provide me the right solution (if any such
solution exists with ffmpeg) :)


As has been said ffmpeg will not make field coded interlaced but will
make frame coded interlaced.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Convert MPEG-PS progressive to Interlaced

2017-01-27 Thread Andy Furniss

kumar vikram wrote:

Hi All,
I have been struggling with converting PS progressive stream to PS
interlaced for my test app.

But all the conversion commands used by me are converting to Frame based
interlaced stream but what I am looking for is I-P field based interlace(I
frame having top filed and next frame having the bottom field) .


If you need a field encoded mpeg2 stream to test a decoder then you
could use some conformance stream eg.

ftp://ftp.tek.com/../tv/test/streams/Element/MPEG-Video-Conformance/main-profile/tcela/tcela-9-fp-dp/


Can someone help me with proper command do convert with ffmpeg?


I don't think you can do it with ffmpeg - maybe the reference encoder 
can do it? I've never used it, so have no idea.


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

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

Re: [FFmpeg-user] C920 h264 Problem

2017-01-26 Thread Andy Furniss

Canberk Demirsoy (Alumni) wrote:

Hey buddy, i am google -ing for weeks. And you are telling me what i know
now. C920 is enable to get compressed h264 in 30fps in 1080p. This can be
seen by the listing formats there is no problem with it. i already set
pix_ftm.


Maybe what Jimmy is saying is you don't need -pix_fmt h264 as you
already have -input_format h264. If removing it gives the same logging
output then it's not needed.

As has been said, you are getting compressed h264 from the camera, but
you are using -r 20 which means you are requesting 20 fps not 30. You
should also probably use -framerate 30 rather than -r 30 - there may
be a difference in behavior.

The fact you see yuvj420p is not an error, it is reporting what the
h264 stream was before it was encoded.

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

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

Re: [FFmpeg-user] Fwd: C920 h264 Problem

2017-01-26 Thread Andy Furniss

Canberk Demirsoy (Alumni) wrote:


Hi guys even though i make lots of settings i still see yuv format in debug
file. How to correctly get h264 format from c920 using raspberry pi? And i
wanna transfer file without encoding or decoding by copying vcodec.

My script

  ffmpeg -report -f v4l2 -r 20 -s 1920x1080 -pix_fmt h264 -input_format h264
-i /dev/video0 -copyinkf -vcodec copy -loglevel debug -t 15 logging.mp4


If you really want an elemental h264 stream then use 264 instead of mp4
as suffix (or use -f h264 and any suffix will be overridden).

Elemental h264 is not normally what you would choose and ffmpeg may read
incorrectly some things from it (IIRC framerate/progressive/interlaced)


 Stream #0:0, 0, 1/10240: Video: h264 (Constrained Baseline), 1
reference frame ([33][0][0][0] / 0x0021), yuvj420p(pc, progressive, left),


So it's h264 the yuvj420p is valuable info about the stream that an
h264 decoder will produce. In this case the j part tells a player that
the input was full range rather than tv range for black/white levels.


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

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

Re: [FFmpeg-user] DV to SD Blu-ray

2017-01-24 Thread Andy Furniss

Terje J. Hanssen wrote:

Den 24. jan. 2017 12:41, skrev Andy Furniss:

Terje J. Hanssen wrote:


1) 576i DV video to x264, pcm audio to ac3

ffmpeg -i dv01.dv -c:v libx264 -profile:v high -level 41
-pix_fmt yuv420p


-pix_fmt yuv420p?

I thought PAL DV was 420p - if by chance ffmpeg -i  shows any of
your interlaced inputs as 422 or 411 then you would also need to add
-vf scale=interl=1 and avoid using any -preset x or the chroma will
end up being messed up by a progressive conversion.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] DV to SD Blu-ray

2017-01-24 Thread Andy Furniss

Terje J. Hanssen wrote:

Den 24. jan. 2017 12:41, skrev Andy Furniss:

Terje J. Hanssen wrote:


1) 576i DV video to x264, pcm audio to ac3

ffmpeg -i dv01.dv -c:v libx264 -profile:v high -level 41
-pix_fmt yuv420p -preset slow  -crf 20 -g 24 -vf setsar=sar=12/11
-threads 8 -x264opts
bluray-compat=1:vbv-bufsize=15000:vbv-maxrate=3 -acodec ac3
-strict experimental -ar 48000 -ab 256k -y SD_BD2_x264_ac3.m2ts


This is coding interlaced as progressive.


Yeah, will "-flags +ilme+ildct" be the right interlace parameters to
add in the code above?


Seems so - you can tell whether libx264 is using mbaff by seeing

interlace + weightp is not implemented

in the output.


And I wonder how to possibly tell ffmpeg that the import video use
"bottom field first"?


The field order should get passed on from the source (assuming it's
present and correct).

IIRC from years ago, I managed to get tff into dv ripping Hi8 and
everything still assumed bff because it was dv, I had to override on
command line when further processing that.

Best to check anything you make by deinterlacing a high motion scene
with yadif=1 and frame(field) step playback, if the field order is wrong
motion will flip backwards and forwards. Also check with ffmpeg/ffprobe
or mediainfo that it actually reports a field dominance.


Indeed there are more in the ffmpeg code above I should like to get
"quality assured", i.e does it take into account that this is PAL
575i SD, i.e regarding colors and equivalent quality (bit-rate). So
if someone can tip or suggest how to merge the initial 1) x264
parameters into an ffmpeg code line, it would be be very helpful to
start with ;)


I don't know how to do things properly, but notice that the link in the
first post suggested setting extra opts for PAL color.

The crf 20 will set variable bitrate, libx264 should also, I think, cap
it with the above command. crf 20 is higher quality than default. I
don't know what rate to suggest for PAL SD, even if I made up a number
it may be too high or low depending on the complexity of the scene.

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

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

Re: [FFmpeg-user] De-telecine, deinterlace, and filter chains

2017-01-24 Thread Andy Furniss

Andy Furniss wrote:


Whatever further processing is done, I think that scaling down to 480
is going to be the first step. I live in pal land, so don't have
experience of dealing with ntsc.


Looking more at the sample it does seem that the progressive scale and
encode have killed every fourth source frame by partially merging its
fields with previous and next.

fieldmatch and decimate can't really recover this.

If you just needed to play this (on a 60[/1.001]Hz screen) you can make
it look "slightly less crap" on the fly with mpv + lavfi eg.

mpv -fs 
--vf=lavfi=[scale=w=1920:h=480,yadif=send_field:parity=tff:deint=all] 
out-short.mp4

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

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

Re: [FFmpeg-user] De-telecine, deinterlace, and filter chains

2017-01-23 Thread Andy Furniss

Andy Furniss wrote:

Andy Furniss wrote:


Vid looks like it's scaled up from 480 height and pillarboxed, so
the weave is not line for line anymore.

It's probably been scaled as progressive which on strong chroma
will (I think) be un-mendable. Saying that the sample can be scaled
down to 480 and the weave is 1:1 again, which holds out the
possibility that you could make it interlaced again with tinterlace
and try to get IVTC to run on that.


Maybe tinterlace was a crap idea as IIRC it would need field rate
input. Another way could be to scale down to 480 do a field rate
deint and drop duplicated frames.


Though that's not really correct either.

Whatever further processing is done, I think that scaling down to 480 is
going to be the first step. I live in pal land, so don't have experience
of dealing with ntsc.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] De-telecine, deinterlace, and filter chains

2017-01-23 Thread Andy Furniss

Andy Furniss wrote:


Vid looks like it's scaled up from 480 height and pillarboxed, so
the weave is not line for line anymore.

It's probably been scaled as progressive which on strong chroma will
(I think) be un-mendable. Saying that the sample can be scaled down
to 480 and the weave is 1:1 again, which holds out the possibility
that you could make it interlaced again with tinterlace and try to
get IVTC to run on that.


Maybe tinterlace was a crap idea as IIRC it would need field rate input.
Another way could be to scale down to 480 do a field rate deint and drop
duplicated frames.

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

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

Re: [FFmpeg-user] De-telecine, deinterlace, and filter chains

2017-01-23 Thread Andy Furniss

Billy wrote:

On 1/23/2017 12:02 AM, Mike Brown wrote:

But this method didn't seem to have any real effect on my video.
It's a long video, so I have made a shortened version available
to see if anyone has seen such a case. It's in 1080p and 23.97
fps. I'd like to save it in a similar frame rate and size, but to
be honest, the frame rate could be just about anything as long as
the interlacing was gone.


It is 29.97, not 23.97.


I tried checking for interlacing on the original video... None of
the frames are set as interlaced when I ran ffprobe.



The (short) video (6MB): https://www.datafilehost.com/d/5474b665


So, is this video the original, or the output of something you
tried?

If it is the original, I'm not sure you can do anything about it.
Why, because it is progressive video.  To IVTC requires interlaced
video @ 59.94 fields per sec, so that the 2:3 pulldown pattern can
be found and removed.  You can't find the 2:3 pulldown pattern in
progressive video. While we humans can see the 2:3 pulldown
pattern, I'm not sure what filter can.

Maybe someone has a way, but I certainly do not know it.

MB



Yep. 29.97. You watched a shortened "original."

I produced it for you thusly so you could wince along with me:

ffmpeg -ss 28:21 -t 6 -i in.mp4 -c:v copy out-short.mp4

The results of my deinterlacing attempts looked the same as this.

Thanks for your comments. My hope is that the miscreant who
transcoded it into progressive and left all of the artifacts...
doesn't do this any more. My eyes hurt.


Vid looks like it's scaled up from 480 height and pillarboxed, so the
weave is not line for line anymore.

It's probably been scaled as progressive which on strong chroma will (I
think) be un-mendable. Saying that the sample can be scaled down to 480
and the weave is 1:1 again, which holds out the possibility that you
could make it interlaced again with tinterlace and try to get IVTC to
run on that.

No idea as to exact commands - just a bit of hope you could make it a
bit better - but not perfect like you could if you had the "real" ntsc
master.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] DV to SD Blu-ray

2017-01-20 Thread Andy Furniss

Andy Furniss wrote:


As lpcm doesn't work maybe truehd?  ISTR there was a gsoc project to
encode.


I tried and it seems the encoder has issues, needs -strict -2 and isn't
lossless (reported on playback/decode first couple of seconds).

It also produces smaller output than input (s16le -> thd -> s16le) so
checking whether the rest is losless with md5sum won't work.

IIRC blu-ray would also need ac3 for compat anyway. As br allows
640 kbit ac3 maybe just ac3 would do (not sure if stereo has lower limit).


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

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

Re: [FFmpeg-user] DV to SD Blu-ray

2017-01-20 Thread Andy Furniss

Terje J. Hanssen wrote:

Hi List,

I'm a new user here and want suggestions for "best" ffmpeg syntax to
transcode PAL 576i DV source files to compliant SD-BD_x264m2ts and/or
SD-BD_mpeg2.m2ts.
The AVCHD-SD specification is possibly something that could be used
https://en.wikipedia.org/wiki/AVCHD#Specifications

My purpose is to
- archive this on 25GB-50GB BD-R discs in an suited format for future
editing
- keep the source quality at relative high bit-rate (i.e AVC at 15 Mbps
or MPEG-2 (I-frame?) at 25 Mbps)
- playback compliance with BD-players.
- keep by copy the DV LPCM audio if possible.


Working with interlaced content can be tricky, keep your masters even
if you think the blu-rays are OK at first sight.


The closest samples as references I've found for encoding Blu-ray are
these:

1) with x264 (video only)
http://www.x264bluray.com/home/576i-pal


Which does do an interlaced encode - but tff.

It's possible DV is bff so you would need to check what your content is.


2) with ffmpeg
http://forum.videohelp.com/threads/365667-FFmpeg-best-settings-to-encode-Blu-Ray?p=2332049=1#post2332049


Not suitable for interlaced content.


I want suggestions how to possibly "merge" relevant parameters from 1)
x264 into 2) ffmpeg syntax ?


ffmpeg can use -x264-params tp pass things to libx264 just an example
pasted from old notes which doesn't mean it's correct and of course it's
for 709HD content with abnormally low bitrate.

-vcodec libx264 -b:v 1k -preset veryslow -tune film -level 4.1 
-x264-params 
"bluray-compat=1:vbv-maxrate=11000:vbv-bufsize=3:keyint=30:open-gop=1:slices=4:tff=1:colorprim=bt709:transfer=bt709:colormatrix=bt709:sar='1:1'"




3) As a first attempt I tried to apply 2) mostly as is, but didn't
succeed to get LPCM audio copied:
ffplay and VLC can playback the out video file SD-BD_x264.m2ts without
Audio.


As lpcm doesn't work maybe truehd?  ISTR there was a gsoc project to encode.


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

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

Re: [FFmpeg-user] Need help understanding framerate conversion!

2017-01-13 Thread Andy Furniss

Matthias, Thomas wrote:

Hi All,

I need to mux and then framerate convert a rawvideo .mov file, and a PCM 16bit 
48Khz wav file.

For example,  a .mov file is exactly 10 seconds long, and a .wav file is also 
exactly 10 seconds.  The initial .mov file is a 30 frames-per-second, but after 
muxing with the audio, I need to convert it to 29.97.  The issue I’m seeing is 
that for some reason, the resulting video file is slightly longer than 10 
seconds, and the resulting audio is just shy of 10 seconds.  This leads to the 
audio being out-of-sync with the video by the end of the video.  In reality, 
I’m performing this task with much longer clips, and so the av-sync issue is 
much more noticeable, but even at 10 seconds the sync offset is noticeable in a 
video editor.

What am I doing wrong?  I’ve tried separating the muxing and framerate 
conversion into separate FFmpeg calls, but that doesn’t help. I’ve tried 
numerous setting combinations, but nothing keeps the audio at the correct 
length.  I’ve tried using atempo to stretch the audio, but that doesn’t even 
seem to work.  Here is an example command I’ve tried:

ffmpeg –y –i initial_video.mov –i initial_audio.wav –c:v  rawvideo –c:a 
pcm_s16le –pix_fmt uyvy422 –r 3/1001 output.mov

I’m clearly missing something here, but I have no idea why the audio track 
would end up shorter (in the 10s example, it’s about 9.98 seconds after), and 
the video longer (about 10.06).  Thanks!


I don't know how to do it "properly" but years ago I had to make a dvd 
for someone and wanted to speed up 23.98 to 25 fps.


This is just a paste from old notes = it may be crap in multiple ways!

Possibly you could use fractions rather than decimal for the pts/atempo 
corrections.


untested - I don't even know if it will work now, I guess it was OK at 
the time (unless I saved a failing version!).


ffmpeg -i in-23.98fps.avi -r 25 -filter_complex 
"[0:v]setpts=0.95904096*PTS[v];[0:a]atempo=1.04270833229[a]" -map "[v]" 
-map "[a]" -target pal-dvd -bf 2 -mbd rd -trellis 2 -cmp 2 -subcmp 2 
-aspect 16/9 -acodec ac3 -b:a 128k out-25fps.mpg







~Thomas
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] drawtext timecode drop frame 23.967

2016-12-14 Thread Andy Furniss

Nathaniel Finney wrote:

It seems the drawtext filter timecode option doesn't allow using 23.967:
  timecode='00\:00\:00\;00':rate=24000/1001: ...

[Parsed_drawtext_4 @ 0x7ff2c74010c0] Drop frame is only allowed with
3/1001 or 6/1001 FPS

I'm not sure why this is, 23.967 is a common NTSC frame rate, any ideas on
this?


I don't think 23.967 is a NTSC rate. Maybe a typo of 23.976 which is
nearly 24000/1001.

If you are dealing with NTSC any rates should really be written as 
xx000/1001


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

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

Re: [FFmpeg-user] VP9 to HEVC hdr demo conversion?

2016-12-14 Thread Andy Furniss

Tom Horsley wrote:

On Mon, 14 Nov 2016 02:02:08 +0100
Carl Eugen Hoyos wrote:


Can anyone suggest a command line this poor
ignorant human can use to convert these to
HEVC files, preserving the HDRness?


Either provide command line and complete, uncut console
output for what you have already tried or at least "ffmpeg -i"
output for the files you downloaded.


Here's the one that seems to give players the most trouble:



Input #0, matroska,webm, from 'The World in HDR.mkv':
   Metadata:
 encoder : libebml v1.3.4 + libmatroska v1.4.5
 creation_time   : 2016-11-08 02:38:04


A couple of other issues WRT getting this to work -

Your libx265 will need to be compiled for 10bit encoding.

Whatever you use to download from youtube may mess things up
when it merges the sound and video = possibly loose some info.

Using youtube-dl for the tests I did I was using the vid alone.

youtube-dl --list-formats  will show all available formats
you can then get the the audio and video separately and join them
when you do the hevc conversion. What format audio to get may depend
on what container you need to use to make the TV work, though you
could always re-code that as well.

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

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

Re: [FFmpeg-user] VP9 to HEVC hdr demo conversion?

2016-12-13 Thread Andy Furniss

Andy Furniss wrote:

traycold wrote:

hi,
I tried the same (convert a vp9.2 hdr video to hevc to watch it on a
samsung
smart tv).
So far, I tried this command (input.mkv contains both VP9.2 video
stream and
audio stream):

ffmpeg -i input.mkv -vf
scale=out_color_matrix=bt2020:out_h_chr_pos=0:out_v_chr_pos=0,format=yuv420p10

-pix_fmt yuv420p10le -c:v libx265 -x265-params
"colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc" -crf 22
-c:a
copy output.mkv

It works in the sense that the video is visible on smart TV. Looking with
mediainfo it seems ok to me, but the video is notably darker and color
different than original (for instance: orange becomes almost a dark red).

So probably there is something wrong. Honestly I just put that command
together looking at various forums, threads, tutorials I found on the
web,
as I'm a totally noob with encoding and ffmpeg.

Hope this may help, anyway. And someone can provide a better way to
convert.


I am not sure if it's currently possible or not - I don't have a TV to
test.

Looking with ffprobe at HDR hevc from the web you will see extradata in
the stream.

I don't know how to write that with ffmpeg.


Some progress now git head ffmpeg outputs mastering info from youtube webm.

I don't know how to get it into an output mkv - but in the case of hevc
it may not matter as long as it's in the hevc headers.

Turns out max-cll and max-fall are separate from st2086 metadata and
they don't seem to be in the youtube mkv (in fact I couldn't see that
they would be read - so tried adding code, but they came out 0 anyway).

The hevc online help shows how to make a mastering string and their
example is close to the data in the yt mkv so an easy paste just
changing min luma x10.

Below seems to make a stream that has mastering side data in the hevc
that mpv will read OK - so maybe try something like below, just a test
of course and you would need to tweak the mastering to match input as
shown by ffmpeg for each file (so finding a way to get ffmpeg to do it
for you will be far better).

Don't know if the cll/fall should be explicitly set to 0 or just omitted.

libx265 documentation on mastering and cll pasted below test console output.

Though ffmpeg -i output.mkv doesn't show mastering, ffprobe -show_frames 
does.


andy [377]$ ffm -i The\ World\ in\ HDR-tO01J-M3g0U.webm -c:v libx265 
-x265-params 
"colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(1000,10):max-cll=0,0" 
-vframes 100 output.mkv
ffmpeg version N-82844-g265d451 Copyright (c) 2000-2016 the FFmpeg 
developers

  built with gcc 5.3.0 (GCC)
  configuration: --prefix=/usr --disable-doc --enable-gpl --enable-omx 
--enable-opencl --enable-libvpx --enable-libx265 --enable-libmp3lame 
--enable-libx264 --enable-gnutls

  libavutil  55. 43.100 / 55. 43.100
  libavcodec 57. 67.100 / 57. 67.100
  libavformat57. 59.100 / 57. 59.100
  libavdevice57.  2.100 / 57.  2.100
  libavfilter 6. 68.100 /  6. 68.100
  libswscale  4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc54.  2.100 / 54.  2.100
ADF max_cll = 0
ADF max_fall = 0
Input #0, matroska,webm, from 'The World in HDR-tO01J-M3g0U.webm':
  Metadata:
encoder : google
  Duration: 00:02:34.54, start: 0.00, bitrate: 18208 kb/s
Stream #0:0(eng): Video: vp9 (Profile 2), yuv420p10le(tv, 
bt2020nc/bt2020/smpte2084), 3840x2160, SAR 1:1 DAR 16:9, 59.94 fps, 
59.94 tbr, 1k tbn, 1k tbc (default)

Side data:
  Mastering Display Metadata, has_primaries:1 has_luminance:1 
r(0.6800,0.3200) g(0.2649,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) 
min_luminance=0.001000, max_luminance=1000.00

File 'output.mkv' already exists. Overwrite ? [y/N] y
x265 [info]: HEVC encoder version 2.1
x265 [info]: build info [Linux][GCC 5.3.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT
x265 [info]: Main 10 profile, Level-5.1 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices  : 1
x265 [info]: frame threads / pool features   : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
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   : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress: CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp 
strong-intra-smoothing

x265 [info]: tools: lslices=8 deblock sao
Output #0, matroska, to 'output.mkv':
  Metadata:
encoder : Lavf57.59.100

Re: [FFmpeg-user] VP9 to HEVC hdr demo conversion?

2016-12-12 Thread Andy Furniss

Carl Eugen Hoyos wrote:

2016-12-11 23:25 GMT+01:00 traycold :

hi,
I tried the same (convert a vp9.2 hdr video to hevc to watch it on a samsung
smart tv).
So far, I tried this command (input.mkv contains both VP9.2 video stream and
audio stream):

ffmpeg -i input.mkv -vf
scale=out_color_matrix=bt2020:out_h_chr_pos=0:out_v_chr_pos=0,format=yuv420p10
-pix_fmt yuv420p10le -c:v libx265 -x265-params
"colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc" -crf 22 -c:a
copy output.mkv


Did you also try the following?
$ ffmpeg -i input.mkv -vcodec hevc output.mkv


I did a bit of digging into this and ffmpeg doesn't read the mastering 
data in the webm due to the test -


if (s->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL)

in libavformat/matroskadec.c roughly line 2438 (or less I have printfs 
sprinkled around)


removing the check + printfs reveals the mastering meta =

ADF has_mastering_primaries = 1
ADF has_mastering_luminance = 1
ADF mastering_meta->r_x = 0.68
ADF mastering_meta->r_y = 0.319960
ADF mastering_meta->g_x = 0.264940
ADF mastering_meta->g_y = 0.689960
ADF mastering_meta->b_x = 0.15
ADF mastering_meta->b_y = 0.059980
ADF mastering_meta->white_x = 0.312700
ADF mastering_meta->white_y = 0.328960
ADF mastering_meta->max_luminance = 1000.00
ADF mastering_meta->min_luminance = 0.001000
Input #0, matroska,webm, from 'The World in HDR-tO01J-M3g0U.webm':

Though a quick test shows they do not get written using your command.
Probably need to look in enc as well.



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

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

Re: [FFmpeg-user] VP9 to HEVC hdr demo conversion?

2016-12-12 Thread Andy Furniss

traycold wrote:

hi,
I tried the same (convert a vp9.2 hdr video to hevc to watch it on a samsung
smart tv).
So far, I tried this command (input.mkv contains both VP9.2 video stream and
audio stream):

ffmpeg -i input.mkv -vf
scale=out_color_matrix=bt2020:out_h_chr_pos=0:out_v_chr_pos=0,format=yuv420p10
-pix_fmt yuv420p10le -c:v libx265 -x265-params
"colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc" -crf 22 -c:a
copy output.mkv

It works in the sense that the video is visible on smart TV. Looking with
mediainfo it seems ok to me, but the video is notably darker and color
different than original (for instance: orange becomes almost a dark red).

So probably there is something wrong. Honestly I just put that command
together looking at various forums, threads, tutorials I found on the web,
as I'm a totally noob with encoding and ffmpeg.

Hope this may help, anyway. And someone can provide a better way to convert.


I am not sure if it's currently possible or not - I don't have a TV to test.

Looking with ffprobe at HDR hevc from the web you will see extradata in 
the stream.


I don't know how to write that with ffmpeg.

libx265 does have options to add some HDR info into the headers - 
possibly they could work.


mpv auto converts HDR 2020 to 709 SDR. For the youtube vid mentioned
mpv -v will see and act on this metadata, I don't know how to see it
with ffmpeg.

mpv -v The\ World\ in\ HDR-tO01J-M3g0U.webm



[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: google
[mkv] | + writing app: google
[mkv] | + timecode scale: 100
[mkv] | + duration: 154.538s
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 3840
[mkv] |   + Pixel height: 2160
[mkv] |+ Matrix: bt.2020-ncl
[mkv] |+ Primaries: bt.2020
[mkv] |+ Gamma: st2084
[mkv] |+ Levels: limited
[mkv] |+ HDR peak: 1000.00
[mkv] |  + Codec ID: V_VP9
[mkv] |  + Default duration: 16.683ms ( = 59.940 fps)
[mkv] Parsing cues...
[mkv] |+ found cluster
[mkv] All headers are parsed!



The HDR peak is info that you can get into hevc via libx265 - but 
whether anything will read it I don't know (mpv won't).


x265 -h | grep -i hdr

--master-display  SMPTE ST 2086 master display color volume 
info SEI (HDR)
   --max-cll Emit content light level info SEI as 
"cll,fall" (HDR)


I guess max-cll 1000,1000 may work, but I haven't got a clue if, or what 
to, master-display would need setting.



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

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

Re: [FFmpeg-user] No pixel format specified - meaning of yuv420p?

2016-12-02 Thread Andy Furniss

Andy Furniss wrote:


Possibly, or you didn't restrict to baseline.

You really should know what format the source video is is to do
things properly.

If say it's interlaced and stored as 422 or 411 then the default
conversion to 420 will be wrong. You would need to add interl=1 to
the scale filter (even then it's not truly correct, but the
difference is hard to see). If you want to keep as interlaced you
would also need to encode as MBAFF with libx264 and be sure to check
field dominance is correctly flagged in stream and container.

Of course if the source is interlaced and you just want something
"disposable" for the web rather than an archive, you could just
de-interlace it. Choices still involved = framerate/fieldrate, but
may (depending on source format) be able to avoid source chroma
format issues.


Do you really need baseline - it's less efficient that other profiles,
also it won't do MBAFF.

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

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

Re: [FFmpeg-user] No pixel format specified - meaning of yuv420p?

2016-12-02 Thread Andy Furniss

MRob wrote:

Thank you for the very fast response, it's appreciated.

On 2016-12-01 16:23, Lou wrote:

On Thu, Dec 1, 2016, at 03:00 PM, MRob wrote:

I'm exporting a video from an older Adobe Elements (Windows)
with intention to put it on the web (both H.264 and VP8). I
exported using Adobe's "DV AVI" which appears to be the most
unmolested output format


DV is not a good choice: it's lossy and will mess up your width,
height, aspect ratio, etc. Install UT video. UT video is a free and
open compressed lossless format that works well as an intermediate
format:

http://umezawa.dyndns.info/archive/utvideo/?C=M;O=D

Then restart Elements and export using that. Make sure Elements
doesn't change the width, height, frame rate, etc (I recall Adobe
Media Encoder doing that often). Finally, re-enode the intermediate
file with ffmpeg.


Oh, thank you for that information. Unfortunately, it looks like I'm
 working with Premier Elements, and after installing UT video, I
don't see any facilities to export using it. Is this a limitation of
Premier? Or am I looking in the wrong place? Thanks for the off-topic
help with that.


[...]

But from reading that mailing list post and the error message
text, it sounds like adding "-pix_fmt yuv420p" affects the
output. I do not need to retain compatibility with terribly old
devices (though I am using baseline level 3.0), so I wanted to
ask if there is a better way to handle conversion in this case.


You'll need yuv420p. Most non-FFmpeg based players and various
devices don't support anything else.


I see, so the reason I hadn't seen that before was because any other
 videos I'd encoded likely had the yuv420p pixel format in the video
 stream already?


Possibly, or you didn't restrict to baseline.

You really should know what format the source video is is to do things
properly.

If say it's interlaced and stored as 422 or 411 then the default
conversion to 420 will be wrong. You would need to add interl=1 to the
scale filter (even then it's not truly correct, but the difference is
hard to see). If you want to keep as interlaced you would also need to
encode as MBAFF with libx264 and be sure to check field dominance is
correctly flagged in stream and container.

Of course if the source is interlaced and you just want something
"disposable" for the web rather than an archive, you could just
de-interlace it. Choices still involved = framerate/fieldrate, but may
(depending on source format) be able to avoid source chroma format issues.



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

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

Re: [FFmpeg-user] (de)-interlacing question

2016-11-25 Thread Andy Furniss

Toerless Eckert wrote:

On Thu, Nov 24, 2016 at 12:36:52PM +, Andy Furniss wrote:

Aka: Don't see anything that would indicate frame duplication,
so all i can do is trust the step by step playback from vlc or
mplayer.


I can't reproduce getting ffmpeg to call 50fps or mplayer/vlc to
dup on framestep, though as I said mplayer gets confused.


This is what i looked at:

http://media.ndr.de/progressive/2016/1115/TV-20161115-0956-4700.hd.mp4

 In single step in both mplayer and vlc it shows new frame only
every second step.


Yes, that one is 50fps duped. Maybe they do it so they can switch
between 25 and 50 easily within the same file if needed.

Strange encode, though = this one has cabac but no b frames.

Whoever scaled down the high up out door shots, should really learn how
to do it properly to avoid artifacts.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] (de)-interlacing question

2016-11-24 Thread Andy Furniss

Toerless Eckert wrote:

On Tue, Nov 22, 2016 at 07:30:48PM +, Andy Furniss wrote:

Toerless Eckert wrote:


Well, but what i am claiming is that they where interlacing
progressive HD to create interlaced SD.


Maybe, if the master is 720p50. I don't think they would
interpolate from 720p25 to do that though.


Yepp. Checked a new recording, and the H264 HD TS from Astra is
720p50 with actual 50 frames, the mediaportal H264 mp4 file is 720p50
but actually 720p25 with duplicated frames, and the MPEG2 SD TS from
Astra is 720i50.

So the good news is that all the SD bits are full origin bits, but
that still leaves me wondering how to best deal with deinterlacing.
The threads i can find comparing different deinterlacing options are
quite inconclusive to me.


Depends what you want/need to do. Personally I wouldn't de-interlace
anything I wanted to keep, but then I wouldn't recode either - I mean
gigs are far smaller than they used to be.

If you must recode then it's possible to code h264 as mbaff - though
care is needed WRT field order so you don't end up trashing.

yadif=1 for field rate seems mostly good enough. mcdeint can be better,
but takes ages. Some of the others I find on SD that's going to get
scaled on playback, look a bit crap on diagonals.

Depending on what GPU/TV you have you could in theory get a nice
de-interlace on playback. Intels motion-adaptive vaapi looked OK when I
tested it some time ago. It's even possible, though tricky, to get some
TVs to deint for you, if they automagically deint when in an interlaced
mode.


*sigh*


I thought it might have gotten a lot easier through all the
experience collected with motion estimation. Aka: work in the
DCT domain, interpolate motion vectors and residual error - or
something like that.


AIUI encoders get it easy in comparison to interpolation. An
encoder has the ground truth for reference, so even if it can't
find good motion vectors it can correct the difference with the
residual or intra code a block.


Use ground truth from 50p recordings to create 25p reference streams
to train a neural network. Nnedi already seems to use a neural
network for deinterlacing. Would guess it's using a similar
approach.


IIRC it just scales up fields - albeit nicely.

I've never seen a paper that uses neural networks - which doesn't mean
there isn't one.



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

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

Re: [FFmpeg-user] (de)-interlacing question

2016-11-24 Thread Andy Furniss

Toerless Eckert wrote:

On Wed, Nov 23, 2016 at 11:30:55AM +0100, Moritz Barsnick wrote:

the mediaportal H264 mp4 file is 720p50 but actually 720p25 with
duplicated frames,


I never noticed that. :-/ (Why would they duplicate them?) I don't have
any "true 50 fps" show to check right now. A random ARD Mediathek
archive file (yesterday's Tagesschau) shows this:


Well, i'd assume they reduce the effective framerate to 25 to get lower
bitrate, and they duplicate to get better player compatibility ?


Input #0, hls,applehttp, from 
'http://hls.tagesschau.de/i/video/2016/1122/TV-20161122-2026-4701.,webs,websm,webm,webml,webl,webxl,.h264.mp4.csmil/index_5_av.m3u8':


... Which program do you use for this output ?

I downloaded with MediathekView, so i got non-hls.

Also shows probably the same with ffprobe:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'zdf.mp4':
   Metadata:
 major_brand : mp42
 minor_version   : 0
 compatible_brands: isom
 creation_time   : 2016-11-15 09:18:01
   Duration: 00:28:30.04, start: 0.00, bitrate: 3776 kb/s
 Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, 
bt709), 1280x720 [SAR 1:1 DAR 16:9], 3582 kb/s, 50 fps, 50 tbr, 50k tbn, 100 
tbc (default)
 Metadata:
   creation_time   : 2016-11-15 09:18:01
   handler_name: MP4 Video Media Handler
   encoder : AVC Coding
 Stream #0:1(deu): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, 
fltp, 189 kb/s (default)
 Metadata:
   ...

Aka: Don't see anything that would indicate frame duplication, so
all i can do is trust the step by step playback from vlc or mplayer.


I can't reproduce getting ffmpeg to call 50fps or mplayer/vlc to dup on 
framestep, though as I said mplayer gets confused.


Maybe there is something in the raw chunks that makes MediathekView see 
50 when it makes the mp4.


As the above link is not live you can just download the m3u8 with wget, 
look at it and wget a chunk from one of the links it contains.


ffmpeg does not call 50 fps if I do that.


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

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

Re: [FFmpeg-user] (de)-interlacing question

2016-11-23 Thread Andy Furniss

Moritz Barsnick wrote:

On Wed, Nov 23, 2016 at 02:20:13 +0100, Toerless Eckert wrote:

Yepp. Checked a new recording, and the H264 HD TS from Astra is
720p50 with actual 50 frames,


As mentioned, a lot of over-the-air programming has duplicated frames.
(Additionally, even nowadays, some newly produced material still looks
upscaled from SD.)


the mediaportal H264 mp4 file is 720p50 but actually 720p25 with
duplicated frames,


I never noticed that. :-/ (Why would they duplicate them?) I don't have
any "true 50 fps" show to check right now. A random ARD Mediathek
archive file (yesterday's Tagesschau) shows this:

Input #0, hls,applehttp, from 
'http://hls.tagesschau.de/i/video/2016/1122/TV-20161122-2026-4701.,webs,websm,webm,webml,webl,webxl,.h264.mp4.csmil/index_5_av.m3u8':
   Duration: 00:15:34.44, start: 0.100667, bitrate: 0 kb/s
   Program 0
 Metadata:
   variant_bitrate : 0
 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 
1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
 Metadata:
   variant_bitrate : 0
 Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 
fltp
 Metadata:
   variant_bitrate : 0
 Stream #0:2: Data: timed_id3 (ID3  / 0x20334449)
 Metadata:
   variant_bitrate : 0


There is something 50 about the chunks, in that it's one of those 
streams that mplayer will play at 50 (using its own ts demuxer, lavf is OK).


Maybe VLCs ts demuxer decides it should dup.

I don't know how to get a raw stream with ffmpeg ie. just cat the chunks 
together.


Looking at the output of below then using wget is how I grabbed one to test.

At time of testing it looked like the content was only ever going to be 
25fps anyway.


ffmpeg -loglevel verbose -i 
http://hls.tagesschau.de/i/video/2016/1122/TV-20161122-2026-4701.,webs,websm,webm,webml,webl,webxl,.h264.mp4.csmil/index_5_av.m3u8 
-f null -


Other random observation = no CABAC!

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

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

Re: [FFmpeg-user] (de)-interlacing question

2016-11-22 Thread Andy Furniss

Toerless Eckert wrote:


Well, but what i am claiming is that they where interlacing
progressive HD to create interlaced SD.


Maybe, if the master is 720p50. I don't think they would interpolate
from 720p25 to do that though.


I thought it might have gotten a lot easier through all the
experience collected with motion estimation. Aka: work in the DCT
domain, interpolate motion vectors and residual error - or something
like that.


AIUI encoders get it easy in comparison to interpolation. An encoder has
the ground truth for reference, so even if it can't find good motion
vectors it can correct the difference with the residual or intra code a
block.

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

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

Re: [FFmpeg-user] (de)-interlacing question

2016-11-22 Thread Andy Furniss

Andy Furniss wrote:

Oops, sorry for the messed up post - pasting that link managed to paste
other stuff back in as well.

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

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

Re: [FFmpeg-user] (de)-interlacing question

2016-11-22 Thread Andy Furniss

Toerless Eckert wrote:

On Tue, Nov 22, 2016 at 12:18:43PM +, Andy Furniss wrote:

Seems strange that that would happen. It certainly doesn't in the
UK, 25fps progressive SD does get flagged as interlaced


Any idea why that flag is set ? Just because it makes the
programming look more compatible ? Is there really any equipment that
could not display the content without the flag or create a worse
display result if it was not set ? Seems to me that even if you
connected a digital STB to a CRT, every digitial STB would still be
able to display a non-interlaced flagged program with the same visual
result.


SD decoders have been around a long time, I guess initially they
couldn't handle progressive.

More recently in the UK on DVB-T2 only there is dynamic flagging for
interlaced/progressive, 1080i25(50) and 1080p25. This happens within the
same program (eg, credits are normally interlaced even if content
isn't). No one broadcasts 720 here, but the web catchup versions are 720p.


but there is no interpolation. Have you tried frame stepping with
say mplayer - it could be that vlc is adding filters because of the
flags.


Whow, thats a far out idea ;-) WOuld love to challenge you: Vlc uses
ffmpeg to do the hard parts. And i'd be quite curious if ffmpeg
could create motion interpolated frames. Any example CLI line to do
that ?


I was thinking more that vlc may be de-interlacing with something simple
which looked like interpolated, but was just de-interlace.

ffmpeg motion interpolaters are far from real time.

mpv can do real time simple interpolation via gpu/opengl.


Btw: mplayer single steps displays frames. The MPEG2 SD TS recording
shows clearly interlaced frames. The H264 MPEG4 HD mediathek file
shows every second frame to be identical. Vlc seems to step fields,
so i see non-interlaced field by field for the MPEG2 SD TS recording.
And same frame duplication for the HD.


Yea, that's why I suggested it - so you could see if there was weave.


Also noted you say "Just download" which makes me wonder whether
you are talking about web content rather that broadcast.


Yes indeed. I had only recorded (MPEG2 TS) of a program and then
downloaded later the H264 HD version from mediathek to compare. I'll
record another program HD and SD to make sure that the mediathek HD
file didn't strip actual p50 programming into p25. Of course this is
still no 100% proof, the production mater could still have been p50
and they use more spatial bits for their HD channels and more
temporal ones for the SD version.


It is normal for the BBC at least, to have 25fps versions of 50fps
content for download. More recently you can get 720p50 as well - but you
need to choose the correct version.


Which is why i'd like to see how good motion interpolation created by
eg: ffmpeg could be to see if one can recognize it (being worse than
actual frames).


Depending on content, it's quite likely you would see artifacts by frame
stepping.

ffmpeg recently got some more interpolation code via GSOC see this thread -

Toerless Eckert wrote:
> On Tue, Nov 22, 2016 at 12:18:43PM +, Andy Furniss wrote:
>> Seems strange that that would happen. It certainly doesn't in the UK,
>> 25fps progressive SD does get flagged as interlaced
>
> Any idea why that flag is set ? Just because it makes the programming
> look more compatible ? Is there really any equipment that could not
> display the content without the flag or create a worse display result
> if it was not set ? Seems to me that even if you connected a digital STB
> to a CRT, every digitial STB would still be able to display a 
non-interlaced

> flagged program with the same visual result.

SD decoders have been around a long time, I guess initially they 
couldn't handle progressive.


More recently in the UK on DVB-T2 only there is dynamic flagging for 
interlaced/progressive, 1080i25(50) and 1080p25. This happens within the 
same program (eg, credits are normally interlaced even if content 
isn't). No one broadcasts 720 here, but the web catchup versions are 720p.


>> but there is no
>> interpolation. Have you tried frame stepping with say mplayer - it could
>> be that vlc is adding filters because of the flags.
>
> Whow, thats a far out idea ;-) WOuld love to challenge you: Vlc uses
> ffmpeg to do the hard parts. And i'd be quite curious if ffmpeg could
> create motion interpolated frames. Any example CLI line to do that ?

I was thinking more that vlc may be de-interlacing with something simple 
which looked like interpolated, but was just de-interlace.


ffmpeg motion interpolaters are far from real time.

mpv can do real time simple interpolation via gpu/opengl.

> Btw: mplayer single steps displays frames. The MPEG2 SD TS recording
> shows clearly interlaced frames. The H264 MPEG4 HD mediathek file shows
> every second frame to be identical. Vlc seems to step fields, so i
> see non-interlac

  1   2   3   >