Comments (10)
Hard to say. Sometimes merging some files simply doesn't work due to limitation in the ffmpeg concat implentation. you could check FAQ and try to disable tracks and see if it makes a difference
from lossless-cut.
Thank you for answer. Meanwhile I have gained some clues. First, I noticed the issue occurs in VLC Media Player, but does not occur in Windows Media Player. Second, when I make trimming and concatenating by ffmpeg (from command line), the issue does not occur, I mean VLC plays it properly (at least flickering is much shorter if at all and I don't feel any audio shift).
So for now I had to drop LosslessCut and switched to ffmpeg. I really like your application, naturally it is more convenient, especially when cutting many fragments of one video, but with audio shift it becomes useless.
If you like to find out what parameters I use to edit files with ffmpeg, etc. to improve your application I will be glad to provide all the details including all the video files.
from lossless-cut.
If you managed to losslessly concatenate using ffmpeg directly, mind to share which commands that produced a correct results?
from lossless-cut.
Certainly, though I am sure you know them if I know them :) Without analyzing / comparing of the videos the commands probably will not be much of a help. I used this command for a few concatenating operations and got good results:
ffmpeg -f concat -safe 0 -i FileListToMerge.txt -c copy output.ts
I was happy with it until yesterday when concatenated three videos with the above command and from the weld between second and third one I got audio shift :(
I tried one more command today:
ffmpeg -i "concat:file01.ts|file02.ts|file03.ts" -c copy output.ts
but I haven't played it yet. I will do it probably tomorrow. I noticed I have to play the output file from the beginning to know it is ok, because if I rewind it the audio shift does not occur.
I am a novice about ffpmeg, just try what I find in Internet, so if you have any suggestions (switches) I could try just let me know here and I will be testing them.
from lossless-cut.
ffmpeg -f concat -safe 0 -i FileListToMerge.txt -c copy output.ts
This looks very similar to what losslesscut is already doing. So i'm not sure why it's working from the command line but not from losslesscut. PS losslesscut prints out the commands that it has run. "Tools -> last ffmpeg commands"
ffmpeg -i "concat:file01.ts|file02.ts|file03.ts" -c copy output.ts
interesting. this is the concat filter, it is very simple in that it just concatenates the raw file data without demuxing (it's like simply concatenating the binary data of the files together). therefore it only works for some formats like MPEGTS which doesn't have any header at the beginning of the file.
from lossless-cut.
Thank you for your tips. They are really helpful. I made some more research and it looks you are absolutely right about the command
ffmpeg -f concat -safe 0 -i FileListToMerge.txt -c copy output.ts
The output generated by LosslessCut and ffmpeg is the same ("FC: no differences encountered"). The source of the issue with flickering and audio shift lays before merging. It lays during cut operation. This is my first conclusion. The second is that when I used
ffmpeg -i "concat:file01.ts|file02.ts" -c copy output.ts
command to concatenate the same two files the output comes with the flickering issue, but without audio shift issue.
I wonder if "seek keyframe" function in LosslessCut applies at MPEGTS files, because when I use
ffmpeg -ss 00:04:54.20 -to 00:33:08.60 -i ...
command to trim video defining fractions of a second it looks to cut precisely at that point without seeking and shifting back or forth to any keyframe. Does the TS format have keyframes? Am I able to definitely know if a file has keyframes?
The issue seems to be very subtle. Maybe it is enough to cut one frame back or forth to avoid the whole problem.
Maybe I should report that issue to VLC developer, because when I play the concatenated files in Windows Media Player it plays them smoothly without any flickering nor audio shift.
I will make more research about it and let you know. I would appreciate your tip about the keyframes mentioned above.
from lossless-cut.
Related Issues (20)
- Please make for android APP HOT 1
- Unexpected char in digit field for scene detection window (from pressing keyboard shortcut) HOT 1
- Keep only specifed track for batch videos HOT 2
- universal install package does not work HOT 1
- "File not natively supported" error when folder contains backslash HOT 1
- Option to rearrange tracks/streams
- Show exactly where the cut will be made HOT 1
- Merge cut export fade to black or fade to next clip HOT 1
- Support multiple sets of segments in LLC project file HOT 2
- Merging fields from a csv file into text overlay HOT 1
- different configuration support for different copys of Losslesscut HOT 4
- Improving fast seek behavior ? HOT 4
- Can't drag & drop on windows 11 HOT 9
- Exporting MKV loses aspect ratio HOT 2
- Copy and Paste Segment Tags HOT 3
- Audio Loss When Exporting HOT 1
- Improve Dark Mode HOT 6
- Repeated frames at each joined segment or chapter in continuous video HOT 1
- GPU encoding to VP9 codec HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lossless-cut.