Coder Social home page Coder Social logo

Git clone & install results in--- ImportError: libmpv version is incorrect. Required 2.0 got 1.109. Missing AAC audio track leads to hang at 66% on save. about vidcutter HOT 4 OPEN

mythtvuser avatar mythtvuser commented on June 16, 2024
Git clone & install results in--- ImportError: libmpv version is incorrect. Required 2.0 got 1.109. Missing AAC audio track leads to hang at 66% on save.

from vidcutter.

Comments (4)

mythtvuser avatar mythtvuser commented on June 16, 2024

From #248 LordMelldrum suggested:
"this is because the file you want to work with has an audio stream not supported by MPEG TS stream.
....
You can try transcode just the audio with AviDemux to AAC and then VidCutter works flawlessly.
But would be nice to have this in one step."

EDIT: (from memory AviDemux is a windows program but Linux options exist - see below)

I will check if incompatible source audio is the cause of issue.

As a preliminary step I had used VLC to convert .ts files (DVB-T recordings) with dual audio tracks to .ps files, eliminating subtitles etc., reducing file size for temporary storage, but somehow had retained only MP2 stereo Audio (the AAC audio track was dropped but the .ps file used in my testing retained a second empty audio track! -- VLC playing source file shows a second audio track, but no audio out when it's selected.... VLC's convert function does not include option to select/drop individual audio tracks.)

Notes: using VLC failed to encode an AAC audio track from the mp2 existing in the source file.
However, the mp2 audio is selected and plays normally in vidcutter's edit window.
Vidcutter appears to automatically select the mp2 track for the edit phase, but parameters passed to FFMpeg may not select mp2 audio for transcoding to AAC in output!).
I am therefore reprocessing my test video in Shotcut to export a file with AAC audio.
I will confirm AAC audio track using VLC, then re-test.

Partial success.

New test file has AAC audio and no extra blank audio tracks.
With smartcut enabled, processing Save Media commenced with rapid progress bar rise to 10%, then to 50% after a delay, and stopped at 66% (at which time CPU load decreased to around 70% then dropped to background task level.)

Ubuntu Logs [Info ] Util::isMemoryLow available RAM = 27632160 KB showed free RAM at around 26GB (of 32GB) during above. (I have read suggestions that multiple processing of clips hogs all system RAM. This appears not to be the cause here.)

With smartcut disabled, processing Save Media was rapid, and saved an edited file (all clips) with audio!

Conclusion(s):
Audio stream in video to be edited must be AAC.
MP2 audio stream or second non-AAC audio stream may be cause of "hang on save media at 66%" often reported....
Re-encoding MP2 audio to AAC before loading into vidcutter appears to alleviate the above.

Frame accurate cutting remains on wish list.

Feature request(s) (from above):
Check source video for AAC encoded audio track when loaded and report when AAC missing so user can rectify.
Option to select one audio track if more than one present in source file.
Option to stream/convert source file out via FFMpeg, transcoding a selected audio stream to AAC (perhaps as separate utility??)

(Still wishing for frame accurate edits - Thanks to all contributors for ongoing efforts!!!)

I include below the tail of the vidcutter log file of successful output/save, in case it highlights other issues...
2023-11-16 03:33 - root - CRITICAL - <class 'KeyError'>: ''
2023-11-16 03:42 - vidcutter.libs.videoservice - INFO - SmartCut resulted in zero length file, trying again without all stream mapping
2023-11-16 03:42 - vidcutter.libs.videoservice - INFO - SmartCut resulted in zero length file, trying again without all stream mapping
2023-11-16 03:42 - root - CRITICAL - File "/app/lib/python3.11/site-packages/vidcutter/libs/videoservice.py", line 406, in smartcheck
self.smartcut_jobs[index].procs[name].started.disconnect()

2023-11-16 03:42 - root - CRITICAL - <class 'TypeError'>: disconnect() failed between 'started' and all its connections
2023-11-16 03:42 - vidcutter.libs.videoservice - INFO - smartcut files are MPEG based so join via MPEG-TS
2023-11-16 03:42 - vidcutter.libs.videoservice - INFO - SmartCut resulted in zero length file, trying again without all stream mapping
2023-11-16 03:42 - vidcutter.libs.videoservice - INFO - SmartCut resulted in zero length file, trying again without all stream mapping
2023-11-16 03:42 - root - CRITICAL - File "/app/lib/python3.11/site-packages/vidcutter/libs/videoservice.py", line 406, in smartcheck
self.smartcut_jobs[index].procs[name].started.disconnect()

2023-11-16 03:42 - root - CRITICAL - <class 'TypeError'>: disconnect() failed between 'started' and all its connections
2023-11-16 03:45 - vidcutter.libs.videoservice - INFO - smartcut files are MPEG based so join via MPEG-TS
2023-11-16 04:01 - root - CRITICAL - File "/app/lib/python3.11/site-packages/vidcutter/videocutter.py", line 861, in openProject
mo = self.project_files[project_type].match(line)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^

2023-11-16 04:01 - root - CRITICAL - <class 'KeyError'>: ''
2023-11-16 04:01 - vidcutter.libs.mpvwidget - INFO - [ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1
2023-11-16 04:01 - vidcutter.libs.mpvwidget - INFO - [ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA
2023-11-16 04:01 - root - CRITICAL - File "/app/lib/python3.11/site-packages/vidcutter/videocutter.py", line 861, in openProject
mo = self.project_files[project_type].match(line)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^

2023-11-16 04:01 - root - CRITICAL - <class 'KeyError'>: ''
2023-11-16 04:06 - vidcutter.videocutter - INFO - source file is MPEG based so join via MPEG-TS

from vidcutter.

coffeemonk-exe avatar coffeemonk-exe commented on June 16, 2024

How was the libmpv version incorrect error fixed? Can you elaborate?

from vidcutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.