Navigation Menu

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

Seeking mp4 files with H264 video is broken when threads>1 #74

Closed
tgoyne opened this issue Aug 19, 2013 · 15 comments
Closed

Seeking mp4 files with H264 video is broken when threads>1 #74

tgoyne opened this issue Aug 19, 2013 · 15 comments

Comments

@tgoyne
Copy link
Member

tgoyne commented Aug 19, 2013

From arslanoglou.georgios on January 24, 2012 11:19:40

What steps will reproduce the problem? 1. Open an mp4 file with H264 video with FFVideoSource and threads>1 (or -1)
2. Seek video with any AviSynth capable video player (AvsP, Aegisub, VirtualDub)
3. At some point, you will get the message "FFVideoSource: Insanity detected: decoder returned an empty frame" What is the expected output? What do you see instead? It should seek all frames with no error message. What version of the product are you using? On what operating system? 2.16, 2.17 @ Win7 x64 Please provide any additional information below. This problem doesn't happen when using threads=1, but the performance is significantly lower than when using thread>1 (or -1).
Any mp4 anime raw file will do the trick...

Original issue: http://code.google.com/p/ffmpegsource/issues/detail?id=74

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From henjin.iamtheweirdo on February 04, 2012 21:11:51

I think the cause of this issue is r518 . I know that commit meant to prevent crash when decoder returns an empty frame. However, I get that error message very often when I open my own encoded MP4s with FFMS2 and seek through them (even when I let x264 output as RAW AVC then mux the result to MP4 by L-SMASH muxer, that error still occurred). In fact, if I revert that commit for my own build or remux those MP4s to MKVs, I can seek them without any problems (with threads>1, of course).

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From SAPikachu on February 05, 2012 02:24:53

SAPikachu/ffms2_hacks@5651d56 I also encountered this problem. Just made this workaround patch on my private build and seems the problem disappeared. (Sorry for the incorrect white spaces, I didn't notice that before pushing, fixed them in another commit)

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From kalle.blomster on February 06, 2012 02:01:04

I downloaded a random animu fagsub in mp4, loaded it in VirtualDub and clicked around a lot with threads=8 without managing to reproduce the issue. Please provide a sample that shows this behavior reliably.

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From kalle.blomster on February 06, 2012 02:02:21

Also, if commenting out the check seems to solve the problem there's some really bizarre threading magic going on, because otherwise FFMS2 WILL crash with a null pointer dereference.

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From kalle.blomster on February 06, 2012 02:30:59

Never mind the sample, I loaded the wrong file, hurpa durpa durp. I can reproduce it now.

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From arslanoglou.georgios on February 06, 2012 02:38:26

Latest Kyuubi release for Fairy Tail is one example.
If you were so lucky and didn't get it with seeking, you can start a simple encode and you will see it.

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From 4Selur on February 12, 2012 06:33:19

ran into the same problem with a mov(avc,pcm) file: http://www.mediafire.com/?80iz1u6ezjx75rh FFVideoSource("d:\canon_powershot_sx1_is_02_aliasing.mov",cachefile="D:\Encoding Temp\canon_powershot_sx1_is_02_aliasing_41.ffindex")
causes artefact
FFVideoSource("d:\canon_powershot_sx1_is_02_aliasing.mov",cachefile="D:\Encoding Temp\canon_powershot_sx1_is_02_aliasing_41.ffindex", threads=1)
works fine

using: Avisynth 32bit 2.6 and the latest ffmpegsource from Jan 25

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From arslanoglou.georgios on February 12, 2012 06:35:44

Well, doesn't sound too weird, since if I am correct, mov is essentially a hacked mp4 container. You may try to rename your file to mp4 and play it. Most of the times, it works, and the video plays smoother than when in mov, since the mp4 decoders are much better than the mov ones...

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From 4Selur on February 12, 2012 06:59:30

You may try to rename your file to mp4 and play it.
-> tried, does not help

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From arslanoglou.georgios on February 12, 2012 07:03:05

I didn't mean it will help you with the issue here. It was just a comment in general.
But if renaming it to mp4 allows you to play it with a video player, then you can try to remux the renamed mp4 to mkv via mkvtoolnix.
The remuxed mkv should work correctly with ffms2 and threads>1 ;)

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From 4Selur on February 12, 2012 07:15:12

The remuxed mkv should work correctly with ffms2 and threads>1 ;)
it does not, as soon as ",threads=1" is missing I get artifacts, see: http://www.mediahump.com/gallery/4005/

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From 4Selur on February 12, 2012 07:21:01

side-note: ffplay, mplayer, mpc-hc all have no problem during playback

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From martin.hamant on June 16, 2012 03:45:35

Same problem here with FFmpegSource2 2.17 / seeking in a H264 AVC video.
Avisynth 2.5 32 bits.
Win7 x64

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From arslanoglou.georgios on June 16, 2012 05:59:54

2.17 is r637 or r640 . This should be fixed with r691 , but it a compiled build is not yet available.

@tgoyne
Copy link
Member Author

tgoyne commented Aug 19, 2013

From tgoyne on June 20, 2012 19:01:10

Status: Fixed

@tgoyne tgoyne closed this as completed Aug 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant