Re: [FFmpeg-user] error with cuda for convert ts to mp4

2021-01-11 Thread Michele Salerno


Il 11/01/21 12:01, Dennis Mungai ha scritto:

On Mon, 11 Jan 2021, 04:30 Michele Salerno,  wrote:


Hi,

i have GPU GTX660Ti on debian buster 64bit, cpu intel core i7.

I have fresh install debian and install latest driver and cuda from
website nvidia, no repository of debian.

If convert file h264 with cpu it's ok, if use gpu i have error.

The video prova.ts is recorder from decoder sat.

The command used is:

ffmpeg -y -threads 8 -vsync 0 -hwaccel cuda -i prova.ts -r 24 -c:v
h264_nvenc -filter_complex yadif=parity=tff:deint=all,scale=1920:1080
-b:v 3M -c:a aac -b:a 192k -ar 48000 prova.mp4

This is output

https://pastebin.com/uW9knqkz

what is the error?

Thanks.

Best regards.

Michele


___



Michele,

Use this:

ffmpeg -y -threads 1 -hwaccel cuda -i prova.ts -r 24 -c:v
h264_nvenc -filter_complex yadif_cuda,scale_cuda=1920:1080
-b:v 3M -c:a aac -b:a 192k -ar 48000 prova.mp4

Notes:

You're using nvdec hwaccel. Lower thread count for the decoder to 1, and
likewise use filters running on the GPU to prevent the need for hwdownload
filters.



Don't work, this is output

https://pastebin.com/9wMDckVf


___
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] Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

2021-01-11 Thread Carl Zwanzig

On 1/11/2021 9:48 AM, Rishit Temp wrote:

I might be able to access a raw H264 stream or a series of image
captures. Can ffmpeg turn a series of images into a video feed and
broadcast it given the frames per second assuming that the appropriate
number of images are created in real time?
ffmpeg can convert a series of still images into video, a quick search with 
"ffmpeg still image to video" will turn up the commands and some of the 
potential issues. But since you want to re-stream anyway, getting a stream 
to start with will make the job easier.


Oh, and please do not top-post on this mailing list.

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

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

Re: [FFmpeg-user] Streaming an mp4/mov file in real time using FFMPEG (no moov atom)

2021-01-11 Thread Rishit Temp
I see. That puts me in a really tough spot and unfortunately I don’t have 
control over where the metadata is located. 

I might be able to access a raw H264 stream or a series of image captures. Can 
ffmpeg turn a series of images into a video feed and broadcast it given the 
frames per second assuming that the appropriate number of images are created in 
real time?

Thank you to everyone who has provided their input!

Rishi

> On Jan 11, 2021, at 12:04 AM, Gyan Doshi  wrote:
> 
> 
> 
> On 11-01-2021 10:34 am, Carl Zwanzig wrote:
>> On 1/10/2021 4:23 PM, Carl Eugen Hoyos wrote:
>>> Am Mo., 11. Jan. 2021 um 01:19 Uhr schrieb Rishit Temp
>>> :
>>> 
 I am trying to read an incomplete MP4 file as it is being written in real 
 time.
>> 
>>> This is in general impossible with FFmpeg.
>> 
>> I'm not sure it's possible at all with mp4/mov at all- you need metadata 
>> that's written when the file is closed.
> 
> In some live broadcast workflows, which need some post work before telecast, 
> the encoder writes a file with pre-specified metadata i.e. timestamps and 
> packet offsets, and writes out the media to those offsets. This is 
> inefficient in terms of space packing but any NLE can open these files and 
> access the new data as it gets added.
> 
> Regards,
> Gyan
> ___
> 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] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-11 Thread Vijay Rakesh Munganda
Hi All,

Kindly please anyone suggest me.

Thanks & Regards,
Vijay Rakesh

> On 11-Jan-2021, at 10:06, Vijay Rakesh Munganda 
>  wrote:
> 
> 
> Hi Moritz,
> 
>> Assuming ffmpeg actually segments like this (and not on keyframes): 
>> Individual
>> frames cannot normally be played, unless they are keyframes. You should
>> play the complete segment "playlist" as a whole. ffplay will have
>> trouble identifying the streams and codecs in such a short sample:
>> I have add keyframes 
> 
>  I have added the keyframes option in ffmpeg command as ffmpeg -f alsa 
> -thread_queue_size 1024 -i hw:0 -f video4linux2 -i /dev/video0 -c:a aac -ar 
> 48k -t 0:10 -segment_time 00:00.04 -f segment sample-%003d.aac -c:v h264 
> -force_key_frames "expr:gte(t,n_forced*0.04)" -pix_fmt yuv420p -s:v 640x480 
> -t 0:10 -r 25 -g 1 -segment_time 00:00.04 -f segment frame-%003d.h264. But 
> still I get an error as frame-001.h264: Invalid data found when processing 
> input.
> 
> Console Output:
> configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened 
> --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu 
> --enable-gpl --disable-stripping --enable-avresample --enable-avisynth 
> --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray 
> --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite 
> --enable-libfontconfig --enable-libfreetype --enable-libfribidi 
> --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa 
> --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse 
> --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy 
> --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora 
> --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack 
> --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid 
> --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl 
> --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 
> --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 
> --enable-shared
>   libavutil  55. 78.100 / 55. 78.100
>   libavcodec 57.107.100 / 57.107.100
>   libavformat57. 83.100 / 57. 83.100
>   libavdevice57. 10.100 / 57. 10.100
>   libavfilter 6.107.100 /  6.107.100
>   libavresample   3.  7.  0 /  3.  7.  0
>   libswscale  4.  8.100 /  4.  8.100
>   libswresample   2.  9.100 /  2.  9.100
>   libpostproc54.  7.100 / 54.  7.100
> Guessed Channel Layout for Input Stream #0.0 : stereo
> Input #0, alsa, from 'hw:0':
>   Duration: N/A, start: 1610338632.931406, bitrate: 1536 kb/s
> Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
> Input #1, video4linux2,v4l2, from '/dev/video0':
>   Duration: N/A, start: 3405.427360, bitrate: 147456 kb/s
> Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 
> 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
>   Stream #1:0 -> #1:0 (rawvideo (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [alsa @ 0x55777d96fe00] ALSA buffer xrun.
> [segment @ 0x55777d983d80] Opening 'sample-000.aac' for writing
> Output #0, segment, to 'sample-%003d.aac':
>   Metadata:
> encoder : Lavf57.83.100
> Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
> Metadata:
>   encoder : Lavc57.107.100 aac
> [libx264 @ 0x55777d98fa20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
> [libx264 @ 0x55777d98fa20] profile High, level 3.0
> [libx264 @ 0x55777d98fa20] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC 
> codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: 
> cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 
> psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 
> deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 
> sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 
> constrained_intra=0 bframes=0 weightp=0 keyint=1 keyint_min=1 scenecut=40 
> intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 
> ip_ratio=1.40 aq=1:1.00
> [segment @ 0x55777d98dda0] Opening 'frame-000.h264' for writing
> Output #1, segment, to 'frame-%003d.h264':
>   Metadata:
> encoder : Lavf57.83.100
> Stream #1:0: Video: h264 (libx264), yuv420p, 640x480, q=-1--1, 25 fps, 25 
> tbn, 25 tbc
> Metadata:
>   encoder : Lavc57.107.100 libx264
> Side data:
>   cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
> [segment @ 0x55777d983d80] Opening 'sample-001.aac' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-001.h264' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-002.h264' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-003.h264' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-004.h264' for writing
> 

Re: [FFmpeg-user] error with cuda for convert ts to mp4

2021-01-11 Thread Dennis Mungai
On Mon, 11 Jan 2021, 04:30 Michele Salerno,  wrote:

> Hi,
>
> i have GPU GTX660Ti on debian buster 64bit, cpu intel core i7.
>
> I have fresh install debian and install latest driver and cuda from
> website nvidia, no repository of debian.
>
> If convert file h264 with cpu it's ok, if use gpu i have error.
>
> The video prova.ts is recorder from decoder sat.
>
> The command used is:
>
> ffmpeg -y -threads 8 -vsync 0 -hwaccel cuda -i prova.ts -r 24 -c:v
> h264_nvenc -filter_complex yadif=parity=tff:deint=all,scale=1920:1080
> -b:v 3M -c:a aac -b:a 192k -ar 48000 prova.mp4
>
> This is output
>
> https://pastebin.com/uW9knqkz
>
> what is the error?
>
> Thanks.
>
> Best regards.
>
> Michele
>
>
> ___
>


Michele,

Use this:

ffmpeg -y -threads 1 -hwaccel cuda -i prova.ts -r 24 -c:v
h264_nvenc -filter_complex yadif_cuda,scale_cuda=1920:1080
-b:v 3M -c:a aac -b:a 192k -ar 48000 prova.mp4

Notes:

You're using nvdec hwaccel. Lower thread count for the decoder to 1, and
likewise use filters running on the GPU to prevent the need for hwdownload
filters.

>
___
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] overlaying animated PNG, doesn't loop

2021-01-11 Thread Dave Thorn via ffmpeg-user
Yeah, sorry.  Stuck on Windows at the moment and I was anticipating
difficulty updating, but it was fine.

Same behaviour in this version:

$ ./ffmpeg-N-100581-ga454a0c14f-win64-gpl/bin/ffmpeg -i ../input.mp4 -i 
../elephant.apng -filter_complex "[0:v][1:v] 
overlay=25:25:enable='between(t,0,4)'" -pix_fmt yuv420p -c:a copy output.mp4
ffmpeg version N-100581-ga454a0c14f Copyright (c) 2000-2021 the FFmpeg 
developers
  built with gcc 9.3-win32 (GCC) 20200320
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static 
--pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 
--target-os=mingw32 --enable-gpl --enable-version3 --disable-debug 
--disable-w32threads --enable-pthreads --enable-iconv --enabl
e-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp 
--enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf 
--disable-vulkan --enable-libvorbis --enable-amf --enable-libaom 
--enable-avisynth --enable-libdav1d --enable-libdavs2 --enabl
e-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libass 
--enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora 
--enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --en
able-librav1e --enable-librubberband --enable-schannel --enable-sdl2 
--enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame 
--enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 
--enable-libxavs2 --enable-libxvid --enable-libzimg --ext
ra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread 
--extra-libs=-lgomp
  libavutil  56. 63.100 / 56. 63.100
  libavcodec 58.115.102 / 58.115.102
  libavformat58. 65.101 / 58. 65.101
  libavdevice58. 11.103 / 58. 11.103
  libavfilter 7. 95.100 /  7. 95.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc55.  8.100 / 55.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../input.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.18.102
  Duration: 00:00:04.04, start: 0.00, bitrate: 28 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 24 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc 
(default)
Metadata:
  handler_name: VideoHandler
  vendor_id   : [0][0][0][0]
Input #1, apng, from '../elephant.apng':
  Duration: N/A, bitrate: N/A
Stream #1:0: Video: apng, rgba(pc), 480x400, 24 fps, 24 tbr, 100k tbn, 100k 
tbc
Stream mapping:
  Stream #0:0 (h264) -> overlay:main
  Stream #1:0 (apng) -> overlay:overlay
  overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 01a3db0dd240] using SAR=1/1
[libx264 @ 01a3db0dd240] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2
[libx264 @ 01a3db0dd240] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 01a3db0dd240] 264 - core 161 - H.264/MPEG-4 AVC codec - Copyleft 
2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 
deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 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=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 
rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 
ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.65.101
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 
1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 24 fps, 12288 tbn (default)
Metadata:
  encoder : Lavc58.115.102 libx264
Side data:
  cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   97 fps=0.0 q=-1.0 Lsize=  59kB time=00:00:03.91 bitrate= 
124.4kbits/s speed= 4.9x
video:57kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: 3.468895%
[libx264 @ 01a3db0dd240] frame I:1 Avg QP:18.32  size:  8066
[libx264 @ 01a3db0dd240] frame P:24Avg QP:15.47  size:   951
[libx264 @ 01a3db0dd240] frame B:72Avg QP:17.65  size:   379
[libx264 @ 01a3db0dd240] consecutive B-frames:  1.0%  0.0%  0.0% 99.0%
[libx264 @ 01a3db0dd240] mb I  I16..4: 15.8% 82.0%  2.1%
[libx264 @ 01a3db0dd240] mb P  I16..4:  0.2%  0.1%  0.1%  P16..4:  1.1%  
0.3%  0.1%  0.0%  0.0%skip:98.2%
[libx264 @ 01a3db0dd240] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  1.1%  
0.2%  0.0%  direct: 0.0%  skip:98.7%  L0:48.6% L1:49.3% BI: 2.2%
[libx264 @ 01a3db0dd240] 8x8 transform