Opened 9 years ago
Closed 8 years ago
#12954 closed Bug Report - General (Won't Fix)
Fix for #12479 broke recording from USBTV encoder
| Reported by: | Owned by: | JYA | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.28.2 |
| Component: | MythTV - General | Version: | 0.28.0 |
| Severity: | high | Keywords: | |
| Cc: | Ticket locked: | no |
Description
I upgraded my Fedora Mythtv box from 0.28-8.fc23.x86_64 to 0.28-10.fc23.x86_64. After the upgrade recording from my USBTV encoder produces a corrupted recording. Further investigation shows that the problem is caused by changeset f513db754 in #12479. I have rebuilt the RPM with just the changes to NuppelVideoRecorder.cpp backed out and replaced the library on my system and can now successfully record. I haven't sufficient knowledge to figure a full solution. Let me know if there's any further info needed to fix.
Attachments (5)
Change History (23)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Which profile are you using for encoding? Any chance you could provide the log showing how the recording is made? Is this the result of a transcoding or straight recording?
comment:3 by , 9 years ago
Log now attached. I have noticed that the reason the recording is so short is that a segment fault occurred. This does not happen on every recording. It is a straight recording, using what I believe is the LiveTV profile 720x576, MPEG-4 codec.
comment:4 by , 9 years ago
does this partial reversal works for you?
to apply go into the mythtv directory (where configure is located) and type: patch -p2 < t.patch
That will break transcoding, and isn't a proper fix, but I'm simply attempting to narrow the changes to determine how to fix it as I can't reproduce it here.
Thank you
comment:5 by , 9 years ago
| Status: | new → infoneeded_new |
|---|
comment:6 by , 9 years ago
Thanks for that. I have reverted my system to the previous version at the moment. Hopefully I'll test as soon as I can. May be a day or two.
comment:7 by , 9 years ago
How is your card configured in mythtv-setup? what format does it output.
in any case, if you don't have time to test, neither do I for fixing it I'm afraid
comment:9 by , 9 years ago
Can you do a dump of the /dev/video0 say 50MB and post that somewhere?
But still need to know how it's configured in your system
All my attempt here to use analog video has worked just fine
comment:10 by , 9 years ago
The fix you supplied works. Thanks for your great support. I'll leave my system running with that fix to check stability.
The card is a 'Fushicai usbtv007'. See https://linuxtv.org/wiki/index.php/Easycap#USBTV007_EasyCAP
I have put the output from dd if=/dev/video0 of=video0.raw to Dropbox here: https://www.dropbox.com/sh/hk93sxabn643q7i/AAAQRBtzWnYVT2uIGENfJnZKa?dl=0 This is not playable via mplayer.
There is also the output from 'mplayer -v tv://' which has some more info. This plays the video fine.
The mythtv setup is as follows:
Capture Card Setup
Card type: Analog capture card Video device:/dev/video Probed info: usbtv [usbtv] VBI device: Audio device:ALSA:hw:CARD=usbtv Force audio sampling rate:48000
Record Profiles->Software Encoders(v4l based)->Default->Video Compression
Width:720 Height:576 Codec:MPEG-4 Bitrate:2200 Maximum quality:2 Minimum quality:15 Max quality difference between frames:3 Scale bit rate for frame size:enabled Enable high-quality encodeing:enabled Enable 4MV encoding:enabled Number of threads:2 Record Profiles->Software Encoders(v4l based)->Default->Audio Quality Codec:MP3 Sampling rate:48000 MP3 quality:7 Volume:90%
Live TV is the same as default. The input used is the composite.
Let me know if there's more you need.
comment:11 by , 9 years ago
The patch isn't a fix. It's a bare reversal on a single commit on the nuppel recorder. I'll try to simulate your setup and see if I can reproduce it.
I'll probably add some logs for you to test to show me which code path is entered. From there I'll be able to see exactly what's wrong if I can't reproduce it myself.
Thanks very much for your help
comment:13 by , 9 years ago
| Milestone: | → 0.28.1 |
|---|
comment:14 by , 9 years ago
root@mythtv # v4l2-ctl --all 10:48am
Driver Info (not using libv4l2):
Driver name : usbtv
Card type : usbtv
Bus info : usb-0000:00:14.0-4
Driver version: 4.8.12
Capabilities : 0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Composite: ok)
Video Standard = 0x000000ff
PAL-B/B1/G/H/I/D/D1/K
Format Video Capture:
Width/Height : 720/576
Pixel Format : 'YUYV'
Field : Interlaced
Bytes per Line : 1440
Size Image : 829440
Colorspace : SMPTE 170M
Transfer Function : Default
YCbCr Encoding : Default
Quantization : Default
Flags :
Streaming Parameters Video Capture:
Frames per second: 25.000 (25/1)
Read buffers : 2
comment:15 by , 9 years ago
I was going to create a ticket because I have a similar problem with commit f513db7 (I use analog tv). I created a pull request on github with a fix for this (https://github.com/MythTV/mythtv/pull/126), as stated in the pull request, the solution is using alignment 0 for the frame creation. In the pull request and attached patch, I changed the init alignment default from 64 to 0 but another solution would be to call the init method in NuppelVideoRecorder.cpp with alignment 0.
by , 9 years ago
| Attachment: | mythtv_FixAlignemnt.patch added |
|---|
Solution for the problem changing the init method default
by , 9 years ago
| Attachment: | mythtv_FixAlignemnt_call.patch added |
|---|
Another solution for the problem changing the init method call
comment:16 by , 9 years ago
| Owner: | set to |
|---|
comment:17 by , 9 years ago
| Milestone: | 0.28.1 → 0.28.2 |
|---|
Moving remaining open 0.28.1 tickets to 0.28.2
comment:18 by , 8 years ago
| Resolution: | → Won't Fix |
|---|---|
| Status: | infoneeded_new → closed |
Closing any remaining tickets for 0.28, if the issue persists, feel free to reopen and align to v29 or master

Please attach a copy of a broken nuv recording
Is your USB TV an analog tuner?
If not, why are you still using the very old, and very obsolete nuppel container? It's utter crap and compress almost nothing