[FFmpeg-user] FFMPEG : Redirecting Matroska muxed data to socket

Parth Shah parth.9910 at gmail.com
Wed Oct 29 06:59:33 CET 2014


Hi all,

I am using FFMPEG library to mux H.264 and AAC frames to Matroska (.mkv) 
file. I can do that both using command line and C program.

Now, instead of writing the muxed matroska data into file I want to 
write these muxed data directly on to socket or pipe. My actual goal is 
to write a C program that send muxed data to socket and server will 
receive this muxed data.

I tried using protocol tcp. They are working with the matroska format.
So, My C program is able to send muxed data successfully over socket and 
server is able to receive this muxed data.

But when I apply ffprobe command over the received file, I am getting 
duration and bitrate field N/A. and when I tried to play this file with 
vlc i am unable to seek the file and getting garbage duration.

Below the output of the ffprobe.

     ffprobe version N-65784-g50a35f0 Copyright (c) 2007-2014 the FFmpeg 
developers
       built on Aug 25 2014 12:31:36 with gcc 4.7 (Ubuntu/Linaro 
4.7.3-1ubuntu1)
       configuration:
       libavutil      54.  5.100 / 54.  5.100
       libavcodec     56.  0.101 / 56.  0.101
       libavformat    56.  1.100 / 56.  1.100
       libavdevice    56.  0.100 / 56.  0.100
       libavfilter     5.  0.101 /  5.  0.101
       libswscale      3.  0.100 /  3.  0.100
       libswresample   1.  1.100 /  1.  1.100
     Input #0, matroska,webm, from 'Array.mkv':
       Metadata:
         ENCODER         : Lavf54.29.104
*Duration: N/A*, start: 1412858260.281000, *bitrate: N/A*
         Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 
[SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)
         Stream #0:1: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 
[SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)
         Stream #0:2: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 
[SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)
         Stream #0:3: Video: mjpeg, yuvj422p(pc, bt470bg), 2000x1496 
[SAR 1:1 DAR 250:187], 27 fps, 27 tbr, 1k tbn, 1k tbc (default)


As You can see Duration and Bitrate field shows N/A. However I am 
getting correct startTime.

Any help or advice? Thank you in advance.



More information about the ffmpeg-user mailing list