Björn Lundin
Forum Replies Created
-
[Michael Rampe] “Basically, I think all your issues are being caused by the truncated stream you are getting from the source (starting on B-frame as identified earlier.)”
Ok, so this is were to start;I shold get rid of starting on a B-frame.
Seems like I need to read up on the different parts of a video.[Michael Rampe] “Which one is dumping the file you are using (straight from the FireDTV or from the MythTV DVR)?”
Good question. This is how i imagine it works. It’s on Linux
The card makes /dev/dvb/somedevice avialable to mythtv.
Mythtv changes the channel, to the wanted one, and reads from the device.
It the flushes the file to disk. No encoding or anything is done in mythtv,
since it runs on an old PIII machine. It does not have the power to do
anything useful in a short period of time.The movie/recording is copied to a laptop, on which I experimented.
Also Linux.But since vlc can read and play the movie, something must be correct in the stream. I think I’ll try to use cvlc to extract the different streams instead.
The ffmpeg is the one that arrives with ubuntu 9.10, ie the second latest.
So, it is since october 2009, but I know, things happens fast in this area.I’ve used the card with mac (eye-tv) it can also playback the recorded stream,
but I had that only for a short period of time, so I do not have any recordings left to compare with. But that might be a trail as well.
analyze the mac recording, and compare with the linux one. That gives the answer to if mythtv saves a untouched stream to disk.Anyway thanks for trying
/Björn -
[Michael Rampe] “If it is indeed DVB broadcasts you are capturing, get yourself a cheap USB DVB decoder which will allow you to capture the file in a proper way to your computer.
Yes, you are correct. I started the thread with
‘I have a FireDTV tv card that records SD and HD tv.
This is conneted to a Mythtv server’
But I should have been more clear.
Yes, the file is indeed a dvb-t recording from Denmark, eventhough
I’m, swedish. (I live close to denmark)It is from a HD-channel. (yes PAL-land)
The FireDTV card is a firewire tv card with CA-modules,
needed for pay-tv around here. you stick a card into it, and pay the bill…
Free channels are not in majority here, eventhough this particular channel is free.Anyway, thanks for your efforts.
/Björn -
[Michael Rampe] “Sorry for the delay…. been learning to #bash recently which has taken up some time. Highly recommended for automating FFmpeg.”
Yeah, bash is useful.
[Michael Rampe] “Why not use FFMpeg for all of this? What is the source?
Not much experience using mencoder but keep it simple unless you really need complex. Can you please post the source info?
$ ffmpeg -i ORIGINAL_FILE_NAME”well, ahem, I did, look in my last post.
But the interesting part looks likeSeems stream 0 codec frame rate differs from container frame rate: 100.00 (100/1) -> 50.00 (50/1)
Input #0, mpegts, from ‘1006_20100511233500_orig.mpg’:
Duration: 10:51:25.89, start: 25752.630656, bitrate: 215 kb/s
Program 1
Stream #0.0[0x907]: Video: h264, yuv420p, 1280×720 [PAR 1:1 DAR 16:9], 50 tbr, 90k tbn, 100 tbc
Stream #0.1[0x91f](dan): Subtitle: dvbsub
Stream #0.2[0x920](dan): Subtitle: dvbsub
At least one output file must be specified[Michael Rampe] “Why not use intermediate container instead of raw streams?”
Because I’m a newbie on this. I found the mplayer dumpfile while googling,
and sofar, this is the only thin that got any useful data out of the file.
Well, except for VLC which plays it…I’m willing to try just about anything…
[Michael Rampe] “…try:
$ ffmpeg -i raw.mp4 -i audiodump.aac -map 0:0 -map 1:0 -vcodec copy -acodec copy out.mp4”Hmm, but where do I get raw.mp4?
The raw.264 above is produced bymplayer -dumpvideo -dumpfile raw.264 filename.mpg
and the raw.aac is produced by
mplayer -dumpaudio -dumpfile raw.aac filename.mpg
which then is converted to audiodump.aac via faac and whatnot.I’m certainly willing to keep it as simple as I can, as long as
it works 😉So I tried
$ ffmpeg -i filenaem.mpg -i audiodump.aac -map 0:0 -map 1:0 -vcodec copy -acodec copy out.mp4
but it left me with an unplayable file. No sound, no video, but lots of
errors like
[h264 @ 0x98ec960]B picture before any references, skipping
[h264 @ 0x98ec960]decode_slice_header error
[h264 @ 0x98ec960]no frame!
Error while decoding frame!
[h264 @ 0x98ec960]B picture before any references, skipping
[h264 @ 0x98ec960]decode_slice_header error
[h264 @ 0x98ec960]no frame!
Error while decoding frame!when mplayer tried it.
I’m glad that someone is giving this a try 🙂
Thanks so far./Björn
-
>Can you post the command line result of FFmpeg?
There’s a lot of output
bnl@tova:/usr/bnl_tmp$ ffmpeg -f h264 -i raw.264 -vcodec copy -i raw.aac -acodec faac out.mp4
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: –extra-version=4:0.5+svn20090706-2ubuntu2.2 –prefix=/usr –enable-avfilter –enable-avfilter-lavf –enable-vdpau –enable-bzlib –enable-libgsm –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-libvorbis –enable-pthreads –enable-zlib –disable-stripping –disable-vhook –enable-gpl –enable-postproc –enable-swscale –enable-x11grab –enable-libdc1394 –extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include –enable-shared –disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 23 2010 15:05:49, gcc: 4.4.1
[NULL @ 0x888c970]non-existing PPS referenced
[h264 @ 0x888c970]B picture before any references, skipping
[h264 @ 0x888c970]decode_slice_header error
[h264 @ 0x888c970]no frame!… skipped alot similar lines
[h264 @ 0x888c970]non-existing PPS referenced
[h264 @ 0x888c970]B picture before any references, skipping
[h264 @ 0x888c970]decode_slice_header error
[h264 @ 0x888c970]no frame!
[h264 @ 0x888c970]number of reference frames exceeds max (probably corrupt input), discarding oneSeems stream 0 codec frame rate differs from container frame rate: 100.00 (100/1) -> 50.00 (100/2)
Input #0, h264, from ‘raw.264’:
Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 1280×720 [PAR 1:1 DAR 16:9], 50 tbr, 1200k tbn, 100 tbc
raw.aac: Unknown format
bnl@tova:/usr/bnl_tmp$so, this combo was no good at all.
ffmpeg -i myfile.mpg (not ts) gives
bnl@tova:/usr/bnl_tmp$ ffmpeg -i 1006_20100511233500_orig.mpg
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: –extra-version=4:0.5+svn20090706-2ubuntu2.2 –prefix=/usr –enable-avfilter –enable-avfilter-lavf –enable-vdpau –enable-bzlib –enable-libgsm –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-libvorbis –enable-pthreads –enable-zlib –disable-stripping –disable-vhook –enable-gpl –enable-postproc –enable-swscale –enable-x11grab –enable-libdc1394 –extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include –enable-shared –disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 23 2010 15:05:49, gcc: 4.4.1
[NULL @ 0x8a1cc30]non-existing PPS referenced
[h264 @ 0x8a1cc30]B picture before any references, skipping
[h264 @ 0x8a1cc30]decode_slice_header error
[h264 @ 0x8a1cc30]no frame!
[h264 @ 0x8a1cc30]non-existing PPS referenced
[h264 @ 0x8a1cc30]B picture before any references, skipping
[h264 @ 0x8a1cc30]decode_slice_header error
[h264 @ 0x8a1cc30]no frame!… same as aboce, a lot of similar lines cut
[h264 @ 0x8a1cc30]B picture before any references, skipping
[h264 @ 0x8a1cc30]decode_slice_header error
[h264 @ 0x8a1cc30]no frame!
[h264 @ 0x8a1cc30]non-existing PPS referenced
[h264 @ 0x8a1cc30]B picture before any references, skipping
[h264 @ 0x8a1cc30]decode_slice_header error
[h264 @ 0x8a1cc30]no frame!
[h264 @ 0x8a1cc30]number of reference frames exceeds max (probably corrupt input), discarding oneSeems stream 0 codec frame rate differs from container frame rate: 100.00 (100/1) -> 50.00 (50/1)
Input #0, mpegts, from ‘1006_20100511233500_orig.mpg’:
Duration: 10:51:25.89, start: 25752.630656, bitrate: 215 kb/s
Program 1
Stream #0.0[0x907]: Video: h264, yuv420p, 1280×720 [PAR 1:1 DAR 16:9], 50 tbr, 90k tbn, 100 tbc
Stream #0.1[0x91f](dan): Subtitle: dvbsub
Stream #0.2[0x920](dan): Subtitle: dvbsub
At least one output file must be specified
bnl@tova:/usr/bnl_tmp$So, it seems like ffmpeg does not see the audio, at least as I
understand it.However the file plays well in vlc and mplayer on a linuxbox.
So, by using
mplayer -ao pcm -vc null -vo null filename.mpgI get a file audiodump.wav
Which i convert to audiodump.aac with this command
faac -q 100 -c 44100 -b 192 –mpeg-vers 4 audiodump.wav
If I then run
ffmpeg -f h264 -i raw.264 -vcodec copy -i audiodump.aac -acodec libfaac out.mp4
I get
bnl@tova:/usr/bnl_tmp$ ffmpeg -f h264 -i raw.264 -vcodec copy -i audiodump.aac -acodec libfaac out.mp4
……..
[h264 @ 0x90f0970]no frame!
[h264 @ 0x90f0970]number of reference frames exceeds max (probably corrupt input), discarding oneSeems stream 0 codec frame rate differs from container frame rate: 100.00 (100/1) -> 50.00 (100/2)
Input #0, h264, from ‘raw.264’:
Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 1280×720 [PAR 1:1 DAR 16:9], 50 tbr, 1200k tbn, 100 tbc
Input #1, aac, from ‘audiodump.aac’:
Duration: 00:21:20.56, bitrate: 142 kb/s
Stream #1.0: Audio: aac, 48000 Hz, stereo, s16, 142 kb/s
Output #0, mp4, to ‘out.mp4’:
Stream #0.0: Video: libx264, yuv420p, 1280×720 [PAR 1:1 DAR 16:9], q=2-31, 90k tbn, 50 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
[NULL @ 0x90f0970]missing picture in access unit947.65 bitrate=8002.5kbits/s
frame=47627 fps=372 q=-1.0 Lsize= 932260kB time=950.34 bitrate=8036.2kbits/s
video:924288kB audio:7445kB global headers:0kB muxing overhead 0.056549%This gets me a file out.mp4
if I run it with mplayer I get
………
Error while decoding frame!
[h264 @ 0x6408960]B picture before any references, skipping
[h264 @ 0x6408960]decode_slice_header error
[h264 @ 0x6408960]no frame!
Error while decoding frame!Too many audio packets in the buffer: (4096 in 699812 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
A: 0.2 V: 0.0 A-V: 0.201 ct: 0.000 0/ 0 ??% ??% ??,?% 3492 0and mplayer exits.
ffmpget -i out.mp4 gives
lt on Apr 23 2010 15:05:49, gcc: 4.4.1Seems stream 0 codec frame rate differs from container frame rate: 100.00 (100/1) -> 50.00 (50/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘out.mp4’:
Duration: 00:15:52.54, start: 0.000000, bitrate: 8017 kb/s
Stream #0.0(und): Video: h264, yuv420p, 1280×720, 50 tbr, 50 tbn, 100 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16which to me sems alright?
Thanks for your reply.
/Björn