You are not logged in.

#1 2019-08-09 07:10:29

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Problem in playing videos from local storage.

Greetings,

I am new to arch. I am having problem in playing videos from my hard disk. There is no playback issues when I play videos online on Youtube or Amazon Prime but whenever I play local video files, the playback lags and chops a lot. For media player applications, I use VLC and Bomi. The problem  occurred in case of both the application. In VLC, I have tried 'Automatic', 'VA-API video decoder via DRM', 'VDPAU video decoder' and even tried disabling hardware acceleration in VLC. But neither of the options fixed anything in the playback. The ouput of 'vainfo' is give here https://pastebin.com/UGXwF6tC. Can anyone help to figure out what am I missing?

Offline

#2 2019-08-09 13:31:01

seth
Member
Registered: 2012-09-03
Posts: 13,112

Re: Problem in playing videos from local storage.

There's way to little information.

1. Does "local storage"/"hard disk" refer to a  SDD/HDD or some NAS? SATA or USB?
2. What kind of video (ie. it kinda matters if the local video is some 4k h265 and youtube is a 360p h264)?
3. Does the player throw any errors when playing from an interactive shell (also try mpv/mplayer)?
4. Are there disk I/O related errors in "dmesg -w" while playing?

Offline

#3 2019-08-10 12:17:55

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

Sorry that I didn't provide all the required details earlier.

1. Lagging and choppiness in video playing appears when I play a video from my external HDD which is USB 3.0.

2. The video I was trying to play was 1080p h264. Playing 1080p HD videos on online sites or from my internal HDD has not been a problem but it appears when I try to play from my USB devices.

3. There were a bunch of error messages while playing in the shell while playing videos  with VLC from external HDD. It's given here https://pastebin.com/1mrQJMfa.

4. I haven't found any error message in "dmesg -w"

Last edited by ImaginePhoenix (2019-08-10 12:18:15)

Offline

#4 2019-08-10 12:31:08

seth
Member
Registered: 2012-09-03
Posts: 13,112

Re: Problem in playing videos from local storage.

"the video"? Singular? The error messages indicate issues w/ the timestamps in that video…

1. Download a (bunch of) video from youtube and try to play that, https://www.archlinux.org/packages/comm … outube-dl/
2. Try playing those videos (and the one you have) from the internal drive (as well as the YT videos from the external HDD)

Report the choppiness matrix.

Offline

#5 2019-08-10 12:43:10

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

No. This problem is not specific to one particular video. Whatever video file a I play from USB drives, it will lag and choppiness will occur. Although what I have noticed is that while playing videos from external HDD lagging has been common to all the media players (VLC, Bomi and mpv) but choppiness only occurs in VLC.

Offline

#6 2019-08-10 12:48:07

seth
Member
Registered: 2012-09-03
Posts: 13,112

Re: Problem in playing videos from local storage.

Disable https://wiki.archlinux.org/index.php/Po … utosuspend - passing "usbcore.autosuspend=-1" will disable it globally but notice that daemons like TLP might reset that at runtime.

Did you measure the reading speed from that drive, eg.

dd if=/path/to/usbhdd/video.mp4 of=/dev/null

?

Offline

#7 2019-08-10 12:48:10

dockland
Member
From: Sweden
Registered: 2015-06-06
Posts: 858

Re: Problem in playing videos from local storage.

ImaginePhoenix wrote:

No. This problem is not specific to one particular video. Whatever video file a I play from USB drives, it will lag and choppiness will occur. Although what I have noticed is that while playing videos from external HDD lagging has been common to all the media players (VLC, Bomi and mpv) but choppiness only occurs in VLC.

Try to move a movie/file to local/internal drive and see if the "choppiness" persists.


I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.
I use it to look at funny pictures of cats and to argue with strangers.

Offline

#8 2019-08-10 15:05:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,866

Re: Problem in playing videos from local storage.

dockland wrote:

Try to move a movie/file to local/internal drive and see if the "choppiness" persists.

You might also try:
dd if=path/to/your/video of=/dev/null
What is the transfer speed reported on the last line of the output?

Do the same with the file on an internal drive as suggested by dockland.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2019-08-11 19:20:50

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

dockland wrote:
ImaginePhoenix wrote:

No. This problem is not specific to one particular video. Whatever video file a I play from USB drives, it will lag and choppiness will occur. Although what I have noticed is that while playing videos from external HDD lagging has been common to all the media players (VLC, Bomi and mpv) but choppiness only occurs in VLC.

Try to move a movie/file to local/internal drive and see if the "choppiness" persists.

No, If I copy the same file from external USB HDD to internal HDD, the video is played without any issue.

Offline

#10 2019-08-11 19:23:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,866

Re: Problem in playing videos from local storage.

ewaller wrote:

dd if=path/to/your/video of=/dev/null
What is the transfer speed reported on the last line of the output?
Do the same with the file on an internal drive

Last edited by ewaller (2019-08-11 19:24:26)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2019-08-11 19:25:46

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

seth wrote:

Disable https://wiki.archlinux.org/index.php/Po … utosuspend - passing "usbcore.autosuspend=-1" will disable it globally but notice that daemons like TLP might reset that at runtime.

Did you measure the reading speed from that drive, eg.

dd if=/path/to/usbhdd/video.mp4 of=/dev/null

?

This is the output,

6061666+1 records in
6061666+1 records out
3103573078 bytes (3.1 GB, 2.9 GiB) copied, 30.1833 s, 103 MB/s

Offline

#12 2019-08-11 19:26:13

seth
Member
Registered: 2012-09-03
Posts: 13,112

Re: Problem in playing videos from local storage.

Edit: did you check the autosuspend feature?

Last edited by seth (2019-08-11 19:26:49)

Offline

#13 2019-08-11 19:31:44

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

This is the output when I play the same video file after copying it to my internal HDD ,

6061666+1 records in
6061666+1 records out
3103573078 bytes (3.1 GB, 2.9 GiB) copied, 54.8682 s, 56.6 MB/s

Offline

#14 2019-08-11 19:32:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,866

Re: Problem in playing videos from local storage.

I missed that Seth, sorry. 
ImaginePhoenix. was that from the USB or the internal drive?
Edit:  Too slow -- sorry

Edit:  Those numbers are odd, but both should be fast enough to support the video stream.  Is the internal drive a rotating drive?

Last edited by ewaller (2019-08-11 19:34:12)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#15 2019-08-11 19:34:51

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

seth wrote:

Edit: did you check the autosuspend feature?

No. Would you please guide me in brief how to do that?

By the way, I am noticing that arch has been slow in reading in NTFS Drives and partitions.

Offline

#16 2019-08-11 19:35:47

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

ewaller wrote:

I missed that Seth, sorry. 
ImaginePhoenix. was that from the USB or the internal drive?
Edit:  Too slow -- sorry

Edit:  Those numbers are odd, but both should be fast enough to support the video stream.  Is the internal drive a rotating drive?

Yes, my internal HDD is a mechanical one, rotating

Offline

#17 2019-08-11 19:37:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,866

Re: Problem in playing videos from local storage.

Is that external drive NTFS?  You had not mentioned that before.

The rotating drive  explains the lower transfer rate on the internal drive.

Last edited by ewaller (2019-08-11 19:38:32)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#18 2019-08-11 19:43:29

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

ewaller wrote:

Is that external drive NTFS?  You had not mentioned that before.

The rotating drive  explains the lower transfer rate on the internal drive.

Yes. The external drive is NTFS. But I have another pen drive which is FAT32 and that works fine with my device.

Offline

#19 2019-08-11 19:44:42

seth
Member
Registered: 2012-09-03
Posts: 13,112

Re: Problem in playing videos from local storage.

You mean palyback from the FAT drive is fine?
Do you use https://www.archlinux.org/packages/extr … 4/ntfs-3g/

Offline

#20 2019-08-11 19:52:53

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

I haven't played any video from the FAT32 pen-drive but it takes noticeably longer time to load files from a NTFS drive than FAT32. Using a FAT32 drive is significantly faster. What I have found so far is that my arch installation is taking longer time in reading files from NTFS drives. Not only video file but every kind of file. For example if I try edit a docx file that is in the NTFS drive, Libre takes longer time to respond for each input.

Offline

#21 2019-08-11 19:54:22

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

seth wrote:

You mean palyback from the FAT drive is fine?
Do you use https://www.archlinux.org/packages/extr … 4/ntfs-3g/

Yes I am using ntfs-3g

Offline

#22 2019-08-11 20:04:09

seth
Member
Registered: 2012-09-03
Posts: 13,112

Re: Problem in playing videos from local storage.

For example if I try edit a docx file that is in the NTFS drive, Libre takes longer time to respond for each input.

That's very weird. Is there increase CPU load in these instances? The reading speed certainly looks fine.

On changing kernel parameters: https://wiki.archlinux.org/index.php/Kernel_parameters

Offline

#23 2019-08-11 20:17:41

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

Yeah, when I try to write to a file then CPU usage increases

Offline

#24 2019-08-11 20:20:08

seth
Member
Registered: 2012-09-03
Posts: 13,112

Re: Problem in playing videos from local storage.

Writing ntfs is expensive, however it should™ not happen while watching a video. Is there a difference in CPU load depending on where the video is?

Offline

#25 2019-08-11 20:34:32

ImaginePhoenix
Member
From: Kolkata, West Bengal, India
Registered: 2019-08-08
Posts: 19

Re: Problem in playing videos from local storage.

Yes. When I play a video from external USB HDD that is NTFS, the average CPU usage is 7-10 % higher than playing the same from internal HDD. What I have noticed is that when I play the video (from USB HDD) without fast forwarding the average CPU usage gradually decreases as usual and the video runs flawless for a while. Then suddenly CPU usage increases by 10-20% and a lag or choppiness occurs at that instant in the playback.

Offline

Board footer

Powered by FluxBB