[FFmpeg-user] The h264_cuvid decoder would output more frames than the number of origin video frame.

2018-08-08 Thread linecorp baek
I'm used to use ffmpeg with nvidia Gpu devices for video transcoding work.
I found issue that when I try to decode a video using h264_cuvid, the
number of output frames are more than the number of origin video frames.

I guess, It issue would be caused ffmpeg side. So I tried some tests and
Please see below results.

[Test environments]
 1. Sample Video
  - 3,600 nb_frame and 1920x1080 60fps video. (A number is increasing
video.)
  - baseline profile and h264 coded video.
  - Youtube link, but it is not mine. (
https://www.youtube.com/watch?v=jEVewMQ4iu8)
 2. Machine Spec
  - CPU: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz x40
  - Mem: 128GB
  - GPU: Tesla P4 x2, NVIDIA-SMI 396.26, nvcc V9.2.88 (Release)
 3. Use ffmpeg version 3.4

[Test]
 1. Video decoding using h264_cuvid on FFmpeg
  - using `ffmpeg -c:v h264_cuvid -i baseline-numbered.mp4 -f rawvideo
-pix_fmt nv12 ./output.ffmpeg.nv12`
  - 4 frames were duplicated. (11209881600 bytes output, 3604 frames)
  - Snapshot:
https://drive.google.com/open?id=1sfpjtOMMhLkXD72abHyLNY0FdOVS1xl9

 2. Video decoding using AppDec Sample code in Nvidia Video SDK.
  - using the source code of "{VIDEO_SDK_BASE}/Samples/AppDecode/AppDec"
  - 0 frames were duplicated. (1119744 bytes output, 3600 frames)
  - Snapshot:
https://drive.google.com/file/d/1Ww9P0Vhd2K76xsyRKkPHf1Yis3-HuMN-/view?usp=sharing

As I knew that FFmpeg h264_cuvid module was used same code of Nvidia Video
SDK code. So I thought ffmpeg seems occur creating duplicated frame or
something wrong. So I wonder this happening is caused by ffmpeg or not.

In order words,
For getting the same result on ffmpeg, would I ask you this issue
validation by anyone who can help me out?

Thank 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] The h264_cuvid decoder would output more frames than the number of origin video frame.

2018-08-08 Thread Moritz Barsnick
On Wed, Aug 08, 2018 at 16:18:53 +0900, linecorp baek wrote:

> (A number is increasing video.)

I don't understand this sentence.

>   - Youtube link, but it is not mine. 
> (https://www.youtube.com/watch?v=jEVewMQ4iu8)

Is that the source of your input? How did you download it? youtube-dl?
If so, which format did you choose?

>  3. Use ffmpeg version 3.4

Why? A lot of development has happened since. Please use the very
latest release (4.0.2), or, even better, a build from recent git
master. Links to binaries are provided on the ffmpeg home page.

>  1. Video decoding using h264_cuvid on FFmpeg
>   - using `ffmpeg -c:v h264_cuvid -i baseline-numbered.mp4 -f rawvideo 
> -pix_fmt nv12 ./output.ffmpeg.nv12`

Please also provide the complete, uncut console output of your ffmpeg
command(s).

>   - 4 frames were duplicated. (11209881600 bytes output, 3604 frames)
[...]
>   - 0 frames were duplicated. (1119744 bytes output, 3600 frames)

I have an assumption, regarding VFR vs. CFR, but it could be
undermined by some facts about the input.

Cheers,
Moritz
___
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] The concat filter and duplicate frames from prores files

2018-08-08 Thread Nick Ludlam
On 7 Aug 2018, at 05:46, Gyan Doshi  wrote:
> 
> On 06-08-2018 02:38 AM, Nick Ludlam wrote:
> 
>> Is there a likely culprit for this? Something where the audio is 
>> fractionally longer than the video, somehow? 
> 
> This is likely it.
> 
> Try with -vsync vfr i.e.
> 
>ffmpeg -loglevel verbose \
>-i 
> /Users/nickludlam/Work/data-ingest/Resolve_prores_422/s1-4-1_004_04_25mm_5.mov
>  \
>-i 
> /Users/nickludlam/Work/data-ingest/Resolve_prores_422/s1-4-1_004_04_25mm_5.mov
>  \
>-i 
> /Users/nickludlam/Work/data-ingest/Resolve_prores_422/s1-4-1_004_04_25mm_5.mov
>  \-t 1 -f lavfi -i anullsrc=r=48000:cl=stereo -vsync vfr -pix_fmt yuv420p 
> -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] 
> concat=n=3:v=1:a=1[v][a]" -map "[v]" -map "[a]"  -preset fast -c:v libx264 
> -b:v 2000k -c:a aac -b:a 96k /tmp/output.mp4


Hi Gyan,
I tried with -vsync vfr, and while it suppresses the "*** 1 dup!” output while 
encoding, I still end up with more frames in the output stream than in the sum 
of the inputs. In this reduced case it does fix the output, but when I run my 
full ~ 90 file concat filter it doesn’t. I need to work on another reduced case.

From the docs, -vsync vfr will cause the input frame timestamps to be dropped, 
but I don’t understand why during a straight forward concatenation I’d end up 
with two frames with the same timestamp.  Surely a straight concatenation would 
see timestamps steadily increasing then snapping back to zero again at the join 
point?


Thanks,
Nick

___
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] The h264_cuvid decoder would output more frames than the number of origin video frame.

2018-08-08 Thread linecorp baek
Hello Mr. Moritz.
Thanks for your reply.

I apologize for providing insufficient information in first mail.
In summary of this reply, when FFmpeg version 4.0.2 is used and the input
video is decoded with the h264_cuvid decoder,
more frames are output than the origin video.

I would appreciate if you are checking the following information.
I have written some related topics with [ ] mark.
Please find [ ] mark so that read easier. :)

[Answering about your mentions]
> Is that the source of your input? How did you download it? youtube-dl?
If so, which format did you choose?

I used the 4K Video downloader program to get an MP4 file from Youtube.
And then, I changed video profile from High profile to baseline profile in
order to remove B-frames.
   (--> ffmpeg -i youtube-download.mp4 -c:v libx264 -vprofile baseline
./baseline-numbered.mp4)
Here is ffprobe result about an input video.

~/test/180808$ ffprobe -show_streams -show_format -print_format json
baseline-numbered.mp4
{
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "Constrained Baseline",
"codec_type": "video",
"codec_time_base": "1/120",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1080,
"has_b_frames": 0,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 42,
"chroma_location": "left",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"r_frame_rate": "60/1",
"avg_frame_rate": "60/1",
"time_base": "1/15360",
"start_pts": 0,
"start_time": "0.00",
"duration_ts": 921600,
"duration": "60.00",
"bit_rate": "1298712",
"bits_per_raw_sample": "8",
"nb_frames": "3600",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "und",
"handler_name": "VideoHandler"
}
},
{
"index": 1,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_time_base": "1/44100",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "44100",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/44100",
"start_pts": 0,
"start_time": "0.00",
"duration_ts": 2649087,
"duration": "60.07",
"bit_rate": "134109",
"max_bit_rate": "134109",
"nb_frames": "2588",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "und",
"handler_name": "SoundHandler"
}
}
],
"format": {
"filename": "baseline-numbered.mp4",
"nb_streams": 2,
"nb_programs": 0,
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"format_long_name": "QuickTime / MOV",
"start_time": "0.00",
"duration": "60.094000",
"size": "10818961",
"bit_rate": "1440271",
"probe_score": 100,
"tags": {
"major_brand": "isom",
"minor_version": "512",
"compatible_brands": "isomiso2avc1mp41",
"encoder": "Lavf57.83.100"
}
}
}


> Why? A lot of development has happened since. Please use the very
latest release (4.0.2), or, even better, a build from recent git
master. Links to binaries are provided on the ffmpeg home page.

As your recommend, I installed ffmpeg 4.0.2 version on CentOS 7.4 after I
got your reply.

[Test results of h264_cuvid decoding]
  1. d

[FFmpeg-user] Regarding how to extracting video from RTP packets using ffmpeg API or Source code

2018-08-08 Thread chetan goni
 Hello Friends,

Please provide note on  how to extracting video from RTP packets using
ffmpeg API or Source code
Please help me


Thanks & Regards

Chetan Goni
___
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] Regarding how to extracting video from RTP packets using ffmpeg API or Source code

2018-08-08 Thread Moritz Barsnick
Hello Chetan,

On Wed, Aug 08, 2018 at 17:40:14 +0530, chetan goni wrote:
> Please provide note on  how to extracting video from RTP packets using
> ffmpeg API or Source code

You need to be a bit more specific to what you're trying to achieve.
- What does extracting mean, i.e. what do you expect the output format to
  be? Shall it be transparent, or decoded/raw, or some new format?
- What kind of RTP packets do you have? A regular RTP stream?
- Are you willing to use the ffmpeg command line program, or do you
  want to programmatically use the libav* libraries?

It you answered "programatically" to the last question, you should post
your issue on the list libav-user.

From your previous thread, it is hard to understand whether you have a
good grasp of ffmpeg's concepts yet.

Cheers,
Moritz
___
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 tricks, timestamp-counter, slow motion, action camera

2018-08-08 Thread Morten W. Petersen
On Wed, Aug 8, 2018 at 8:50 AM, Joel Roth  wrote:

> Morten W. Petersen wrote:
>
[...]

> > Ah, Perl, OK. 🙂
>
> Better than okay, it's wonderful! Changed my life, it has.
>

OK.  Good for you. :)


>
> > Well I guess one can write a quick wrapper and GUI in Python, and then
> call
> > fftrim.
>
> In general people would want to click on a timeline to mark
> their cuts. Isn't creating a GUI for that a pretty big job?
>

I guess that depends on how focused you are, and how lazy/smart you are.

Python has bindings for GUI widgets for example.

As for me, I have a lot of video stored on in Google Drive.  This is because
I don't have a lot of local storage.

I was thinking about creating a local NAS/fileserver, but I've had to
prioritize
other things in life.

But say I had access to a server, and had videos stored there.  Then I could
find some streaming server, and create a small trimming client in for
example
HTML, Javascript and CSS.

I just need to store the times locally, then these could be pushed back to
the
server, which runs fftrim in batch mode and that's that.

Or, I could skip fftrim, stream videos from my Google Drive, save the video
I want to keep locally, delete the raw footage and then upload the video I
want to preserve.

But anyway, I have a lot of things to think about now, so I'm not going to
entertain the idea of creating a GUI any further at this point.



> > It is file processing after all, and Perl should be good at that, I just
> > never took the time to learn Perl.
>
> Search and substitute functions in perl use syntax like vi,
> ed, sed and awk. Perl regular expression syntax also began
> life elsewhere, so not all new but yes there is a lot
> mastering to a language.  I did try some python recently,
> and found it to be fun. The indenting reminds me of working
> with YAML.
>

Ah yes.  I've played with Linux since maybe the middle of the
nineties, and never really learned sed, awk etc. at any advanced
level.

The commando-line, with pipes etc. is powerful and convenient.

-Morten


-- 
Videos at https://www.youtube.com/user/TheBlogologue
Twittering at http://twitter.com/blogologue
Blogging at http://blogologue.com
Playing music at https://soundcloud.com/morten-w-petersen
Also playing music and podcasting here:
http://www.mixcloud.com/morten-w-petersen/
On Google+ here https://plus.google.com/107781930037068750156
On Instagram at https://instagram.com/morphexx/
___
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 tricks, timestamp-counter, slow motion, action camera

2018-08-08 Thread Rob Hallam
On 8 August 2018 at 14:00, Morten W. Petersen  wrote:

> Python has bindings for GUI widgets for example.

There also exists python bindings for ffmpeg, if you haven't found
them already.

For example:

https://github.com/kkroening/ffmpeg-python

Combining the two should get you somewhere quickly.

Good luck!
___
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 to build static fontconfig with ffmpeg?

2018-08-08 Thread Roger Pack
On Tue, Jul 24, 2018 at 12:02 AM, qw  wrote:
> Hi,
>
>
>>Wonder if it should be
>>or use another configure command : ./configure --disable-shared
>>--enable-static LDFLAGS="-L/usr/local/lib" LIBS="-lfreetype -lharfbuzz
>> -lpng"
>>
>>If that doesn't work maybe the circular dep. with harfbuzz and free
>>type isn't trivial?

I wonder if you can specify them circular style like

-lfreetype -lharfbuzz -lfreetype (or some combination)

if not sounds like you found a work around.  Either that or remove the
circular aspect.

> It doesn't work. I combine libfreetype.a, libharfbuzz.a and libpng16.a into 
> new libfreetype.a, and can succeed in building fontconfig by linking to the 
> new libfreetype.a, i.e.
>
>
>
> ar x libfreetype.a" && ar x libharfbuzz.a" && ar x libpng16.a" && ar cru 
> libfreetype.new.a ./*.o && ranlib libfreetype.new.a
>
>
>
> Is there another method to build fontconfig? Is it possible to build 
> fontconfig by only running configure and make?
>
>
>
> Thanks!
>
>
> Regards
>
>
> Andrew
>
>
> At 2018-07-23 22:43:44, "Roger Pack"  wrote:
>>Wonder if it should be
>>or use another configure command : ./configure --disable-shared
>>--enable-static LDFLAGS="-L/usr/local/lib" LIBS="-lfreetype -lharfbuzz
>> -lpng"
>>
>>If that doesn't work maybe the circular dep. with harfbuzz and free
>>type isn't trivial?
>>
>>On Tue, Jul 17, 2018 at 7:20 AM, qw  wrote:
>>> Hi,
>>>
>>>
>>> My environment is Centos 7.4.
>>>
>>>
>>> I want to build static fontconfig and build ffmpeg with static fontconfig. 
>>> I succeed in building static 
>>> libpng/freetype2/harfbuzz/vidstab/fribidi/expat, but I fail to build static 
>>> fontconfig. The following is my building steps:
>>>
>>>
>>> 1) build libpng-1.6.34.tar.gz
>>> ./autogen.sh
>>> ./configure --disable-shared --enable-static
>>> make && make install
>>>
>>>
>>> 2) build freetype-2.9.1.tar.bz2
>>> ./configure --disable-shared --enable-static --with-png=no 
>>> --with-harfbuzz=no
>>> make && make install
>>>
>>>
>>> 3) build harfbuzz-1.7.6.tar.bz2
>>> ./configure --prefix=/usr/local/ --disable-shared --enable-static 
>>> --with-freetype=yes
>>> make && make install
>>>
>>>
>>> 4) rebuild freetype2
>>> make clean && make distclean
>>> ./configure --disable-shared --enable-static --with-png=yes 
>>> --with-harfbuzz=yes
>>> make && make install
>>>
>>>
>>> 5) build georgmartius-vid.stab-v1.1.0-0-g60d65da.tar.gz
>>> cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=0
>>> make && make install
>>>
>>>
>>> 6) build fribidi-1.0.1.tar.gz
>>> ./bootstrap
>>> ./configure --disable-shared --enable-static
>>> make && make install
>>>
>>>
>>> 7) build expat-2.2.5.tar.bz2
>>> ./configure --disable-shared --enable-static
>>> make && make install
>>>
>>>
>>> 8) build fontconfig-2.13.0.tar.bz2
>>> ./configure --disable-shared --enable-static
>>> make
>>>
>>>
>>> Then, make reports error messages as below:
>>> /usr/local/lib/libfreetype.a(sfnt.o): In function `Load_SBit_Png':
>>> sfnt.c:(.text+0x3c49): undefined reference to `png_create_read_struct'
>>> sfnt.c:(.text+0x3c63): undefined reference to `png_create_info_struct'
>>> sfnt.c:(.text+0x3c8b): undefined reference to `png_set_longjmp_fn'
>>> sfnt.c:(.text+0x3cb6): undefined reference to `png_destroy_read_struct'
>>> sfnt.c:(.text+0x3d06): undefined reference to `png_set_read_fn'
>>> sfnt.c:(.text+0x3d1b): undefined reference to `png_read_info'
>>>
>>>
>>> or use another configure command : ./configure --disable-shared 
>>> --enable-static LDFLAGS="-L/usr/local/lib" LIBS="-lharfbuzz -lfreetype 
>>> -lpng"
>>> Then, make reports error messages as below:
>>> /usr/local/lib/libfreetype.a(autofit.o): In function `af_face_globals_free':
>>> autofit.c:(.text+0x2d52): undefined reference to `hb_font_destroy'
>>> autofit.c:(.text+0x2d5b): undefined reference to `hb_buffer_destroy'
>>> /usr/local/lib/libfreetype.a(autofit.o): In function 
>>> `af_shaper_get_coverage':
>>> autofit.c:(.text+0x7544): undefined reference to `hb_font_get_face'
>>> autofit.c:(.text+0x756d): undefined reference to `hb_ot_tags_from_script'
>>> autofit.c:(.text+0x759e): undefined reference to `hb_set_create'
>>> autofit.c:(.text+0x75bb): undefined reference to 
>>> `hb_ot_layout_collect_lookups'
>>> autofit.c:(.text+0x75c3): undefined reference to `hb_set_is_empty'
>>> autofit.c:(.text+0x75ee): undefined reference to `hb_set_destroy'
>>> autofit.c:(.text+0x75f8): undefined reference to `hb_set_destroy'
>>> autofit.c:(.text+0x7602): undefined reference to `hb_set_destroy'
>>>
>>>
>>> How to build static fontconfig?
>>>
>>>
>>> Thanks!
>>>
>>>
>>> Regards
>>>
>>>
>>> Andrew
>>>
>>> ___
>>> 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

Re: [FFmpeg-user] Anyone having success capturing hours of 4k video, reliably and with low loss, using ffmpeg?

2018-08-08 Thread Roger Pack
On Tue, Aug 7, 2018 at 3:15 PM, Gabriel Balaich  wrote:
>>
>> You are missing the question.
>>
>> I am not asking for help to diagnose that simple experiment. I am asking
>> if others have had experience with the top-level goal: capturing hours
>> of 4k video, reliably and with low loss, using ffmpeg.
>>
>> I can use whatever capture card, operating system, CPU, and graphics
>> card are necessary to build a system that works, and costs less than
>> what Vendor A would charge us for their closed system.
>>
>
> I capture 4K60 and 1080P60 simultaneously using one instance of FFmpeg
> with no artifacting (ever) or perceivable loss in quality for 7-8 hours at
> a time
> consistently.
>
> No crazy hardware - a few capture cards (HD60 Pro + Magewell Pro Capture
> HDMI 4K Plus), 6800K, 16GB of RAM, GTX 1050 (handles encoding), and
> an Intel 600P NVME SSD for storage.

Nice.  What codec and/or command line?

Also if anybody's desperate for a "software" solution I might be able
to provide a new video codec that "uses a lot of space but is
screaming fast" let me know if x264 ultrafast isn't fast enough.
Cheers!
___
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] Decoding frames as fast as possible

2018-08-08 Thread Roger Pack
On Tue, Jul 24, 2018 at 2:50 PM, Évan  wrote:
> On Mon, Jul 23, 2018 at 8:45 AM, Roger Pack wrote:
>> Does ffprobe take 20s?
>
> I just tested and "ffprobe.exe -show_entries frame=pkt_pts_time
> bbb_sunflower_1080p_30fps_normal.mp4" does take time to complete.

I also saw this recently:
https://stackoverflow.com/questions/51547517/using-ffprobe-to-get-number-of-keyframes-in-raw-avi-file-without-processing-en#comment90288838_51547517
(hint: consider asking on superuser and/or av.stackexchange)
Anyway my current hypothesis is that ffmpeg has no way to "skip
reading" input as it were...

> I'm using ffprobe version 4.0 [...] built with gcc 7.3.0 (GCC), x64, win32
> zeranoe version.
> From my test, ffprobes takes like 3 minutes and a half when printing the
> result to the console and a minute and a half when output is redirected to a
> file.
>
> My test video is "Big Buck Bunny" 1080p 30FPS MP4 version, md5 sum
> babbe51b47146187a66632daa791484b.
>
> I can send you my test program but I used ffmpeg (and ffprobe) source code
> to write it.
> Moreover, all CPUs are used at 100% when "building the index" so my program
> seems efficient CPU-side.
>
> Regards
>
> PS : I'm not subscribed to the list so please CC me.
___
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] Anyone having success capturing hours of 4k video, reliably and with low loss, using ffmpeg?

2018-08-08 Thread Gabriel Balaich
>
> Nice.  What codec and/or command line?
>
> Also if anybody's desperate for a "software" solution I might be able
> to provide a new video codec that "uses a lot of space but is
> screaming fast" let me know if x264 ultrafast isn't fast enough.
> Cheers!
>

Kind of a huge command:
 ffmpeg -loglevel error -stats -y -thread_queue_size  -indexmem 
-guess_layout_max 0 -f dshow -rtbufsize 2147.48M ^
-i audio="Analog (3+4) (RME Fireface UC)" ^
-thread_queue_size  -indexmem  -guess_layout_max 0 -f dshow
-rtbufsize 2147.48M ^
-i audio="ADAT (3+4) (RME Fireface UC)" ^
-thread_queue_size  -indexmem  -guess_layout_max 0 -f dshow
-video_size 3840x2160 -rtbufsize 2147.48M ^
-framerate 120 -pixel_format nv12 -i video="Video (00 Pro Capture HDMI
4K+)":audio="Audio (00 Pro Capture HDMI 4K+)" ^
-thread_queue_size  -indexmem  -guess_layout_max 0 -f dshow
-video_size 1920x1080 -rtbufsize 2147.48M ^
-framerate 60 -pixel_format yuyv422 -i video="Game Capture HD60 Pro (Video)
(#01)":audio="ADAT (5+6) (RME Fireface UC)" ^
-thread_queue_size  -indexmem  -r 25 -f lavfi -rtbufsize 2147.48M
-i color=c=black:s=50x50 ^
-map 4,0 -map 0 -c:v libx264 -r 25 -rc-lookahead 50 -forced-idr 1
-strict_gop 1 -sc_threshold 0 -flags +cgop ^
-force_key_frames expr:gte(t,n_forced*2) -preset ultrafast -pix_fmt nv12
-b:v 16K -minrate 16K -maxrate 16K -bufsize 16k ^
-c:a aac -ar 44100 -b:a 384k -ac 2 -vf "fps=25" -af "aresample=async=250"
-vsync 1 -ss 00:00:02.456 ^
-max_muxing_queue_size  -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 ^
-segment_format_options max_delay=0
C:\Users\djcim\Videos\PS4\Theirs\TPS%02d.ts ^
-map 4,1 -map 1 -c:v libx264 -r 25 -rc-lookahead 50 -forced-idr 1
-strict_gop 1 -sc_threshold 0 -flags +cgop ^
-force_key_frames expr:gte(t,n_forced*2) -preset ultrafast -pix_fmt nv12
-b:v 16K -minrate 16K -maxrate 16K -bufsize 16k ^
-c:a aac -ar 44100 -b:a 384k -ac 2 -vf "fps=25" -af "aresample=async=250"
-vsync 1 -ss 00:00:01.840 ^
-max_muxing_queue_size  -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 ^
-segment_format_options max_delay=0
C:\Users\djcim\Videos\PS4\Soundboard\SPS%02d.ts ^
-map 2:0,2:1 -map 2:1 -c:v h264_nvenc -r 60 -rc-lookahead 120 -forced-idr 1
-strict_gop 1 -sc_threshold 0 -flags +cgop ^
-force_key_frames expr:gte(t,n_forced*2) -preset: llhp -pix_fmt nv12 -b:v
250M -minrate 250M -maxrate 250M -bufsize 250M ^
-c:a aac -ar 44100 -b:a 384k -ac 2 -af "aresample=async=250" -vsync 1 -ss
00:00:01.096 ^
-max_muxing_queue_size  -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 ^
-segment_format_options max_delay=0 C:\Users\djcim\Videos\PS4\PS4\PS%02d.ts
^
-map 3:0,3:1 -map 3:1 -c:v h264_nvenc -r 60 -rc-lookahead 120 -forced-idr 1
-strict_gop 1 -sc_threshold 0 -flags +cgop ^
-force_key_frames expr:gte(t,n_forced*2) -preset: llhp -pix_fmt yuv420p
-b:v 40M -minrate 40M -maxrate 40M -bufsize 40M ^
-c:a aac -ar 44100 -b:a 384k -ac 2 -af "pan=mono|c0=c0, adelay=120|120,
aresample=async=250" -vsync 1 ^
-max_muxing_queue_size  -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 ^
-segment_format_options max_delay=0
C:\Users\djcim\Videos\PS4\Camera\CPS%02d.ts

Writing to 4 files at once, 2 video (1080P60 + 4K60), and 2 "audio".
All four files are technically video, needed to generate blank video
and link to desired audio so parting would stay in sync with the 2
actual video files.

Many options and the file formats are put in place to ensure
synchronized and consistent parting across all four files. When I
want to record longer files I typically just increase the segment
time as opposed to entirely removing parting options. That being
said if your goal is to simply record one continuous 4K29.97 file
and nothing else with the equipment I have this would suffice:

-thread_queue_size  -indexmem  -f dshow -video_size 3840x2160
-rtbufsize 2147.48M -framerate 3/1001 ^
-pixel_format nv12 -i video="Video (00 Pro Capture HDMI 4K+)" -map 0 -c:v
h264_nvenc -preset: llhp -pix_fmt nv12 ^
-b:v 250M -minrate 250M -maxrate 250M -bufsize 250M -max_muxing_queue_size
 Ouput.mp4

Encoding 4k60 with my 6800K immediately pegs all cores, even
the 7900X in my other PC can't handle it. NVENC seems to be
the only reasonable option, may be different for 4k30 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] buffer underflow - processing VOB files

2018-08-08 Thread Bob DeCarlo
 Hi Carl Eugen and Paul,
I dug into the source code and found the line of code causing the problem, 
referring to commit:
ae9297097696f3d06417a6e8a5368d5f38a6edb4

I rolled back this one line of code and the issue went away:

diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.cindex 
f4618bf215..1015245a90 100644--- a/libavcodec/ac3_parser.c+++ 
b/libavcodec/ac3_parser.c@@ -218,8 +218,8 @@ static int ac3_sync(uint64_t 
state, AACAC3ParseContext *hdr_info, else if (hdr_info->codec_id == 
AV_CODEC_ID_NONE) hdr_info->codec_id = AV_CODEC_ID_AC3; +    
*need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT); 
*new_frame_start  = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);-    
*need_next_header = *new_frame_start || (hdr.frame_type != 
EAC3_FRAME_TYPE_AC3_CONVERT); return hdr.frame_size; }

I reviewed the change set of ae9297097696f3d06417a6e8a5368d5f38a6edb4and see 
support for 16 channel audio was added.  For the legacy case, it looks like 
functionality should be maintained with the exception of setting 
"need_next_header".  My rollback likely breaks the new EAC3 but I just want to 
show what I think is breaking my test case.

My hope is that you will review this change set, and specifically this one line 
of code, to see if you possibly agree. You may not need to try my sample, the 
problem may be visible to you in just reviewing the code.

Thanks and Regards,
Bob



___
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] buffer underflow - processing VOB files

2018-08-08 Thread Bob DeCarlo

 Hi Carl Eugen and Paul,

I dug into the source code and found the line of code causing the problem, 
referring to commit:
ae9297097696f3d06417a6e8a5368d5f38a6edb4

I rolled back this one line of code and the issue went away:

diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index f4618bf215..1015245a90 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -218,8 +218,8 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext 
*hdr_info,
 else if (hdr_info->codec_id == AV_CODEC_ID_NONE)
 hdr_info->codec_id = AV_CODEC_ID_AC3;
 
+    *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
 *new_frame_start  = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);
-    *need_next_header = *new_frame_start || (hdr.frame_type != 
EAC3_FRAME_TYPE_AC3_CONVERT);
 return hdr.frame_size;
 }


I reviewed the change set of ae9297097696f3d06417a6e8a5368d5f38a6edb4and see 
support for 16 channel audio was added.  For the legacy case, it looks like 
functionality should be maintained with the exception of setting 
"need_next_header".  My rollback likely breaks the new EAC3 but I just want to 
show what I think is breaking my test case.

My hope is that you will review this change set, and specifically this one line 
of code, to see if you possibly agree. You may not need to try my sample, the 
problem may be visible to you in just reviewing the code.

Thanks and Regards,
Bob

___
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 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 to build static fontconfig with ffmpeg?

2018-08-08 Thread Reino Wijnsma
On 24-7-2018 08:02, qw  wrote:
> At 2018-07-23 22:43:44, "Roger Pack"  wrote:
>> Wonder if it should be
>> or use another configure command : ./configure --disable-shared
>> --enable-static LDFLAGS="-L/usr/local/lib" LIBS="-lfreetype -lharfbuzz
>> -lpng"
>> If that doesn't work maybe the circular dep. with harfbuzz and free
>> type isn't trivial?
> It doesn't work. I combine libfreetype.a, libharfbuzz.a and libpng16.a into 
> new libfreetype.a, and can succeed in building fontconfig by linking to the 
> new libfreetype.a, i.e.
>
> ar x libfreetype.a" && ar x libharfbuzz.a" && ar x libpng16.a" && ar cru 
> libfreetype.new.a ./*.o && ranlib libfreetype.new.a
>
> Is there another method to build fontconfig? Is it possible to build 
> fontconfig by only running configure and make?
Andrew, how does your FreeType2 pkg-config file ('freetype2.pc') look like?
You're compiling Fontconfig. Fontconfig requires FreeType2, which in turn (in 
your case) requires LibPNG and Harfbuzz.
To have Fontconfig also recognize Freetype2's requirements (LibPNG and 
Harfbuzz) I believe you need to run "pkg-config --static".
I've had this issue before with a library that needed Freetype2. So I believe 
the following should work:

8) build fontconfig-2.13.0.tar.bz2
export PKG_CONFIG="pkg-config --static"
./configure --disable-shared --enable-static
make
unset PKG_CONFIG

-- Reino

___
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] Regarding how to extracting video from RTPpackets using ffmpeg API or Source code

2018-08-08 Thread chetan goni
Hi Moritz,

Bellow i have answered your all question :

Moritz :* What does extracting mean, i.e. what do you expect the output
format to*
*  be? Shall it be transparent, or decoded/raw, or some new format?*

Chetan : I have RTP packets and it contain h262 video codec and PCMU audio
codec.
 How can extract video and audio from those pakets and make output
file
 which can play in VLC or any other media player.


Moritz :  *What kind of RTP packets do you have? A regular RTP stream?*
Chetan :  yes regular RTP strem.



Moritz :* Are you willing to use the ffmpeg command line program, or do you*
* want to programmatically use the libav* libraries?*
Chetan :  Yes ,i am using command line program,

Moritz :* From your previous thread, it is hard to understand whether you
have a*
* good grasp of ffmpeg's concepts yet.*
Chetan : I am bignner ,i don't konw much ffmpeg's concepts and commands

Please provide the any solutions or procedures to follow



Thanks & Regards

Chetan Goni

On Thu, Aug 9, 2018 at 10:37 AM, chetan goni  wrote:

> Hi Moritz,
>
> Bellow i have answered your all question :
>
>
> Moritz : *What does extracting mean, i.e. what do you expect the output
> format to*
> * be? Shall it be transparent, or decoded/raw, or some new
> format?*
>
> Chetan : I have RTP packets and it contain h262 video codec and PCMU audio
> codec.
>  How can extract video and audio from those pakets using FFmpeg
> command line and make output file
>  which can play in VLC or any other media player.
>
>
> Moritz :  What kind of RTP packets do you have? A regular RTP stream?
>
> Chetan :  yes regular RTP strem. For your refernce i have attached .pcap
> file
>
>
>
> Moritz : Are you willing to use the ffmpeg command line program, or do you
>  want to programmatically use the libav* libraries?
> Chetan :  Yes ,i am using command line program,i am using below exe and
> dll's
>
>
>
>
>
> Moritz : From your previous thread, it is hard to understand whether you
> have a
>  good grasp of ffmpeg's concepts yet.
> Chetan : I am beginner ,i don't know much ffmpeg's concepts and commands
>
> Please provide the any solutions or procedures to follow
>
>
>
> Thanks & Regards
>
> Chetan Goni
>
> On Wed, Aug 8, 2018 at 5:52 PM, Moritz Barsnick  wrote:
>
>> [image: Boxbe]  This message is eligible
>> for Automatic Cleanup! (barsn...@gmx.net) Add cleanup rule
>> 
>> | More info
>> 
>>
>> Hello Chetan,
>>
>> On Wed, Aug 08, 2018 at 17:40:14 +0530, chetan goni wrote:
>> > Please provide note on  how to extracting video from RTP packets using
>> > ffmpeg API or Source code
>>
>> You need to be a bit more specific to what you're trying to achieve.
>> - What does extracting mean, i.e. what do you expect the output format to
>>   be? Shall it be transparent, or decoded/raw, or some new format?
>> - What kind of RTP packets do you have? A regular RTP stream?
>> - Are you willing to use the ffmpeg command line program, or do you
>>   want to programmatically use the libav* libraries?
>>
>> It you answered "programatically" to the last question, you should post
>> your issue on the list libav-user.
>>
>> From your previous thread, it is hard to understand whether you have a
>> good grasp of ffmpeg's concepts yet.
>>
>> Cheers,
>> Moritz
>> ___
>> 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".