I tried to get a JSON from ffprobe to get sidedata information, but it seems the generated JSON ist malformed and therefore not convenient for further processing. My command:
Code:
ffprobe -read_intervals %+#2 -select_streams v:0 -show_frames -show_entries side_data "source.mkv" -print_format json -of json > "source_sidedata.json"
The resulting JSON looks like
Code:
{
"packets_and_frames": [
{
"type": "packet",
},
{
"type": "packet",
},
{
"type": "frame",
"media_type": "audio",
"stream_index": 1,
"key_frame": 1,
"pkt_pts": 171,
"pkt_pts_time": "0.171000",
"pkt_dts": 171,
"pkt_dts_time": "0.171000",
"best_effort_timestamp": 171,
"best_effort_timestamp_time": "0.171000",
"pkt_duration": 21,
"pkt_duration_time": "0.021000",
"pkt_pos": "313258",
"pkt_size": "1522",
"sample_fmt": "fltp",
"nb_samples": 1024,
"channels": 6,
"channel_layout": "5.1"
},
[...]
Obviously the problem is the comma which is always set after the last line ""type": "packet" in the "packets_and_frames" section. ffprobe usually gives me proper JSON files but the comma problem appears when "-show_entries side_data" is used. Am I missing something or is this a bug?