Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hls error after change in ts file with ffmpeg #934

Open
mohsen158 opened this issue Aug 9, 2019 · 0 comments
Open

hls error after change in ts file with ffmpeg #934

mohsen158 opened this issue Aug 9, 2019 · 0 comments

Comments

@mohsen158
Copy link

I want to manipulate ts file separately with ffmpeg command, for example, I want to write something in each ts file in ordet to do that first i get m3u8 and other ts file with ffmpeg command and after that i can play it correctly
after that i am trying to write something o all ts file with this command

ffmpeg -i stream0.ts -vf  "drawbox=y=ih/PHI:[email protected]:width=iw:height=48:t=fill,  drawtext=text='Title of this Video':fontcolor=white" -c:v libx264 -c:a copy    ../video6/stream0.ts
ffmpeg -i stream1.ts -vf  "drawbox=y=ih/PHI:[email protected]:width=iw:height=48:t=fill,  drawtext=text='Title of this Video':fontcolor=white" -c:v libx264 -c:a copy    ../video6/stream1.ts
ffmpeg -i stream2.ts -vf  "drawbox=y=ih/PHI:[email protected]:width=iw:height=48:t=fill,  drawtext=text='Title of this Video':fontcolor=white" -c:v libx264 -c:a copy    ../video6/stream2.ts
ffmpeg -i stream3.ts -vf  "drawbox=y=ih/PHI:[email protected]:width=iw:height=48:t=fill,  drawtext=text='Title of this Video':fontcolor=white" -c:v libx264 -c:a copy    ../video6/stream3.ts
ffmpeg -i stream4.ts -vf  "drawbox=y=ih/PHI:[email protected]:width=iw:height=48:t=fill,  drawtext=text='Title of this Video':fontcolor=white" -c:v libx264 -c:a copy    ../video6/stream4.ts
ffmpeg -i stream5.ts -vf  "drawbox=y=ih/PHI:[email protected]:width=iw:height=48:t=fill,  drawtext=text='Title of this Video':fontcolor=white" -c:v libx264 -c:a copy    ../video6/stream5.ts
...

and then iam trying to play these new ts file withe old m3u8
but i get this error in console and hls player get stuck

      Dropping 1 audio frame @ 6.037s due to 6037 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 6015 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5994 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5973 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5952 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5930 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5909 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5888 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5866 ms overlap.
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remuxAudio @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.remux @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.append @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.pushDecrypted @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  e.push @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  (anonymous) @ blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1
  blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to 5845 ms overlap.



        log] > AVC:4755 ms overlapping between fragments detected
    blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [log] > Video/PTS/DTS adjusted: 4755/4755,delta:-4755 ms
    hls.js@latest:1 [log] > Parsed video,PTS:[4.755,5.881],DTS:[4.755/5.797],nb:141,dropped:0
    hls.js@latest:1 [warn] > negative duration computed for frag 3,level 0, there should be some duration drift between playlist and fragment!
    (anonymous) @ hls.js@latest:1
    a @ hls.js@latest:1
    n @ hls.js@latest:1
    r.onFragParsingData @ hls.js@latest:1
    e.onEventGeneric @ hls.js@latest:1
    e.onEvent @ hls.js@latest:1
    l.emit @ hls.js@latest:1
    t.trigger @ hls.js@latest:1
    t.onWorkerMessage @ hls.js@latest:1
    hls.js@latest:1 [warn] > negative duration computed for frag 1,level 0, there should be some duration drift between playlist and fragment!
    (anonymous) @ hls.js@latest:1
    a @ hls.js@latest:1
    n @ hls.js@latest:1
    r.onFragParsingData @ hls.js@latest:1
    e.onEventGeneric @ hls.js@latest:1
    e.onEvent @ hls.js@latest:1
    l.emit @ hls.js@latest:1
    t.trigger @ hls.js@latest:1
    t.onWorkerMessage @ hls.js@latest:1
    hls.js@latest:1 [log] > main stream:PARSING->PARSED
    hls.js@latest:1 [log] > main buffered : [0.000,6.006]
    hls.js@latest:1 [log] > latency/loading/parsing/append/kbps:20/7/83/5/189565
    hls.js@latest:1 [log] > main stream:PARSED->IDLE
    hls.js@latest:1 [log] > Loading 5 of [0 ,5],level 0, currentTime:0.347,bufferEnd:6.006
    hls.js@latest:1 [log] > main stream:IDLE->FRAG_LOADING
    hls.js@latest:1 [log] > Loaded 5 of [0 ,5],level 0
    hls.js@latest:1 [log] > Parsing 5 of [0 ,5],level 0, cc 0
    hls.js@latest:1 [log] > main stream:FRAG_LOADING->PARSING
    blob:null/d1ca8bf8-cdfc-4b21-bd28-0d0871f7d4bd:1 [warn] > Dropping 1 audio frame @ 6.037s due to

and after that, I try to analyse new and old with : https://github.com/epiclabs-io/hls-analyzer
and i get this for a correct and old version of my process:

 ***** Analyzing variant (0) *****

** Generic information **
Version: 3
Start Media sequence: 0
Is Live: False
Encrypted: False
Number of segments: 6
Playlist duration: 30.073711

** Downloading http://localhost:8182/streams/stream0.ts, Range: None **
** Tracks and Media formats **
Track #0 - Type: video/avc, Format: Video (H.264) - Profile: High, Level: 0, Resolution: 1920x1080, Encoded aspect ratio: 1/1, Display aspect ratio: 16/9
Track #1 - Type: audio/mp4a-latm, Format: Audio (AAC) - Sample Rate: 48000, Channels: 6

** Timing information **
Segment declared duration: 6.089822
Track #0 - Duration: 1.126123 s, First PTS: 6.321588 s, Last PTS: 7.447711 s
Track #1 - Duration: 1.216332 s, First PTS: 6.228255 s, Last PTS: 7.444587 s
Duration difference (declared vs real): 4.963699s (440.78%)

** Frames **
Track #0 - Frames:  I P B B B P B B B P B B B P P P P P P P P P P P P P B B 	AA: 0, BB: 0

	Good! Track starts with a keyframe
	Keyframes count: 1

Track #1 - Frames:  I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I 

and this for new ts file :

***** Analyzing variant (0) *****

** Generic information **
Version: 3
Start Media sequence: 0
Is Live: False
Encrypted: False
Number of segments: 6
Playlist duration: 30.073711

** Downloading http://localhost:8182/streams/stream0.ts, Range: None **
** Tracks and Media formats **
Track #0 - Type: video/avc, Format: Video (H.264) - Profile: 0, Level: 0, Resolution: 0x0, Encoded aspect ratio: 1/1, Display aspect ratio: 1
Track #1 - Type: audio/mp4a-latm, Format: Audio (AAC) - Sample Rate: 48000, Channels: 6

** Timing information **
Segment declared duration: 6.089822
Track #0 - Duration: 0.0 s, First PTS: 7.406011 s, Last PTS: 7.406011 s
Track #1 - Duration: 0.063999 s, First PTS: 7.392922 s, Last PTS: 7.456921 s
Duration difference (declared vs real): 6.025823s (9415.50%)

** Frames **
Track #0 - Frames:  	AA: 0, BB: 0

	Keyframes count: 0
	Warning: there are no keyframes in this track! This will cause a bad playback experience

Track #1 - Frames:  I I I I I I 

what should I do?
my final target is to write something in ts file and see the correct effect of that on hls playing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant