[FFmpeg-user] Streaming from video file without keyframes

Artyom Lebedev vagran.ast at gmail.com
Wed Jun 5 16:57:34 EEST 2019


Hello,
Is it possible to stream video from file without keyframes?

I streamed videos with keyframes before using this command:
ffmpeg -re -stream_loop -1 -i out.ts -c copy -f mpegts -map 0 
udp://127.0.0.1:3338?pkt_size=1316
which can be played by
ffplay -fflags nobuffer -flags2 +showall udp://0.0.0.0:3338

The same command does not work for video without keyframes (this is dump 
from DJI Inspire drone):
https://drive.google.com/file/d/1VkEbksRROKeESurGJ4M70uPx3av1qwie/view?usp=sharing
It just hangs with this output:
Input #0, mpegts, from 'inspire.ts':
   Duration: 00:04:14.42, start: 75.642233, bitrate: 2186 kb/s
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
     Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), 
yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 
29.97 tbr, 90k tbn, 59.94 tbc
     Stream #0:1[0x101]: Data: klv (KLVA / 0x41564C4B)
Output #0, mpegts, to 'udp://127.0.0.1:3338?pkt_size=1316':
   Metadata:
     encoder         : Lavf57.83.100
     Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), 
yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 
29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
     Stream #0:1: Data: klv (KLVA / 0x41564C4B)
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x55a2f8f57b80] Timestamps are unset in a packet for stream 1. 
This is deprecated and will stop working in the future. Fix your code to 
set the timestamps properly
frame=    0 fps=0.0 q=-1.0 Lsize=       2kB time=00:00:00.00 bitrate=N/A 
speed=   0x

Message about metadata stream does not hurt, it is the same as with good 
videos.

This video still can be played by ffplay
ffplay -fflags nobuffer -flags2 +showall inspire.ts

May be there is some flag similar to "-flags2 +showall" but for 
remuxing? (I tried it with ffmpeg command, but it does not help).

-- 
Artyom


More information about the ffmpeg-user mailing list