Unable to play videostreams generated by videosnarf - video-processing

I have wireshark capturing video call between two of my IP call clients. I've generated video streams using videosnarf tool by giving pcap as input. But when I try to play them with ffplay they are not being played.
ffplay H264-media-4.264
ffplay version 4.1.3-0york1~16.04 Copyright (c) 2003-2019 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
configuration: --prefix=/usr --extra-version='0york1~16.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[h264 # 0x7f3158000940] Format h264 detected only with low score of 1, misdetection possible!
[h264 # 0x7f31580020c0] missing picture in access unit with size 1853721
[AVBSFContext # 0x7f3158009500] Invalid NAL unit 0, skipping.
Last message repeated 648 times
[AVBSFContext # 0x7f3158009500] Invalid NAL unit 0, skipping.=0/0
Last message repeated 1924 times
[h264 # 0x7f31580020c0] Invalid NAL unit 0, skipping.
Last message repeated 130 times
[h264 # 0x7f31580020c0] Invalid NAL unit 0, skipping. 0B f=0/0
Last message repeated 2442 times
[h264 # 0x7f31580020c0] no frame!
[h264 # 0x7f3158000940] decoding for stream 0 failed
[h264 # 0x7f3158000940] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, h264, from 'H264-media-4.264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264, none, 25 tbr, 1200k tbn, 50 tbc
[h264 # 0x7f3158003700] Invalid NAL unit 0, skipping.
Last message repeated 2573 times
[h264 # 0x7f3158003700] no frame!
The file H264-media-4.264 is not played even with VLC on windows.

Related

Why is different benchmarks of HD/SD between hdparm and dd tool?

I see some tools to help benchmark HD/SD speed (read and write).
hdparm and dd
I did some benchmarks with these tools:
Input: buffered size = 932 MB
Read speed with dd: 536 MB/s
Write speed with dd: 492 MB/s
Read speed with hdparm: 310.51 MB/s
uncaching:
root#tech_expert:/home/tech_expert# hdparm -W0 /dev/sda5
/dev/sda5:
setting drive write-caching to 0 (off)
write-caching = 0 (off)
read speed with hdparm (caches dropped)
root#tech_expert:/home/tech_expert# sync; echo 3 > /proc/sys/vm/drop_caches
root#tech_expert:/home/tech_expert# time sh -c "sudo hdparm -t /dev/sda5 && sync"
/dev/sda5:
Timing buffered disk reads: 932 MB in 3.00 seconds = 310.51 MB/sec
real 0m6.229s
user 0m0.032s
sys 0m0.798s
write speed with dd (caches dropped)
root#tech_expert:/home/tech_expert# sync; echo 3 > /proc/sys/vm/drop_caches
root#tech_expert:/home/tech_expert# time sh -c "dd if=/dev/zero of=test bs=8k count=113800 && sync"; rm -f test
113800+0 records in
113800+0 records out
932249600 bytes (932 MB, 889 MiB) copied, 1.89512 s, 492 MB/s
real 0m2.686s
user 0m0.018s
sys 0m0.904s
read speed with hdparm (caches used)
root#tech_expert:/home/tech_expert# time sh -c "sudo hdparm -T /dev/sda5 && sync"
/dev/sda5:
Timing cached reads: 23848 MB in 1.99 seconds = 11964.42 MB/sec
real 0m7.127s
user 0m0.260s
sys 0m1.781s
read speed with dd (caches dropped)
Keep the "test" file and execute below command:
root#tech_expert:/home/tech_expert# time sh -c "dd if=test of=/dev/null bs=8k count=113800 && sync"
113800+0 records in
113800+0 records out
932249600 bytes (932 MB, 889 MiB) copied, 1.73958 s, 536 MB/s
real 0m1.775s
user 0m0.098s
sys 0m0.732s
read speed with dd (caches used)
root#tech_expert:/home/tech_expert# time sh -c "dd if=test of=/dev/null bs=8k count=113800 && sync"
113800+0 records in
113800+0 records out
932249600 bytes (932 MB, 889 MiB) copied, 0.198455 s, 4.7 GB/s
real 0m0.230s
user 0m0.026s
sys 0m0.175s
There were big differences between 02 tools.
I don't know I should believe in which result is more trusty?

Xcode executable bundle resource not working with sandboxing, cannot write to "MODULE" file; THROTTLED

In my Cocoa app there is a binary executable resource that is signed by me and runs from within the sandbox. However, it doesn't run successfully, and there is material in its stderr that is not there when I run this call outside of my app. The program I am running is called tbl2asn, provisioned by the US Government and source code is available; this program is compiled along with a bunch of others as part of a library for biological data.
For completeness, this is the exact call I'm using,
tbl2asn -V v -a l1 -t inputfile1 -i inputfile2 -o outputfile
It ultimately generates three files, the one given by -o and two files in the directory from which the program is run which are due to the -V v flag.
I tell Xcode to write the -o file to a NSTemporaryDirectory(), where other files are written successfully with sandboxing on, but it doesn't write the ones I want when Sandboxing is on. Since the process fails the same in the app without the -V v (which for sure causes attempts to write files to where the resources is), it makes me think there is some attempted I/O to disallowed places.
Outside the app, when tbl2asn is run, only a couple unimportant notifications are printed to stderr, but within the app, when I pass forward stderr from the tbl2asn call, this is what I see,
2019-02-28 05:35:47.793894-0800 tbl2asn[67411:9510814] WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.0 instead of 10.14.0. This is not a bug in Gestalt -- it is a documented limitation. Use NSProcessInfo's operatingSystemVersion property to get correct system version number.
Call location:
2019-02-28 05:35:47.796781-0800 tbl2asn[67411:9510814] 0 CarbonCore 0x00007fff3a2a5464 ___Gestalt_SystemVersion_block_invoke + 112
2019-02-28 05:35:47.796797-0800 tbl2asn[67411:9510814] 1 libdispatch.dylib 0x000000010073a7f3 _dispatch_client_callout + 8
2019-02-28 05:35:47.796808-0800 tbl2asn[67411:9510814] 2 libdispatch.dylib 0x000000010073c4bb _dispatch_once_callout + 87
2019-02-28 05:35:47.796819-0800 tbl2asn[67411:9510814] 3 CarbonCore 0x00007fff3a246665 _Gestalt_SystemVersion + 946
2019-02-28 05:35:47.796829-0800 tbl2asn[67411:9510814] 4 CarbonCore 0x00007fff3a23fae8 Gestalt + 147
2019-02-28 05:35:47.796840-0800 tbl2asn[67411:9510814] 5 tbl2asn 0x000000010037a806 Nlm_GetOpSysString + 22
2019-02-28 05:35:47.796850-0800 tbl2asn[67411:9510814] 6 tbl2asn 0x0000000100002a63 Nlm_Main + 6163
REMOVED: dtruss output.
UPDATE: I have pinpointed the problem but I don't understand what is going on.
SYNOPSIS: Examining fs_usage in and outside the sandbox revealed this difference:
In the sandbox, the opening fails and subsequent write calls do not happen to a thing called toasn3.msg. In the fs_usage output from the sandboxed run it says THROTTLED; this is absent from the non-sandboxed call, where instead it has a lot of lines like this,
22:52:23.615921 write F=4 B=0x1000
0.000023 tbl2asn.2073266
where write calls are made to the toasn3.msg thing, here the ID is tbl2asn.2073266
Here is the failed sandboxed-run attempt fs_usage,
22:38:36.043193 stat64 [ 2] toasn3.msg 0.000008 tbl2asn.2070594
22:38:36.043203 open [ 2] (R_____) toasn3.msg 0.000007 tbl2asn.2070594
22:38:36.060833 THROTTLED 0.200916 mds_stores.2069534
22:38:36.060834 PAGE_IN_FILE A=0x0104af5000 0.201197 mds_stores.2069534
22:38:36.061164 PgIn[AT3P] D=0x01faa58e B=0x1000 /dev/disk1s1 /.Spotlight-V100/Store-V2/C6256897-E180-4650-85BD-78E01145E16F/reverseDirectoryStore 0.000279 W mds_stores.2069534
22:38:36.061165 PgIn[AT3P] D=0x01fab2ed B=0x1000 /dev/disk1s1 /.Spotlight-V100/Store-V2/C6256897-E180-4650-85BD-78E01145E16F/reverseDirectoryStore 0.000224 W mds_stores.2069534
22:38:36.061169 PgIn[AT3P] D=0x01fa9eca B=0x1000 /dev/disk1s1 /.Spotlight-V100/Store-V2/C6256897-E180-4650-85BD-78E01145E16F/reverseDirectoryStore 0.000208 W mds_stores.2069534
22:38:36.061187 PgIn[AT3P] D=0x0060614d B=0x1000 /dev/disk1s1 /.Spotlight-V100/Store-V2/C6256897-E180-4650-85BD-78E01145E16F/reverseDirectoryStore 0.000211 W mds_stores.2069534
22:38:36.091770 ioctl F=2 [ 25] <CMD=0x4004667a> 0.000003 tbl2asn.2070594
22:38:36.091772 ioctl F=2 [ 25] <CMD=0x40487413> 0.000001 tbl2asn.2070594
22:38:36.091791 write F=2 B=0x25 0.000005 tbl2asn.2070594
22:38:36.091794 ioctl F=0 <CMD=0x4004667a> 0.000003 tbl2asn.2070594
22:38:36.091798 ioctl F=2 [ 25] <CMD=0x4004667a> 0.000001 tbl2asn.2070594
22:38:36.091799 ioctl F=2 [ 25] <CMD=0x40487413> 0.000001 tbl2asn.2070594
22:38:36.091802 write F=2 B=0x25 0.000001 tbl2asn.2070594
22:38:36.091804 ioctl F=0 <CMD=0x4004667a> 0.000001 tbl2asn.2070594
22:38:36.091859 open [ 2] (_WC_T_) private/var/folders/8m/bqlpqcq17x1_mgjkg81s2grw0000gn/T/1D6BF273-0837-427B-BA21-ACDB6A2C514D-4072-00001FC00236C89B>>>>>> 0.000049 tbl2asn.2070594
22:38:36.092838 close F=3 0.000010 tbl2asn.2070594
22:38:36.094428 read F=15 B=0x0 0.282789 SeqKing.2069951
22:38:36.094450 exit 0.000059 tbl2asn.2070594
here is the definition of toasn3.msg. What is this thing?
MODULE toasn3
$$ ORGANISM, 1
$^ Empty, 1, SEV_WARNING
$^ NotFound, 2, SEV_WARNING
$^ Diff, 3, SEV_WARNING
$$ SOURCE, 2
$^ MultipleQualifiers, 1, SEV_WARNING
$^ DiffQualifiers, 2, SEV_WARNING
$^ Identical, 3, SEV_WARNING
$^ NotFound, 4, SEV_WARNING
$^ GeneticCode, 5, SEV_WARNING
$^ UnwantedQualifiers, 6, SEV_WARNING
$^ MissingOrganism, 7, SEV_WARNING
$^ NotFoundWHole, 9, SEV_WARNING
$^ Multiple, 10, SEV_WARNING
$^ Diff, 11, SEV_WARNING
$^ QualDiffValues, 12, SEV_WARNING
$^ IllegalQual, 13, SEV_WARNING
$^ QualUnknown, 14, SEV_INFO
$$ TAXONOMY, 4
$^ GeneticCode, 1, SEV_ERROR
$$ FEATURE, 5
$^ CannotMapDnaLocToAALoc, 1, SEV_ERROR
$^ BadLocation, 2, SEV_WARNING
$^ CDSNotFound, 3, SEV_WARNING

LoadI command is not recognized in MARIE simulator

I downloaded the MARIE simulator from a site that is no longer available and wrote a small program which just declares an array of hexadecimal numbers and then attempts to retrieve one of those numbers using the address.
The problem is that the assembler complains that loadi is not a recognized instruction. If I use load rather than loadi, it will assemble and run and print the expected output (the address of the value I want).
I believe loadi should work and is the instruction I need because of my previous understanding of it which is that it will load the value found at the address given by the operand, as well as some documentation I found on sites like this one and this one.
Why is loadi not recognized? Am I doing something wrong? Maybe there are different versions of MARIE with varying support for some of the instructions?
My MARIE code:
ORG 0
JUMP start
BADDR, hex 0003 / Date_B = 0003
EADDR, hex 001A / Date_E = 001A
/ data section begins
Data_B, hex 0102 / data begin address 3
hex 0105 / dec 261
hex 0106 / dec 262
hex 0108 / dec 264
hex 011A / dec 282
hex 0120 / dec 288
hex 0225 / dec 549
hex 0230 / dec 560 10
hex 0231 / dec 561
hex 0238 / dec 568
hex 0339 / dec 825
hex 0350 / dec 848
hex 0459 / dec 1113 000F
hex 055F / dec 1375
hex 066A / dec 1642
hex 0790
hex 08AB
hex 09AF
hex 0AB9
hex 0BBD
hex 0CC1
hex 0DCA
hex 0EFE / 0019
Data_E, hex 0FFE / data end address 001A
Count, dec 24 / the number of data
start, loadi mid
output
halt
mid, hex 000F / starting mid point
The problem was in fact that the particular version of MARIE I was using did not support the instruction. I downloaded the MARIE simulator from a different site and it works great. Problem solved.

New PocketSphinx user: "Segmentation fault: 11" error upon following official getting started guide

I am a new PocketSphinx user. I just followed the official getting started guide
However, I begin having difficulties when I get to this step:
"To test the installation, run pocketsphinx_continuous -inmic yes and check that it recognizes words you speak into your microphone."
I've attached my terminal output that I receive when I type this command, which ultimately results in 'Segmentation fault: 11'
Any help would be greatly appreciated.
Thanks,
Nakul
nakul : ~ 101 $ pocketsphinx_continuous -inmic yes
INFO: pocketsphinx.c(152): Parsed model-specific feature parameters from /usr/local/share/pocketsphinx/model/en-us/en-us/feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn live batch
-cmninit 40,3,-1 41.00,-5.29,-0.12,5.09,2.48,-4.07,-1.37,-1.78,-5.08,-2.05,-6.45,-1.42,1.17
-compallsen no no
-debug 0
-dict /usr/local/share/pocketsphinx/model/en-us/cmudict-en-us.dict
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm /usr/local/share/pocketsphinx/model/en-us/en-us
-input_endian little little
-jsgf
-keyphrase
-kws
-kws_delay 10 10
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1 1.000000e+00
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 22
-lm /usr/local/share/pocketsphinx/model/en-us/en-us.lm.bin
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.300000e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec 0-12/13-25/26-38
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 20 20
-vad_startspeech 10 10
-vad_threshold 2.0 2.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02
INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='batch', VARNORM='no', AGC='none'
INFO: acmod.c(162): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(149): Reading HMM transition probability matrices: /usr/local/share/pocketsphinx/model/en-us/en-us/transition_matrices
INFO: acmod.c(113): Attempting to use PTM computation module
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/means
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/variances
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(304): 222 variance values floored
INFO: ptm_mgau.c(476): Loading senones from dump file /usr/local/share/pocketsphinx/model/en-us/en-us/sendump
INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(563): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(838): Maximum top-N: 4
INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
INFO: dict.c(320): Allocating 138824 * 32 bytes (4338 KiB) for word entries
INFO: dict.c(333): Reading main dictionary: /usr/local/share/pocketsphinx/model/en-us/cmudict-en-us.dict
INFO: dict.c(213): Dictionary size 134723, allocated 1016 KiB for strings, 1679 KiB for phones
INFO: dict.c(336): 134723 words read
INFO: dict.c(358): Reading filler dictionary: /usr/local/share/pocketsphinx/model/en-us/en-us/noisedict
INFO: dict.c(213): Dictionary size 134728, allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(361): 5 words read
INFO: dict2pid.c(396): Building PID tables for dictionary
INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
INFO: dict2pid.c(132): Allocated 42672 bytes (41 KiB) for word-final triphones
INFO: dict2pid.c(196): Allocated 42672 bytes (41 KiB) for single-phone word triphones
INFO: ngram_model_trie.c(354): Trying to read LM in trie binary format
INFO: ngram_search_fwdtree.c(74): Initializing search tree
INFO: ngram_search_fwdtree.c(101): 791 unique initial diphones
INFO: ngram_search_fwdtree.c(186): Creating search channels
INFO: ngram_search_fwdtree.c(323): Max nonroot chan increased to 152609
INFO: ngram_search_fwdtree.c(333): Created 723 root, 152481 non-root channels, 53 single-phone words
INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
INFO: continuous.c(307): pocketsphinx_continuous COMPILED ON: Sep 6 2018, AT: 19:28:29
INFO: continuous.c(252): Ready....
Segmentation fault: 11
nakul : ~ 102 $ defaults write com.apple.finder AppleShowAllFiles YES.

Get correct framerate from ffmpeg

Good day,
I have a problem. I need to get correct framerate from ffmpeg libs..
I tried to use
pFormatCtx->streams[videoStream]->avg_frame_rate.num
return of avg_frame_rate is 2997. But when I dumped meta info, I got:
Input #0, avi, from '/test.avi':
Metadata:
encoder : MEncoder SVN-r33883(20110719-gcc4.5.2)
Duration: 00:49:47.70, start: 0.000000, bitrate: 1294 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 856x480 [SAR 1:1 DAR 107:60], 1090 kb/s, SAR 491520:492521 DAR 8192:4603, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 192 kb/s
2015-09-20 15:47:02.377 TV3[21607:769601] ready to start audio
sample rate is: 23.98fps. What value is correct and why are they different?
So, what's in pFormatCtx->streams[videoStream]->avg_frame_rate.den?
I bet it's 125 then. AVStream::avg_frame_rate is of type AVRational, a structure holding a rational number as a fraction. To get a decimal value, you have to divide num by den.
-> 2997 / 125 = 23.976

Resources