display frame <PRIV> in mp3/wav - mp3

I have mp3 files where they have been edited by a proprietary software of the id3v2 tag information stored in private frames . Is there a solution to be able to trace the name of the field with which it was stored? I would like to be able to access this field with the MP3Tag software to be able to read that value and move it to another tag field to convert archives from one software to another.
is there a solution?

I downloaded your file, and tried to run the software at beaglebuddy.com on it. The output from a modified Basic.java (I removed the part writing new data to the mp3) is below.
This output is based on the "known tags" included in the program. As far as I can deduce, there are two frames where there is the option of it being private, but it is not, so potentially, if you update the source with the information about how to read the private tags, you can get a working program, that can do as you want.
mp3 file.....: Y:\mp3reader\Queen-WeWillRockYou.mp3
mp3 file size: 2903308 bytes
audio size...: 2901089 bytes
codec........: MPEG 1 Layer III
bit rate.....: 192 kbits/s
bit rate type: CBR
frequency....: 44100 hz
channel mode.: Joint Stereo
ID3v2.4 tag..: ID3v2.4 tag
num frames: 8
tag size..: 171 bytes
padding...: 2048 bytes
ID3v2.4 tag header
bytes..................: 10 bytes
0x49 0x44 0x33 0x04 0x00 0x00 0x00 0x00 0x11 0x21
version................: ID3v2.4
tag size...............: 2209 bytes
unsynchronization......: false
extended header present: false
experimental indicator.: false
footer present.........: false
ID3v2.4 frame: ALBUM_TITLE
frame header
bytes..................: 0x54 0x41 0x4C 0x42 0x00 0x00 0x00 0x13 0x00 0x00
frame type.............: TALB: ALBUM_TITLE - album/movie/show title
frame header size......: 10
frame body size........: 19
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 19 bytes
0x03 0x6E 0x65 0x77 0x73 0x20 0x4F 0x66 0x20 0x54 0x68 0x65 0x20 0x57 0x6F 0x72
0x6C 0x64 0x00
encoding: 3 - UTF-8
text....: news Of The World
ID3v2.4 frame: LEAD_PERFORMER
frame header
bytes..................: 0x54 0x50 0x45 0x31 0x00 0x00 0x00 0x07 0x00 0x00
frame type.............: TPE1: LEAD_PERFORMER - lead performer(s)/soloist(s)
frame header size......: 10
frame body size........: 7
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 7 bytes
0x03 0x51 0x55 0x45 0x45 0x4E 0x00
encoding: 3 - UTF-8
text....: QUEEN
ID3v2.4 frame: CONTENT_TYPE
frame header
bytes..................: 0x54 0x43 0x4F 0x4E 0x00 0x00 0x00 0x06 0x00 0x00
frame type.............: TCON: CONTENT_TYPE - content type
frame header size......: 10
frame body size........: 6
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 6 bytes
0x03 0x52 0x4F 0x43 0x4B 0x00
encoding: 3 - UTF-8
text....: ROCK
ID3v2.4 frame: LANGUAGE
frame header
bytes..................: 0x54 0x4C 0x41 0x4E 0x00 0x00 0x00 0x09 0x00 0x00
frame type.............: TLAN: LANGUAGE - language(s)
frame header size......: 10
frame body size........: 9
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 9 bytes
0x03 0x45 0x4E 0x47 0x4C 0x49 0x53 0x48 0x00
encoding: 3 - UTF-8
text....: ENGLISH
ID3v2.4 frame: SONG_TITLE
frame header
bytes..................: 0x54 0x49 0x54 0x32 0x00 0x00 0x00 0x12 0x00 0x00
frame type.............: TIT2: SONG_TITLE - title/songname/content description
frame header size......: 10
frame body size........: 18
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 18 bytes
0x03 0x57 0x45 0x20 0x57 0x49 0x4C 0x4C 0x20 0x52 0x4F 0x43 0x4B 0x20 0x59 0x4F
0x55 0x00
encoding: 3 - UTF-8
text....: WE WILL ROCK YOU
ID3v2.4 frame: TRACK_NUMBER
frame header
bytes..................: 0x54 0x52 0x43 0x4B 0x00 0x00 0x00 0x03 0x00 0x00
frame type.............: TRCK: TRACK_NUMBER - track number/position in set
frame header size......: 10
frame body size........: 3
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 3 bytes
0x00 0x31 0x00
encoding: 0 - ISO-8859-1
text....: 1
ID3v2.4 frame: RECORDING_TIME
frame header
bytes..................: 0x54 0x44 0x52 0x43 0x00 0x00 0x00 0x06 0x00 0x00
frame type.............: TDRC: RECORDING_TIME - recording date/time
frame header size......: 10
frame body size........: 6
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 6 bytes
0x00 0x31 0x39 0x37 0x37 0x00
encoding: 0 - ISO-8859-1
text....: 1977
ID3v2.4 frame: USER_DEFINED_TEXT_INFORMATION
frame header
bytes..................: 0x54 0x58 0x58 0x58 0x00 0x00 0x00 0x0D 0x00 0x00
frame type.............: TXXX: USER_DEFINED_TEXT_INFORMATION - user defined text information frame
frame header size......: 10
frame body size........: 13
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: user defined text information
bytes......: 13 bytes
0x03 0x49 0x4E 0x54 0x52 0x4F 0x00 0x31 0x32 0x30 0x30 0x30 0x00
encoding...: 3 - UTF-8
description: INTRO
text.......: 12000
ID3v2.4 tag footer: none
mpeg audio frame
file position......: 2219
mpeg audio frame header
size............: 4
bytes...........: 0xFF 0xFA 0xB2 0x40
MPEG version....: MPEG 1
MPEG layer......: Layer III
protected.by CRC: true
bit rate........: 192 kbit/s
frequency.......: 44100 hz
frame is padded.: true
private bit.....: false
channel mode....: Joint Stereo
mode extension..: intensity stereo: off, MS stereo: off
copyrighted.....: false
original media..: false
emphasis........: None
frame size......: 627 bytes
num samples.....: 1152
side info size..: 32 bytes
mpeg audio frame side information
size.: 32 bytes
bytes: 0x00 0x00 0x04 0xE6 0x42 0xBE 0xE8 0xC6 0x42 0xE0 0x59 0xC5 0xB7 0xCD 0x18 0x63
0x5A 0x40 0x28 0x01 0x14 0x00 0x00 0x00 0x20 0x00 0x00 0x25 0xC0 0x00 0x00 0x04
mpeg audio frame audio samples
size.: 589 bytes
ID3v1.0 tag
file position: 2903180
title........: WE WILL ROCK YOU
artist.......: QUEEN
album........: news Of The World
year.........: 1977
comment......: news Of The World
track........: 0
genre........: 0 - Blues
codec..............: MPEG 1 Layer III
bit rate...........: 192 kbits/s
bit rate type......: CBR
frequency..........: 44100 hz
audio duration.....: 0 s
audio size.........: 2901089 bytes
album..............: news Of The World
artist.............: null
contributing artist: QUEEN
lyrics by..........: null
music by...........: null
picture............: null
publisher..........: null
rating.............: 0
title..............: WE WILL ROCK YOU
track #............: 1
year recorded......: 1977
lyrics.............: null
mp3 file.....: Y:\mp3reader\Queen-WeWillRockYou.mp3
mp3 file size: 2903308 bytes
audio size...: 2901089 bytes
codec........: MPEG 1 Layer III
bit rate.....: 192 kbits/s
bit rate type: CBR
frequency....: 44100 hz
channel mode.: Joint Stereo
ID3v2.4 tag..: ID3v2.4 tag
num frames: 9
tag size..: 171 bytes
padding...: 2048 bytes
ID3v2.4 tag header
bytes..................: 10 bytes
0x49 0x44 0x33 0x04 0x00 0x00 0x00 0x00 0x11 0x21
version................: ID3v2.4
tag size...............: 2209 bytes
unsynchronization......: false
extended header present: false
experimental indicator.: false
footer present.........: false
ID3v2.4 frame: ALBUM_TITLE
frame header
bytes..................: 0x54 0x41 0x4C 0x42 0x00 0x00 0x00 0x13 0x00 0x00
frame type.............: TALB: ALBUM_TITLE - album/movie/show title
frame header size......: 10
frame body size........: 19
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 19 bytes
0x03 0x6E 0x65 0x77 0x73 0x20 0x4F 0x66 0x20 0x54 0x68 0x65 0x20 0x57 0x6F 0x72
0x6C 0x64 0x00
encoding: 3 - UTF-8
text....: news Of The World
ID3v2.4 frame: LEAD_PERFORMER
frame header
bytes..................: 0x54 0x50 0x45 0x31 0x00 0x00 0x00 0x07 0x00 0x00
frame type.............: TPE1: LEAD_PERFORMER - lead performer(s)/soloist(s)
frame header size......: 10
frame body size........: 7
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 7 bytes
0x03 0x51 0x55 0x45 0x45 0x4E 0x00
encoding: 3 - UTF-8
text....: QUEEN
ID3v2.4 frame: CONTENT_TYPE
frame header
bytes..................: 0x54 0x43 0x4F 0x4E 0x00 0x00 0x00 0x06 0x00 0x00
frame type.............: TCON: CONTENT_TYPE - content type
frame header size......: 10
frame body size........: 6
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 6 bytes
0x03 0x52 0x4F 0x43 0x4B 0x00
encoding: 3 - UTF-8
text....: ROCK
ID3v2.4 frame: LANGUAGE
frame header
bytes..................: 0x54 0x4C 0x41 0x4E 0x00 0x00 0x00 0x09 0x00 0x00
frame type.............: TLAN: LANGUAGE - language(s)
frame header size......: 10
frame body size........: 9
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 9 bytes
0x03 0x45 0x4E 0x47 0x4C 0x49 0x53 0x48 0x00
encoding: 3 - UTF-8
text....: ENGLISH
ID3v2.4 frame: SONG_TITLE
frame header
bytes..................: 0x54 0x49 0x54 0x32 0x00 0x00 0x00 0x12 0x00 0x00
frame type.............: TIT2: SONG_TITLE - title/songname/content description
frame header size......: 10
frame body size........: 18
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 18 bytes
0x03 0x57 0x45 0x20 0x57 0x49 0x4C 0x4C 0x20 0x52 0x4F 0x43 0x4B 0x20 0x59 0x4F
0x55 0x00
encoding: 3 - UTF-8
text....: WE WILL ROCK YOU
ID3v2.4 frame: TRACK_NUMBER
frame header
bytes..................: 0x54 0x52 0x43 0x4B 0x00 0x00 0x00 0x03 0x00 0x00
frame type.............: TRCK: TRACK_NUMBER - track number/position in set
frame header size......: 10
frame body size........: 3
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 3 bytes
0x00 0x31 0x00
encoding: 0 - ISO-8859-1
text....: 1
ID3v2.4 frame: RECORDING_TIME
frame header
bytes..................: 0x54 0x44 0x52 0x43 0x00 0x00 0x00 0x06 0x00 0x00
frame type.............: TDRC: RECORDING_TIME - recording date/time
frame header size......: 10
frame body size........: 6
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 6 bytes
0x00 0x31 0x39 0x37 0x37 0x00
encoding: 0 - ISO-8859-1
text....: 1977
ID3v2.4 frame: USER_DEFINED_TEXT_INFORMATION
frame header
bytes..................: 0x54 0x58 0x58 0x58 0x00 0x00 0x00 0x0D 0x00 0x00
frame type.............: TXXX: USER_DEFINED_TEXT_INFORMATION - user defined text information frame
frame header size......: 10
frame body size........: 13
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: user defined text information
bytes......: 13 bytes
0x03 0x49 0x4E 0x54 0x52 0x4F 0x00 0x31 0x32 0x30 0x30 0x30 0x00
encoding...: 3 - UTF-8
description: INTRO
text.......: 12000
ID3v2.4 frame: LENGTH
frame header
bytes..................: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
frame type.............: TLEN: LENGTH - length of the song (in ms)
frame header size......: 10
frame body size........: 0
tag alter preservation: false
file alter preservation: false
read only..............: false
compression............: false
encryption.............: false
grouping identity......: false
uncompressed size......: 0
encryption method......: 0
unsynchronized.........: false
data length indicator..: 0
group Id...............: 0
frame body: text information
bytes...: 0 bytes
encoding: 0 - ISO-8859-1
text....: 120000
ID3v2.4 tag footer: none
mpeg audio frame
file position......: 2219
mpeg audio frame header
size............: 4
bytes...........: 0xFF 0xFA 0xB2 0x40
MPEG version....: MPEG 1
MPEG layer......: Layer III
protected.by CRC: true
bit rate........: 192 kbit/s
frequency.......: 44100 hz
frame is padded.: true
private bit.....: false
channel mode....: Joint Stereo
mode extension..: intensity stereo: off, MS stereo: off
copyrighted.....: false
original media..: false
emphasis........: None
frame size......: 627 bytes
num samples.....: 1152
side info size..: 32 bytes
mpeg audio frame side information
size.: 32 bytes
bytes: 0x00 0x00 0x04 0xE6 0x42 0xBE 0xE8 0xC6 0x42 0xE0 0x59 0xC5 0xB7 0xCD 0x18 0x63
0x5A 0x40 0x28 0x01 0x14 0x00 0x00 0x00 0x20 0x00 0x00 0x25 0xC0 0x00 0x00 0x04
mpeg audio frame audio samples
size.: 589 bytes
ID3v1.0 tag
file position: 2903180
title........: WE WILL ROCK YOU
artist.......: QUEEN
album........: news Of The World
year.........: 1977
comment......: news Of The World
track........: 0
genre........: 0 - Blues

JoSSte
Thank you very much for your help.
So let's do it, since you managed to retrieve information from mp3 files. Even if I tried to read all I can not find the information I need.
I put in this file * .RAR >>>> www.iscriviti.altervista.org/MP3_PRIV_TAG.rar
TWO MP3 files, the same song only that one is Original, with only primary tags edited by the Ripping program (media player), and the other file has been edited with the Software that generates the PRIVATE TAGS .
So at least I think it's easier to compare and see which lines of code are added by private tag software.
I hope you can go back to the data or better to the name of the labels where the data that interest me are stored.
I tried to use those software, files that you have linked but I honestly do not understand how to get them started.

Related

Match REGEX for each section in a continuos full log file

I have a full log from a video conversion file, and it looks like this:
--------------------------------------------------------------------------------
D:\destination\vid1.mp4
--------------------------------------------------------------------------------
[mov,mp4,m4a,3gp,3g2,mj2 # 0000020179e89280] st: 1 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 # 0000020179e89280] st: 1 edit list 1 Cannot find an index entry before timestamp: 0.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\source\vid1.mp4':
Metadata:
major_brand : M4V
minor_version : 1
compatible_brands: isomavc1mp42
creation_time : 2020-02-18T20:21:00.000000Z
Duration: 00:49:31.71, start: 0.000000, bitrate: 5135 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5001 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2020-02-18T20:21:00.000000Z
handler_name : ETI ISO Video Media Handler
encoder : Elemental H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2020-02-18T20:21:00.000000Z
handler_name : ETI ISO Audio Media Handler
avcuvid: --sub-copy/--vpp-subburn is set, but no subtitle stream found.
Max B frames are 0 frames.
NVEncC (x64) 4.69 (r1408) by rigaya, Mar 25 2020 13:57:52 (VC 1916/Win/avx2)
OS Version Windows 10 x64 (18363)
CPU Intel Core i7-7700HQ # 2.80GHz [TB: 3.59GHz] (4C/8T)
GPU #0: GeForce GTX 1080 with Max-Q Design (2560 cores, 1468 MHz)[PCIe3x16][442.19]
NVENC / CUDA NVENC API 9.1, CUDA 10.2, schedule mode: auto
Input Buffers CUDA, 17 frames
Input Info avcuvid: H.264/AVC, 1280x720, 30000/1001 fps
Vpp Filters cspconv(nv12 -> p010)
Output Info H.265/HEVC main10 # Level auto
1280x720p 1:1 29.970fps (30000/1001fps)
avwriter: hevc, aac => mp4
Encoder Preset default
Rate Control CQP I:23 P:23 B:23
Lookahead off
GOP length 300 frames
B frames 0 frames [ref mode: disabled]
Ref frames 3 frames
AQ off
CU max / min auto / auto
Others mv:auto
Output #0, mp4, to 'D:\destination\vid1.mp4':
Metadata:
encoding_tool : NVEncC (x64) 4.69
encoder : Lavf58.35.101
Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 240k tbn (default)
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2020-02-18T20:21:00.000000Z
handler_name : ETI ISO Audio Media Handler
[mp4 # 0000020115d9b780] Starting second pass: moving the moov atom to the beginning of the file
encoded 89062 frames, 699.78 fps, 1682.57 kbps, 596.06 MB
encode time 0:02:07, CPU: 15.4%, GPU: 12.6%, VE: 96.3%, VD: 54.7%, GPUClock: 1705MHz, VEClock: 1529MHz
frame type IDR 297
frame type I 297, avgQP 23.00, total size 10.85 MB
frame type P 88765, avgQP 23.00, total size 585.21 MB
--------------------------------------------------------------------------------
D:\destination\vid2.mp4
--------------------------------------------------------------------------------
[wmv3 # 000001fcd4217a80] Extra data: 8 bits left, value: 0
Input #0, asf, from 'C:\source\vid2.mp4':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: M1
WM/WMADRCPeakReference: 32767
WM/WMADRCPeakTarget: 32767
WM/WMADRCAverageReference: 6067
WM/WMADRCAverageTarget: 6067
WMFSDKVersion : 11.0.6000.6346
IsVBR : 0
Duration: 00:29:48.19, start: 0.000000, bitrate: 2628 kb/s
Stream #0:0(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 720x480, 2500 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
Stream #0:1(eng): Audio: wmapro (b[1][0][0] / 0x0162), 48000 Hz, stereo, fltp, 128 kb/s
avcuvid: --sub-copy/--vpp-subburn is set, but no subtitle stream found.
avcuvid: codec wmv3(yuv420p) unable to decode by cuvid.
failed to initialize file reader(s).
Failed to open input file.
--------------------------------------------------------------------------------
D:\destination\vid3.mp4
--------------------------------------------------------------------------------
[wmv3 # 000001fcd4217a80] Extra data: 8 bits left, value: 0
Input #0, asf, from 'C:\source\vid3.mp4':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: M1
WM/WMADRCPeakReference: 32767
WM/WMADRCPeakTarget: 32767
WM/WMADRCAverageReference: 6067
WM/WMADRCAverageTarget: 6067
WMFSDKVersion : 11.0.6000.6346
IsVBR : 0
Duration: 00:29:48.19, start: 0.000000, bitrate: 2628 kb/s
Stream #0:0(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 720x480, 2500 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
Stream #0:1(eng): Audio: wmapro (b[1][0][0] / 0x0162), 48000 Hz, stereo, fltp, 128 kb/s
avcuvid: --sub-copy/--vpp-subburn is set, but no subtitle stream found.
avcuvid: codec wmv3(yuv420p) unable to decode by cuvid.
failed to initialize file reader(s).
Failed to open input file.
Form that log, each video conversion log is divided in section, separated by the repeated dash. I'm trying to get the source full file name that failed to convert, in this case, C:\source\vid2.mp4 and C:\source\vid3.mp4. Using this regex pattern below however, I get one matched result (vid3.mp4) and one mismatched (vid1.mp4), it matches from line 6 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\source\vid1.mp4': to the end of the log.
(?sm)Input #(?<number>\d+).*?from '(?<filename>.*?)'.*?[A-Za-z]ailed to
Any idea how to solve this? Thanks in advance.
You could start matching the line that consists of only hyphens followed by matching the line that matches the Input with group number
Then continue matching all the lines that do not start with a hyphen and then match failed to
(?m)^-+(?:\r?\n(?!-|Input #\d).*)*\r?\nInput #(?<number>\d+).*?from '(?<filename>[^'\r\n]+)':(?>\r?\n(?!-).*)*\r?\nfailed to
In parts
(?m) Inline multiline modifier
^ Start of string
-+(?:\r?\n Match a line with only hyphens followed by a newline
(?!-|Input #\d).*)* Match all the following lines that do not start with a hyphen or Input
\r?\nInput #(?<number>\d+) Match a newline, Input # and capture the number
.*?from Match as least chars as possible to from and space
'(?<filename>[^'\r\n]+)': Capture filename between single quotes and match :
(?>\r?\n(?!-).*)* Match all following lines that do not start with a hyphen using an atomic group
\r?\nfailed to Match a newline followed by failed to
Regex demo

Reading from serial problems with Amazon FreeRTOS

I am attempting to read from the uart2 on an ESP32 DevKitC clone on a task thread.
My code is as follows:
uint8_t data[128];
data[0] = '\0'; //null terminate so we don't print garbage
for( ; ; ) {
//get a chunk of data off the FIFO buffer
const int uart_num = UART_NUM_2;
int length = 0;
IotLogInfo( "preread" );
length = uart_read_bytes(uart_num, data, 10, 1000 / portTICK_RATE_MS); //read 10 bytes or time out after a second.
if(length == -1)
IotLogInfo( "read reported error! -1" );
//did we rx anything?
if(length > 0){
data[length] = '\0'; //null terminate the string
IotLogInfo( "Rx: %i bytes", length );
IotLogInfo( "Rx: %s ", data );
}
else{
IotLogInfo( "rx no data" );
}
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
For some reason char 2 and 3 of the transmitted string "UVW" are getting messed with, even if the buffer holds more than a single transmission:
122 4911 [_readSerialForM] [INFO ][DEMO][49110] preread
123 5011 [_readSerialForM] [INFO ][DEMO][50110] Rx: 3 bytes
124 5011 [_readSerialForM] [INFO ][DEMO][50110] Rx: U⸮⸮
126 5011 [_readSerialForM] [INFO ][DEMO][50110] preread
127 5111 [_readSerialForM] [INFO ][DEMO][51110] Rx: 3 bytes
128 5111 [_readSerialForM] [INFO ][DEMO][51110] Rx: U⸮⸮
130 5111 [_readSerialForM] [INFO ][DEMO][51110] preread
131 5510 [_readSerialForM] [INFO ][DEMO][55100] Rx: 12 bytes
132 5510 [_readSerialForM] [INFO ][DEMO][55100] Rx: U⸮⸮U⸮⸮U⸮⸮U⸮⸮
134 5510 [_readSerialForM] [INFO ][DEMO][55100] preread
135 5710 [_readSerialForM] [INFO ][DEMO][57100] Rx: 6 bytes
136 5710 [_readSerialForM] [INFO ][DEMO][57100] Rx: U⸮⸮U⸮⸮
138 5710 [_readSerialForM] [INFO ][DEMO][57100] preread
139 5910 [_readSerialForM] [INFO ][DEMO][59100] Rx: 6 bytes
140 5910 [_readSerialForM] [INFO ][DEMO][59100] Rx: U⸮⸮U⸮⸮
"UVW" should be 0x55 x56 x57 but it appears it's being interpreted as "0x55 0xD5 0xFD", what's even weirder is if I send "UUU" to the serial which should be "0x55 0x55 0x55" it arrives as "0x55 0x55 0xF5", which is very weird as byte #2 isn't being malformed when its a repeat of the byte before it.
I have independently verified the transmission with an arduino and it reads perfectly. So I am very confused.
Im sure this is a fairly simple error on my part. However I cannot figure out what it is.
Thank you in advance.
The serial interface must be configured correctly. The settings on both ends
must be the same.
Wikipedia
writes
Many settings are required for serial connections used for asynchronous start-stop communication, to
select speed, number of data bits per character, parity, and number of stop bits per character.
(...)
Often if the settings are entered incorrectly the connection will not be dropped;
however, any data sent will be received on the other end as nonsense.
If the receiver sees a bad bit pattern on the wire it should raise "framing error" or "parity error".
However some errors cannot be detected and often those error states are simply ignored.
Another great source of problems with the serial interface is on the electric side.
The traditional RS232 comes with voltages up to +/-15V. In contrast, micro-controllers prefer classic logic signals (3.3V or 5V).
Mixing up the wires may allow some communication in one direction.
To rule out this complex you should check the signals with a multimeter or, even better, an oscilloscope.

FFmpeg image to video conversion error: [image2] Opening file for reading

I am running ffmpeg on an AWS Lambda instance. The Lambda function takes an input image and transcodes it into a video segment using ffmpeg:
ffmpeg -loop 1 -i /tmp/photo-SNRUR7ZS13.jpg -c:v libx264 -t 7.00 -pix_fmt yuv420p -vf scale=1280x720 /tmp/output.mp4
I am seeing inconsistent behavior where sometimes the output video is shorter than the specified duration. This happens inconsistently to random images. The same exact image sometimes renders correctly, and sometimes is cut short.
This behavior only happens on Lambda. I am not able to replicate this on my local computer, or on a dedicated EC2 instance with the same environment that runs on lambda.
I noticed that when the output video is short, the ffmpeg log is different. The main difference are repeated [image2 # 0x4b11140] Opening '/tmp/photo-2HD2Z3UN3W.jpg' for reading lines. See ffmpeg logs below.
Normal execution with the correct output video length:
ffmpeg -loop 1 -i /tmp/photo-SNRUR7ZS13.jpg -c:v libx264 -t 7.00 -pix_fmt yuv420p -vf scale=1280x720 /tmp/video-TMB6RNO0EE.mp4
ffmpeg version N-89773-g7fcbebbeaf-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.4.0 (Debian 6.4.0-11) 20171206
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-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, image2, from '/tmp/photo-SNRUR7ZS13.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 18703 kb/s
Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 687x860 [SAR 200:200 DAR 687:860], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler # 0x5837900] deprecated pixel format used, make sure you did set range correctly
[libx264 # 0x51c2340] using SAR=1477/3287
[libx264 # 0x51c2340] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 # 0x51c2340] profile High, level 3.1
[libx264 # 0x51c2340] 264 - core 155 r61 b00bcaf - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=3 lookahead_threads=1 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=25 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 '/tmp/video-TMB6RNO0EE.mp4':
Metadata:
encoder : Lavf58.3.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 6183:13760 DAR 687:860], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc58.9.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 49 fps=0.0 q=28.0 size= 0kB time=-00:00:00.03 bitrate=N/A speed=N/A
frame= 69 fps= 66 q=28.0 size= 0kB time=00:00:00.76 bitrate= 0.5kbits/s speed=0.728x
frame= 89 fps= 57 q=28.0 size= 0kB time=00:00:01.56 bitrate= 0.2kbits/s speed=0.998x
frame= 109 fps= 53 q=28.0 size= 0kB time=00:00:02.36 bitrate= 0.2kbits/s speed=1.14x
frame= 129 fps= 50 q=28.0 size= 0kB time=00:00:03.16 bitrate= 0.1kbits/s speed=1.22x
frame= 148 fps= 48 q=28.0 size= 0kB time=00:00:03.92 bitrate= 0.1kbits/s speed=1.27x
frame= 168 fps= 47 q=28.0 size= 0kB time=00:00:04.72 bitrate= 0.1kbits/s speed=1.31x
No more output streams to write to, finishing.
frame= 175 fps= 39 q=-1.0 Lsize= 94kB time=00:00:06.88 bitrate= 112.2kbits/s speed=1.54x
video:91kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.161261%
Input file #0 (/tmp/photo-SNRUR7ZS13.jpg):
Input stream #0:0 (video): 176 packets read (16459168 bytes); 176 frames decoded;
Total: 176 packets (16459168 bytes) demuxed
Output file #0 (/tmp/video-TMB6RNO0EE.mp4):
Output stream #0:0 (video): 175 frames encoded; 175 packets muxed (93507 bytes);
Total: 175 packets (93507 bytes) muxed
[libx264 # 0x51c2340] frame I:1 Avg QP:14.33 size: 73084
[libx264 # 0x51c2340] frame P:44 Avg QP:14.09 size: 302
[libx264 # 0x51c2340] frame B:130 Avg QP:23.31 size: 50
[libx264 # 0x51c2340] consecutive B-frames: 0.6% 1.1% 0.0% 98.3%
[libx264 # 0x51c2340] mb I I16..4: 3.3% 84.5% 12.1%
[libx264 # 0x51c2340] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 3.2% 0.1% 0.0% 0.0% 0.0% skip:96.7%
[libx264 # 0x51c2340] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.4% 0.0% 0.0% direct: 0.0% skip:99.6% L0:31.2% L1:68.8% BI: 0.0%
[libx264 # 0x51c2340] 8x8 transform intra:84.5% inter:98.8%
[libx264 # 0x51c2340] coded y,uvDC,uvAC intra: 95.1% 63.9% 51.6% inter: 0.1% 0.6% 0.0%
[libx264 # 0x51c2340] i16 v,h,dc,p: 26% 21% 4% 49%
[libx264 # 0x51c2340] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 27% 21% 3% 5% 6% 6% 4% 9%
[libx264 # 0x51c2340] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 36% 10% 4% 7% 5% 6% 2% 6%
[libx264 # 0x51c2340] i8c dc,h,v,p: 51% 29% 16% 4%
[libx264 # 0x51c2340] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 # 0x51c2340] ref P L0: 96.5% 0.0% 3.3% 0.2%
[libx264 # 0x51c2340] ref B L0: 42.4% 57.6%
[libx264 # 0x51c2340] ref B L1: 97.0% 3.0%
[libx264 # 0x51c2340] kb/s:106.08
Log from a short video:
ffmpeg -framerate 25 -y -loop 1 -i /tmp/photo-2HD2Z3UN3W.jpg -t 15.00 -filter_complex "[0:v]crop=h=ih:w='if(gt(a,16/9),ih*16/9,iw)':y=0:x='if(gt(a,16/9),(ow-iw)/2,0)'[tmp];[tmp]scale=-1:4000,crop=w=iw:h='min(iw*9/16,ih)':x=0:y='0.17*ih-((t/15.00)*min(0.17*ih,(ih-oh)/6))',trim=duration=15.00[tmp1];[tmp1]zoompan=z='if(lte(pzoom,1.0),1.15,max(1.0,pzoom-0.0005))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=1,setsar=sar=1:1[animated];[animated]fade=out:st=12.00:d=3.00:c=#000000[animated]" -map "[animated]" -pix_fmt yuv420p -s 1280x720 -y /tmp/video-QB1JCDT021.mp4
ffmpeg version N-89773-g7fcbebbeaf-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.4.0 (Debian 6.4.0-11) 20171206
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-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, image2, from '/tmp/photo-2HD2Z3UN3W.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 373617 kb/s
Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1936x2592 [SAR 72:72 DAR 121:162], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 (mjpeg) -> crop
fade -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[swscaler # 0x4d63b40] deprecated pixel format used, make sure you did set range correctly
[swscaler # 0x4df7340] deprecated pixel format used, make sure you did set range correctly
[swscaler # 0x50e97c0] deprecated pixel format used, make sure you did set range correctly
[swscaler # 0x50e97c0] Warning: data is not aligned! This can lead to a speed loss
[libx264 # 0x4b17480] using SAR=1/1
[libx264 # 0x4b17480] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 # 0x4b17480] profile High, level 3.1
[libx264 # 0x4b17480] 264 - core 155 r61 b00bcaf - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=3 lookahead_threads=1 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=25 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 '/tmp/video-QB1JCDT021.mp4':
Metadata:
encoder : Lavf58.3.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc58.9.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[swscaler # 0x5bd0380] deprecated pixel format used, make sure you did set range correctly
debug=1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[image2 # 0x4b11140] Opening '/tmp/photo-2HD2Z3UN3W.jpg' for reading
[AVIOContext # 0x4b6ecc0] Statistics: 1868086 bytes read, 0 seeks
[mjpeg # 0x4b14940] marker=d8 avail_size_in_buf=1868084
[mjpeg # 0x4b14940] marker parser used 0 bytes (0 bits)
[mjpeg # 0x4b14940] marker=e0 avail_size_in_buf=1868082
[mjpeg # 0x4b14940] marker parser used 16 bytes (128 bits)
[mjpeg # 0x4b14940] marker=db avail_size_in_buf=1868064
[mjpeg # 0x4b14940] index=0
[mjpeg # 0x4b14940] qscale[0]: 0
[mjpeg # 0x4b14940] marker parser used 67 bytes (536 bits)
[mjpeg # 0x4b14940] marker=db avail_size_in_buf=1867995
[mjpeg # 0x4b14940] index=1
[mjpeg # 0x4b14940] qscale[1]: 1
[mjpeg # 0x4b14940] marker parser used 67 bytes (536 bits)
[mjpeg # 0x4b14940] marker=c0 avail_size_in_buf=1867926
[mjpeg # 0x4b14940] sof0: picture: 1936x2592
[mjpeg # 0x4b14940] component 0 1:1 id: 0 quant:0
[mjpeg # 0x4b14940] component 1 1:1 id: 1 quant:1
[mjpeg # 0x4b14940] component 2 1:1 id: 2 quant:1
[mjpeg # 0x4b14940] pix fmt id 11111100
[mjpeg # 0x4b14940] marker parser used 17 bytes (136 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867907
[mjpeg # 0x4b14940] class=0 index=0 nb_codes=11
[mjpeg # 0x4b14940] marker parser used 30 bytes (240 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867875
[mjpeg # 0x4b14940] class=1 index=0 nb_codes=242
[mjpeg # 0x4b14940] marker parser used 82 bytes (656 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867791
[mjpeg # 0x4b14940] class=0 index=1 nb_codes=8
[mjpeg # 0x4b14940] marker parser used 27 bytes (216 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867762
[mjpeg # 0x4b14940] class=1 index=1 nb_codes=241
[mjpeg # 0x4b14940] marker parser used 51 bytes (408 bits)
[mjpeg # 0x4b14940] escaping removed 7149 bytes
[mjpeg # 0x4b14940] marker=da avail_size_in_buf=1867709
[mjpeg # 0x4b14940] component: 0
[mjpeg # 0x4b14940] component: 1
[mjpeg # 0x4b14940] component: 2
[mjpeg # 0x4b14940] marker parser used 1860559 bytes (14884468 bits)
[mjpeg # 0x4b14940] marker=d9 avail_size_in_buf=0
[mjpeg # 0x4b14940] decode frame unused 0 bytes
[swscaler # 0x5bd42c0] deprecated pixel format used, make sure you did set range correctly
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[image2 # 0x4b11140] Opening '/tmp/photo-2HD2Z3UN3W.jpg' for reading
[AVIOContext # 0x4b6ecc0] Statistics: 1868086 bytes read, 0 seeks
[mjpeg # 0x4b14940] marker=d8 avail_size_in_buf=1868084
[mjpeg # 0x4b14940] marker parser used 0 bytes (0 bits)
[mjpeg # 0x4b14940] marker=e0 avail_size_in_buf=1868082
[mjpeg # 0x4b14940] marker parser used 16 bytes (128 bits)
[mjpeg # 0x4b14940] marker=db avail_size_in_buf=1868064
[mjpeg # 0x4b14940] index=0
[mjpeg # 0x4b14940] qscale[0]: 0
[mjpeg # 0x4b14940] marker parser used 67 bytes (536 bits)
[mjpeg # 0x4b14940] marker=db avail_size_in_buf=1867995
[mjpeg # 0x4b14940] index=1
[mjpeg # 0x4b14940] qscale[1]: 1
[mjpeg # 0x4b14940] marker parser used 67 bytes (536 bits)
[mjpeg # 0x4b14940] marker=c0 avail_size_in_buf=1867926
[mjpeg # 0x4b14940] sof0: picture: 1936x2592
[mjpeg # 0x4b14940] component 0 1:1 id: 0 quant:0
[mjpeg # 0x4b14940] component 1 1:1 id: 1 quant:1
[mjpeg # 0x4b14940] component 2 1:1 id: 2 quant:1
[mjpeg # 0x4b14940] pix fmt id 11111100
[mjpeg # 0x4b14940] marker parser used 17 bytes (136 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867907
[mjpeg # 0x4b14940] class=0 index=0 nb_codes=11
[mjpeg # 0x4b14940] marker parser used 30 bytes (240 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867875
[mjpeg # 0x4b14940] class=1 index=0 nb_codes=242
[mjpeg # 0x4b14940] marker parser used 82 bytes (656 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867791
[mjpeg # 0x4b14940] class=0 index=1 nb_codes=8
[mjpeg # 0x4b14940] marker parser used 27 bytes (216 bits)
[mjpeg # 0x4b14940] marker=c4 avail_size_in_buf=1867762
[mjpeg # 0x4b14940] class=1 index=1 nb_codes=241
[mjpeg # 0x4b14940] marker parser used 51 bytes (408 bits)
[mjpeg # 0x4b14940] escaping removed 7149 bytes
[mjpeg # 0x4b14940] marker=da avail_size_in_buf=1867709
[mjpeg # 0x4b14940] component: 0
[mjpeg # 0x4b14940] component: 1
[mjpeg # 0x4b14940] component: 2
[mjpeg # 0x4b14940] marker parser used 1860559 bytes (14884468 bits)
[mjpeg # 0x4b14940] marker=d9 avail_size_in_buf=0
[mjpeg # 0x4b14940] decode frame unused 0 bytes
[swscaler # 0x5bd8200] deprecated pixel format used, make sure you did set range correctly
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
...
...
...
As requested, here is a link to the full log. In this log - ffmpeg renders only 323 out of 375 frames.
The Opening '/tmp/photo-2HD2Z3UN3W.jpg' segment repeats many many times until it finally renders out a short video. Does anyone have insight into why it keeps opening the image file? This must have something to do with the underlying issue.
The -loop option applied to an image (sequence) forces ffmpeg to open and decode the files afresh each time the input is looped. So, in this case, ffmpeg has to open the file over the network repeatedly. My guess is that some of the HTTP requests aren't fulfilled fast enough, and ffmpeg drops those received frames.
After dropping -loop 1 and switching to loop filter: loop=NB_LOOPS:1:0,setpts=N/FRAME_RATE/TB, ffmpeg opens the image only once, and then clones the decoded frame in its buffer. This gives the expected result.

bcrypt causing unit testing to go crazy

I am using Webpack. Karma and Mocha to run a unit test:
const assert = require('assert');
//const bcrypt = require('bcrypt');
describe('encryptPass', function() {
it('returned hash should return ', function() {
assert.equal(1, 1);
});
});
When I comment out the bcrypt include line, the test runs fine. However, when I leave this line in, it prints a whole load of information and errors to the console:
> auth_app#1.0.0 test /tidee/auth_app
> NODE_ENV=test karma start
Hash: 745e3239cb5645ae9c7c
Version: webpack 1.14.0
Time: 15923ms
Asset Size Chunks Chunk Names
79515ad0788973c533405f7012dfeccd.woff 22.7 kB [emitted]
f4769f9bdb7466be65088239c12046d1.eot 20.1 kB [emitted]
9b281482a6fbc52739698e0c130ea52a.woff2 11.3 kB [emitted]
1fff7dfa22a6c8ba9382ad03726139d3.woff 27.1 kB [emitted]
f2bce001e16fa48466239a51378474d1.woff 28 kB [emitted]
36eeac2edc10f0533f49c8e008896e40.woff 38.4 kB [emitted]
6a00de061f4fcc2ae24f25da53a02f4d.woff 13.2 kB [emitted]
fa2772327f55d8198301fdb8bcfc8158.woff 23.4 kB [emitted]
448c34a56d699c29117adc64c43affeb.woff2 18 kB [emitted]
89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
main 5.62 MB 0 [emitted] main
tests/unit/encryptPass_test.js 14.3 MB 1 [emitted] tests/unit/encryptPass_test.js
chunk {0} main (main) 5.43 MB
[0] multi main 28 bytes {0}
[1] ./~/react/react.js 56 bytes {0} [built]
[2] ./~/process/browser.js 5.3 kB {0} {1} [built]
[3] ./~/moment/moment.js 123 kB {0} [built]
[4] ./~/babel-runtime/helpers/classCallCheck.js 208 bytes {0} [built]
[5] ./~/babel-runtime/helpers/inherits.js 1.11 kB {0} [built]
[6] ./~/babel-runtime/helpers/possibleConstructorReturn.js 542 bytes {0} [built]
[7] ./~/babel-runtime/helpers/extends.js 544 bytes {0} [built]
[8] ./~/babel-runtime/helpers/objectWithoutProperties.js 280 bytes {0} [built]
[9] ./~/classnames/index.js 1.1 kB {0} [built]
[10] ./~/react-bootstrap/lib/utils/bootstrapUtils.js 5.7 kB {0} [built]
[11] ./~/fbjs/lib/invariant.js 1.49 kB {0} [built]
[12] ./~/fbjs/lib/warning.js 2.1 kB {0} [built]
[13] ./~/react-dom/lib/reactProdInvariant.js 1.24 kB {0} [built]
[14] ./~/react-prop-types/lib/elementType.js 1.44 kB {0} [built]
[15] ./~/object-assign/index.js 1.99 kB {0} {1} [built]
[16] ./~/buffer/index.js 48.6 kB {0} {1} [built]
[17] ./~/react-dom/lib/ReactDOMComponentTree.js 6.16 kB {0} [built]
[18] ./~/invariant/browser.js 1.52 kB {0} [built]
[19] ./~/mongoose/lib/utils.js 18 kB {0} [built]
[20] ./~/warning/browser.js 1.81 kB {0} [built]
[21] ./~/fbjs/lib/ExecutionEnvironment.js 1.06 kB {0} [built]
[22] ./~/mongoose/lib/error.js 1.34 kB {0} [built]
[23] ./~/react-bootstrap/lib/utils/createChainedFunction.js 1.04 kB {0} [built]
[24] ./~/react-bootstrap/lib/utils/StyleConfig.js 573 bytes {0} [built]
[25] ./~/react-dom/index.js 59 bytes {0} [built]
[26] ./~/mongoose/lib/schematype.js 26.5 kB {0} [built]
[27] ./~/react-bootstrap/lib/utils/ValidComponentChildren.js 4.36 kB {0} [built]
[28] ./~/react/lib/ReactComponentTreeHook.js 10.4 kB {0} [built]
[29] ./~/axios/lib/utils.js 7.46 kB {0} [built]
[30] ./~/jquery/dist/jquery.js 267 kB {0} [built]
[31] ./~/react-dom/lib/ReactInstrumentation.js 601 bytes {0} [built]
[32] ./~/fbjs/lib/emptyFunction.js 1.08 kB {0} [built]
[33] ./~/mongoose/lib/document.js 68.8 kB {0} [built]
[34] ./~/core-js/library/modules/_core.js 117 bytes {0} [built]
[35] ./~/core-js/library/modules/_wks.js 368 bytes {0} [built]
[36] ./~/react-bootstrap/lib/SafeAnchor.js 3.8 kB {0} [built]
[37] ./~/react-dom/lib/ReactUpdates.js 9.53 kB {0} [built]
[38] ./~/react-intl/lib/index.js 62.1 kB {0} [built]
[39] ./~/react/lib/ReactCurrentOwner.js 623 bytes {0} [built]
[40] ./~/react-dom/lib/SyntheticEvent.js 9.18 kB {0} [built]
[41] ./client/src/helpers/doFetch.js 4.55 kB {0} [built]
...
WARNING in ./~/bcrypt/bcrypt.js
Critical dependencies:
6:15-36 the request of a dependency is an expression
# ./~/bcrypt/bcrypt.js 6:15-36
WARNING in ./~/node-pre-gyp/lib/pre-binding.js
Critical dependencies:
19:22-48 the request of a dependency is an expression
# ./~/node-pre-gyp/lib/pre-binding.js 19:22-48
WARNING in ./~/bcrypt/CHANGELOG.md
Module parse failed: /tidee/auth_app/node_modules/bcrypt/CHANGELOG.md Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '#' (1:0)
at Parser.pp$4.raise (/tidee/auth_app/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp$7.getTokenFromCode (/tidee/auth_app/node_modules/acorn/dist/acorn.js:2756:10)
at Parser.pp$7.readToken (/tidee/auth_app/node_modules/acorn/dist/acorn.js:2477:17)
at Parser.pp$7.nextToken (/tidee/auth_app/node_modules/acorn/dist/acorn.js:2468:15)
at Parser.parse (/tidee/auth_app/node_modules/acorn/dist/acorn.js:515:10)
at Object.parse (/tidee/auth_app/node_modules/acorn/dist/acorn.js:3098:39)
at Parser.parse (/tidee/auth_app/node_modules/webpack/lib/Parser.js:902:15)
at NormalModule.<anonymous> (/tidee/auth_app/node_modules/webpack/lib/NormalModule.js:104:16)
at NormalModule.onModuleBuild (/tidee/auth_app/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)
at nextLoader (/tidee/auth_app/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
at /tidee/auth_app/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
at Storage.finished (/tidee/auth_app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
at /tidee/auth_app/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:415:3)
# ./~/bcrypt ^\.\/.*$
and it goes on an on!!

FT4222 device info correct under Windows, incorrect under Linux?

I am trying to communicate with an FT4222 chip using libft4222. When I run the following example code provided by FTDI, I receive different responses between Windows and Linux platforms.
Sample code:
FT_STATUS ftStatus;
FT_DEVICE_LIST_INFO_NODE *devInfo;
DWORD numDevs;
// create the device information list
ftStatus = FT_CreateDeviceInfoList(&numDevs);
if (ftStatus == FT_OK) {
printf("Number of devices is %d\n",numDevs);
}
if (numDevs > 0) {
// allocate storage for list based on numDevs
devInfo =
(FT_DEVICE_LIST_INFO_NODE*)malloc(sizeof(FT_DEVICE_LIST_INFO_NODE)*numDevs);
// get the device information list
ftStatus = FT_GetDeviceInfoList(devInfo,&numDevs);
if (ftStatus == FT_OK) {
for (int i = 0; i < numDevs; i++) {
printf("Dev %d:\n",i);
printf(" Flags=0x%x\n",devInfo[i].Flags);
printf(" Type=0x%x\n",devInfo[i].Type);
printf(" ID=0x%x\n",devInfo[i].ID);
printf(" LocId=0x%x\n",devInfo[i].LocId);
printf(" SerialNumber=%s\n",devInfo[i].SerialNumber);
printf(" Description=%s\n",devInfo[i].Description);
printf(" ftHandle=0x%x\n",devInfo[i].ftHandle);
}
}
}
On Windows I receive the following output, which looks correct:
Dev 0:
Flags= 0x2, (CLOSE-HS)
Type= 0xa
ID= 0x403601c
LocId= 0x1131
SerialNumber= A
Description= FT4222 A
ftHandle= 0x0
Dev 1:
Flags= 0x0, (CLOSE-FS)
Type= 0xa
ID= 0x403601c
LocId= 0x1132
SerialNumber= B
Description= FT4222 B
ftHandle= 0x0
On Linux (x64 Ubuntu, running i386 version of libft4222 and my test application) I receive the following output, which looks incorrect:
Dev 0:
Flags= 0x1, (OPEN-FS)
Type= 0x3
ID= 0x0
LocId= 0x0
SerialNumber=
Description=
ftHandle= 0x0
Dev 1:
Flags= 0x1, (OPEN-FS)
Type= 0x3
ID= 0x0
LocId= 0x0
SerialNumber=
Description=
ftHandle= 0x0
I'm curious why the difference between systems? Why is one showing as Closed while the other shows as Open?
EDIT: lsusb -v displays the following for this device:
Bus 001 Device 015: ID 0403:601c Future Technology Devices International, Ltd
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x601c
bcdDevice 18.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 55
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
After trying with Kali i386, everything worked fine. I thought this meant the library didn't work well with amd64 OS flavors, so I tried with Ubuntu i386. Same problem as before - incorrect device info.
Found that the real issue was with Kali I was logging in under the root account. With Ubuntu, root account login is unavailable. After executing my test application with sudo, the information retrieved from the FT4222 chip was correct.
Proper solution is likely to use a udev rule to modify permissions for the FT4222 device.
under debian this udev rule helped me to avoid sudo rights:
ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666", RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'
also it might be important that your $USER is part of the group dialout